曲线类条目溢出页面

曲线类条目溢出页面

我打算将曲线类用于我的简历,但条目超出了页面范围。请帮忙。

这是 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{[email protected]}}
    
    \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}

这是 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}

请参阅图片编译后的pdf

这是 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}


答案1

该文件settings.sty加载许多包。

\listfiles之前的命令\documentclass将会在 .log 文件末尾列出所有已加载的包。

例如,geometry已由 加载settings.sty,无需再次执行,等等。

因此,在添加另一个包之前,请settings.sty检查它是否尚未加载以避免冲突。请记住应该hyperref是最后一个要加载的包。

简化的序言使问题消失。

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{[email protected]}}
    
    \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{[email protected]}}
        
        \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}

相关内容