2

I intend to use the curve class for my CV but the entries are spilling out of page. Please help.

This is the code for main.tex


\NeedsTeXFormat{LaTeX2e}

\documentclass[a4paper,skipsamekey,11pt]{curve}

\usepackage{settings} \usepackage{geometry} \geometry{left=1.5cm,right=1.5cm,top=1.5cm,bottom=1.5cm} \usepackage{lipsum}

\setlength{\footskip}{0.7cm}

\definecolor{SwishLineColour}{HTML}{106B21} \definecolor{MarkerColour}{HTML}{8A1538}

\ifxetexorluatex % If you're using XeLaTeX or LuaLaTeX \usepackage{fontspec}

\setmainfont[Ligatures=TeX,SmallCapsFeatures={Letters=SmallCaps,LetterSpace=5}]{Charis SIL} \setsansfont[Ligatures=TeX]{Fira Sans} \setmonofont{Inconsolata} \else % If you're using pdfLaTeX or latex \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{breakcites} \usepackage{fbb} \usepackage[type1]{cabin} \usepackage[varqu,varl]{zi4}

\fi \usepackage{csquotes}

\usepackage{fontawesome}

\usepackage{scalerel} \usepackage{tikz} \usetikzlibrary{svg.path}

\usepackage[tracking=smallcaps]{microtype}

\definecolor{orcidlogocol}{HTML}{A6CE39} \tikzset{ orcidlogo/.pic={ \fill[orcidlogocol] svg{M256,128c0,70.7-57.3,128-128,128C57.3,256,0,198.7,0,128C0,57.3,57.3,0,128,0C198.7,0,256,57.3,256,128z}; \fill[white] svg{M86.3,186.2H70.9V79.1h15.4v48.4V186.2z} svg{M108.9,79.1h41.6c39.6,0,57,28.3,57,53.6c0,27.5-21.5,53.6-56.8,53.6h-41.8V79.1z M124.3,172.4h24.5c34.9,0,42.9-26.5,42.9-39.7c0-21.5-13.7-39.7-43.7-39.7h-23.7V172.4z} svg{M88.7,56.8c0,5.5-4.5,10.1-10.1,10.1c-5.6,0-10.1-4.6-10.1-10.1c0-5.6,4.5-10.1,10.1-10.1C84.2,46.7,88.7,51.3,88.7,56.8z}; } }

\newcommand\orcidicon[1]{\href{https://orcid.org/#1}{\mbox{\scalerel*{ \begin{tikzpicture}[yscale=-1,transform shape] \pic{orcidlogo}; \end{tikzpicture} }{|}}}}

\usepackage{natbib} %to compressed succcessive citations \usepackage{bibentry} % use to insert full reference entries in the text

\newcommand*{\doi}[1]{DOI \href{https://doi.org/#1}{\texttt{#1}}} \makeatletter % expandable version of ... \def\bibinfo#1{% @ifundefined{bibinfo@X@#1}% {@firstofone} {\csname bibinfo@X@#1\endcsname}} \makeatother

\usepackage{url} \def\UrlBreaks{\do/\do-\do.}

\usepackage{lastpage} \usepackage[none]{hyphenat}

\usepackage{hyperref} %hyperlink \hypersetup{colorlinks=true,linkcolor=black,citecolor=blue,urlcolor=blue} %change the color to black for print version

\makeatletter % <======================================================= \def@continuedname{} \makeatother % <========================================================

\includecomment{fullonly}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\leftheader{% {\LARGE\bfseries\sffamily John Doe, PhD}

\vspace{0.5cm}

\makefield{\faUniversity}{\texttt{Institute of XXXXXXXX}}

%\makefield{}{\texttt{College of xxxxxxxx}}

\makefield{}{\texttt{University of XXXXX}}

\makefield{}{\texttt{XXXXXXX}}

\vspace{0.3cm}

\makefield{\faEnvelopeO}{\texttt{jdoe@email.com}}

\makefield{\faPhone}{\texttt{+000000000000}}

\vspace{0.3cm}

\makefield{\orcidicon{0000-0000-0000-0000}}{\texttt{ORCiD:0000-0000-0000-0000}}

\vspace{0.5cm}

}

\rightheader{~} \begin{fullonly} \photo[r]{photo.jpg} \photoscale{0.2} \end{fullonly}

%\geometry{includefoot} \makeatletter \renewcommand{@evenfoot}{\footnotesize \textit{JDoe - CV as of {\today} \hfill \small \thepage/\pageref{LastPage}}} \renewcommand{@oddfoot}{\footnotesize \textit{JDoe - CV as of {\today} \hfill \small \thepage/\pageref{LastPage}}} \makeatother

\title{Curriculum Vitae}

\begin{document}

\bibliographystyle{abbrvnat}

\nobibliography{references}

\makeheaders[c]

\makerubric{grants}


\end{document}

This is the code for grants.tex

\begin{rubric}{Grants, Fellowships and Scholarships}

\entry[2015-2018] The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog. \entry[2012-2013] The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog. \entry*[2003-2008] The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog. \end{rubric}

Please see imageCompiled pdf

This is the contents of the settings.sty

\RequirePackage{silence}
\WarningsOff[longtable]
\WarningsOff[array]

\usepackage{ifxetex,ifluatex} \newif\ifxetexorluatex \ifxetex \xetexorluatextrue \else \ifluatex \xetexorluatextrue \else \xetexorluatexfalse \fi \fi

\RequirePackage{graphicx} \RequirePackage[hyphens]{url} \RequirePackage[main=british]{babel} %\RequirePackage{ragged2e} \raggedright

\RequirePackage{fontawesome}

\newcommand{\smallcaps}[1]{\textsc{\lowercase{#1}}}

\RequirePackage[a4paper,nohead,nofoot,hmargin=1.5cm,vmargin=1.5cm]{geometry} %\RequirePackage[a4paper,nohead,nofoot,left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} %\RequirePackage[a4paper,nohead,nofoot,width=16cm]{geometry} \RequirePackage{relsize} \RequirePackage[dvipsnames,svgnames]{xcolor} \RequirePackage{tikz} \usetikzlibrary{shapes,shadows}

\RequirePackage{comment} \definecolor{SwishLineColour}{HTML}{88AC0B} \definecolor{MarkerColour}{HTML}{B6073F}

\RequirePackage{tikz} \newcommand*\circled[1]{\tikz[baseline=(char.base)]{ \node[shape=circle,text=white,fill=MarkerColour!80!black,font=\sffamily\scriptsize\bfseries,inner sep=1pt,text height=1.35ex,minimum width=1.5em,text centered] (char) {#1};}}

\headerscale{1} %\setlength{\headerspace}{6pt} \rubricfont{\Large\bfseries\sffamily} \setlength{\rubricspace}{2pt} %\setlength{\rubricafterspace}{-9pt} \setlength{\rubricafterspace}{-3pt} \setlength{\subrubricspace}{3pt} \setlength{\subrubricbeforespace}{4pt} \def@@rubrichead#1{% \begin{tikzpicture}[baseline]%
\shade[left color=SwishLineColour!60!white, right color=white] rectangle (@almosttextwidth,2.5pt); \node[font={@rubricfont},inner sep=0pt,text ragged,anchor=south west,text depth=.5ex,text height=1.5ex] at (1pt,2pt) {#1}; \end{tikzpicture}% \vspace\rubricspace% }

\subrubricfont{\large\bfseries\sffamily} \subrubricalignment{l}

\newcommand{\makefield}[2]{\makebox[1.5em]{\color{MarkerColour!80!black}#1} #2\hspace{2em}}

\keyalignment{r} \rubricalignment{l} \renewcommand{\arraystretch}{1.25} \urlstyle{tt}

\newcommand{\prefixmarker}[1]{\def@prefixmarker{#1}} \def@prefixmarker{\relscale{.9}\faBookmark}

\prefix{% \hspace{-1ex} \color{MarkerColour!80!black}@prefixmarker% \hspace{1ex}% }

\newcommand{\makerubrichead}[1]{\vskip\baselineskip@@rubrichead{#1}}

\newcommand{\myname}[2]{% \def@mylastname{#1}% \def@myfirstname{#2}% }

\RequirePackage[colorlinks=true,allcolors=black,breaklinks=true]{hyperref}

ralph
  • 21

1 Answers1

1

The file settings.sty loads many packages.

The command \listfiles before \documentclass will make a list of all the packages loaded at the end of the .log file.

For example, geometry was loaded by settings.sty, there is not need to do it again, etc.

So before adding another package to settings.sty check if it not already loaded to avoid conflicts. Remember the hyperref should be the last package to be loaded.

A simplified preamble makes the problem go away.

b

\listfiles

\documentclass[a4paper,skipsamekey,11pt]{curve}

\usepackage{settings}

\usepackage{lipsum}

\setlength{\footskip}{0.7cm}

\definecolor{SwishLineColour}{HTML}{106B21} \definecolor{MarkerColour}{HTML}{8A1538}

\usepackage{scalerel} \usetikzlibrary{svg.path} \definecolor{orcidlogocol}{HTML}{A6CE39} \tikzset{ orcidlogo/.pic={ \fill[orcidlogocol] svg{M256,128c0,70.7-57.3,128-128,128C57.3,256,0,198.7,0,128C0,57.3,57.3,0,128,0C198.7,0,256,57.3,256,128z}; \fill[white] svg{M86.3,186.2H70.9V79.1h15.4v48.4V186.2z} svg{M108.9,79.1h41.6c39.6,0,57,28.3,57,53.6c0,27.5-21.5,53.6-56.8,53.6h-41.8V79.1z M124.3,172.4h24.5c34.9,0,42.9-26.5,42.9-39.7c0-21.5-13.7-39.7-43.7-39.7h-23.7V172.4z} svg{M88.7,56.8c0,5.5-4.5,10.1-10.1,10.1c-5.6,0-10.1-4.6-10.1-10.1c0-5.6,4.5-10.1,10.1-10.1C84.2,46.7,88.7,51.3,88.7,56.8z}; } }

\newcommand\orcidicon[1]{\href{https://orcid.org/#1}{\mbox{\scalerel*{ \begin{tikzpicture}[yscale=-1,transform shape] \pic{orcidlogo}; \end{tikzpicture} }{|}}}}

\ifxetexorluatex % If you're using XeLaTeX or LuaLaTeX \usepackage{fontspec} \setmainfont[Ligatures=TeX,SmallCapsFeatures={Letters=SmallCaps,LetterSpace=5}]{Charis SIL} \setsansfont[Ligatures=TeX]{Fira Sans} \setmonofont{inconsolata} \else % If you're using pdfLaTeX or latex \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{breakcites} \usepackage{fbb} \usepackage[type1]{cabin} \usepackage[varqu,varl]{zi4} \fi

\usepackage{csquotes}

\includecomment{fullonly}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\leftheader{% {\LARGE\bfseries\sffamily John Doe, PhD}

\vspace{0.5cm}

\makefield{\faUniversity}{\texttt{Institute of XXXXXXXX}}

\makefield{}{\texttt{College of Engineering and Agro-Industrial Technology}}

\makefield{}{\texttt{University of XXXXX}}

\makefield{}{\texttt{XXXXXXX}}

\vspace{0.3cm}

\makefield{\faEnvelopeO}{\texttt{jdoe@email.com}}

\makefield{\faPhone}{\texttt{+000000000000}}

\vspace{0.3cm}

\makefield{\orcidicon{0000-0000-0000-0000}}{\texttt{ORCiD:0000-0000-0000-0000}}

\vspace{0.5cm}

}

\rightheader{~} \begin{fullonly} \photo[r]{example-grid-100x100pt} % \photoscale{0.13} \end{fullonly}

\title{Curriculum Vitae}

\begin{document} \makeheaders[c]

\makerubric{grants}

\end{document}

VerySimple.tex

    % !TeX TS-program = pdflatex
\listfiles
\documentclass[a4paper,skipsamekey,11pt]{curve}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}    
\RequirePackage{graphicx}   
\RequirePackage{fontawesome}    
\RequirePackage[dvipsnames,svgnames]{xcolor}
\RequirePackage{tikz}
\usetikzlibrary{shapes,shadows}

\RequirePackage{comment}
\definecolor{SwishLineColour}{HTML}{88AC0B}
\definecolor{MarkerColour}{HTML}{B6073F}    

\headerscale{1}
\setlength{\headerspace}{6pt}
\rubricfont{\Large\bfseries\sffamily}
\setlength{\rubricafterspace}{-3pt}
\setlength{\subrubricspace}{3pt}
\setlength{\subrubricbeforespace}{4pt}
\makeatletter
\def\@@rubrichead#1{%
    \begin{tikzpicture}[baseline]%\
        \shade[left color=SwishLineColour!60!white, right color=white] rectangle (\linewidth,2.5pt);
        \node[font={\@rubricfont},inner sep=0pt,text ragged,anchor=south west,text depth=.5ex,text height=1.5ex] at (1pt,2pt) {#1};
    \end{tikzpicture}%
    \vspace\rubricspace%
}
\makeatother

\subrubricfont{\large\bfseries\sffamily}
\subrubricalignment{l}

\newcommand{\makefield}[2]{\makebox[1.5em]{\color{MarkerColour!80!black}#1} #2\hspace{2em}}

% \keyalignment{r} \rubricalignment{l} \renewcommand{\arraystretch}{1.25}
\newcommand{\makerubrichead}[1]{\vskip\baselineskip@@rubrichead{#1}}

\usepackage{lipsum} 

\includecomment{fullonly}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%      

\leftheader{%
    {\LARGE\bfseries\sffamily John Doe, PhD}

    \vspace{0.5cm}

    \makefield{\faUniversity}{\texttt{Institute of XXXXXXXX}}

    \makefield{}{\texttt{College of Engineering and Agro-Industrial Technology}}

    \makefield{}{\texttt{University of XXXXX}}

    \makefield{}{\texttt{XXXXXXX}}

    \vspace{0.3cm}

    \makefield{\faEnvelopeO}{\texttt{jdoe@email.com}}

    \makefield{\faPhone}{\texttt{+000000000000}}
}


\rightheader{~}
\begin{fullonly}
    \photo[r]{example-grid-100x100pt} %
    \photoscale{0.13}
\end{fullonly}

\title{Curriculum Vitae}

\begin{document}
    \makeheaders[c]     
    \makerubric{grants}     
\end{document}

Simon Dispa
  • 39,141
  • Thank you very much, Simon. It didn't work for me, however. I copied your code verbatim and ran it via TexStudio but it didn't work. I am still getting the "Overfull \hbox (82.29886pt too wide) in alignment" problem – ralph Aug 01 '21 at 15:30
  • May I know what tex editor are you using? – ralph Aug 03 '21 at 00:04
  • @ralph TeXstudio – Simon Dispa Aug 03 '21 at 12:45
  • Thank you @Simon. I am also using TexStudio but it is not working. Am I missing something? – ralph Aug 03 '21 at 13:09
  • 1
    @ralph I added a file VerySimple.tex to test your environment. Put only this file and grant.tex it in a new working directory and compile. Keep me informed of the result. – Simon Dispa Aug 03 '21 at 14:25
  • Thank you very much @Simon. It worked initially, after following your instructions. However, once I modified the margins using the geometry package, I had the same problem again. Happened for both TexStudio and TexMaker. The odd thing is the error stuck even if I started from scratch using your example. – ralph Aug 04 '21 at 00:15