- Questo topic ha 6 risposte, 3 partecipanti ed è stato aggiornato l'ultima volta 5 anni, 4 mesi fa da .
-
Topic
-
Salve a tutti. Sto lavorando sul mio CV (partendo dal modello Awesome CV) e ho ottenuto un risultato che mi soddisfa molto. Ci sono alcune cose che non riesco a risolvere (a parte gli innumerevoli Overfull /hbox too wide, che ormai ho smesso di considerare), in particolare da poco tempo non riesco a suddividere il corpo di una sezione spalmandolo tra la fine di una pagina e l’inizio di una successiva, perché mi si sposta direttamente tutto iniziando dalla pagina successiva, lasciano parecchio spazio a fine pagina precedente. Ho allegato uno screenshot per capire il problema. Vi metto il contenuto del file .cls (lavoro su Overleaf) qui sotto spoiler; sapete aiutarmi? Grazie!Spoiler
\ProvidesClass{aw-cv}[2017/02/05 v1.6.1 Awesome Curriculum Vitae Class]
\NeedsTeXFormat{LaTeX2e}\DeclareOption{draft}{\setlength\overfullrule{5pt}}% Options for draft or final
\DeclareOption{final}{\setlength\overfullrule{0pt}}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}% Inherit options of article
\ProcessOptions\relax
\LoadClass{article}\RequirePackage{array}% Needed to make fixed length table
\RequirePackage{enumitem}% Needed to handle list environment
\RequirePackage{ragged2e}% Needed to handle text alignment
\RequirePackage{geometry}% Needed to configure page layout
\RequirePackage{fancyhdr}% Needed to make header & footer efficiently
\RequirePackage{xcolor}% Needed to manage colors
\RequirePackage{ifxetex}% Needed to use \ifxetex-\else-\fi statement
\RequirePackage{xifthen}% Needed to use \if-\then-\else statement
\RequirePackage{etoolbox}% Needed to use a toolbox of programming tools
\RequirePackage{setspace}% Needed to change line spacing in specific environment
\RequirePackage[quiet]{fontspec}% Needed to manage fonts
% \defaultfontfeatures{Ligatures=TeX}% To support LaTeX quoting style
\RequirePackage{unicode-math}% Needed to manage math fonts
\RequirePackage{fontawesome}% Needed to use icons from font-awesome
\RequirePackage[default,opentype]{sourcesanspro}
\RequirePackage[skins]{tcolorbox}% Needed for the photo ID
\RequirePackage{parskip}% Needed to deal a paragraphs
\RequirePackage[hidelinks,unicode]{hyperref}% Needed to deal hyperlink
\hypersetup{pdftitle={}, pdfauthor={}, pdfsubject={}, pdfkeywords={}}\newcommand*{\fontdir}[1][fonts/]{\def\@fontdir{#1}}
\fontdir%——————————————————————————-
% LAYOUT
%——————————————————————————-
\geometry{left=2cm, top=2cm, right=2cm, bottom=2cm, footskip=.5cm}%% Header & Footer
\fancyhfoffset{0em}% Set offset to each header and footer
\renewcommand{\headrulewidth}{0pt}% Remove head rule
\fancyhf{}% Clear all header & footer fields
\pagestyle{fancy}% Enable if you want to make header or footer using fancyhdr%——————————————————————————-
% COLORS
%——————————————————————————-
\definecolor{darktext}{HTML}{414141}
\colorlet{text}{darkgray}
\colorlet{graytext}{gray}
\colorlet{lighttext}{lightgray}
\definecolor{awesome-red}{HTML}{DC3522}
\definecolor{blue}{HTML}{2932B2}
\colorlet{awesome}{awesome-red}
\colorlet{blue}{blue}
\newbool{acvSectionColorHighlight}
\setbool{acvSectionColorHighlight}{true}
\def\@sectioncolor#1#2#3#4#5{\ifbool{acvSectionColorHighlight}{{\color{awesome}#1#2#3#4#5}}{#1#2#3#4#5}}%——————————————————————————-
% FONTS
%——————————————————————————-
\setfontfamily\headerfont[Path=\@fontdir, UprightFont=*-Regular, ItalicFont=*-Italic, BoldFont=*-Bold, BoldItalicFont=*-BoldItalic,]{Roboto}
\setfontfamily\headerfontlight[ Path=\@fontdir, UprightFont=*-Thin, ItalicFont=*-ThinItalic, BoldFont=*-Medium, BoldItalicFont=*-MediumItalic,]{Roboto}
\newcommand*{\footerfont}{\sourcesanspro}
\newcommand*{\bodyfont}{\sourcesanspro}
\newcommand*{\bodyfontlight}{\sourcesansprolight}%——————————————————————————-
% Configuration for styles
%——————————————————————————-
% LAYOUT
\newcommand*{\headerfirstnamestyle}[1]{{\fontsize{32pt}{1em}\headerfontlight\color{graytext} #1}}
\newcommand*{\headerlastnamestyle}[1]{{\fontsize{32pt}{1em}\headerfont\bfseries\color{text} #1}}
\newcommand*{\headerpositionstyle}[1]{{\fontsize{7.6pt}{1em}\bodyfont\scshape\color{awesome} #1}}
\newcommand*{\headeraddressstyle}[1]{{\fontsize{8pt}{1em}\headerfont\itshape\color{graytext} #1}}
\newcommand*{\headersocialstyle}[1]{{\fontsize{7pt}{1em}\bodyfont\color{text} #1}}
\newcommand*{\headerquotestyle}[1]{{\fontsize{9pt}{1em}\bodyfont\itshape\color{darktext} #1}}
\newcommand*{\footerstyle}[1]{{\fontsize{8pt}{1em}\footerfont\scshape\color{lighttext} #1}}
\newcommand*{\sectionstyle}[1]{{\fontsize{16pt}{1em}\bodyfont\bfseries\color{text}\@sectioncolor #1}}
\newcommand*{\subsectionstyle}[1]{{\fontsize{12pt}{1em}\bodyfont\scshape\textcolor{text}{#1}}}
\newcommand*{\paragraphstyle}{\fontsize{9pt}{1em}\bodyfontlight\upshape\color{text}}
% ENTRIES
\newcommand*{\entrytitlestyle}[1]{{\fontsize{9pt}{1em}\bodyfont\scshape\color{graytext} #1}}
\newcommand*{\entrypositionstyle}[1]{{\fontsize{10pt}{1em}\bodyfont\bfseries\color{darktext} #1}}
\newcommand*{\entrydatestyle}[1]{{\fontsize{9pt}{1em}\bodyfont\color{graytext} #1}}
\newcommand*{\entrylocationstyle}[1]{{\fontsize{8pt}{1em}\bodyfontlight\slshape\color{awesome} #1}}
\newcommand*{\thesis}[1]{{\fontsize{8pt}{1em}\bodyfont\scshape\color{text} #1}}
\newcommand*{\entrysinglestyle}[1]{{\fontsize{8pt}{1em}\bodyfont\textit\color{text} #1}}
\newcommand*{\entryalbumstyle}[1]{{\fontsize{8pt}{1em}\bodyfont\textit\color{text} #1}}
% PROJECTS
\newcommand*{\projecttitlestyle}[1]{{\fontsize{9pt}{1em}\bodyfont\scshape\color{graytext} #1}}
\newcommand*{\projectpositionstyle}[1]{{\fontsize{10pt}{1em}\bodyfont\bfseries\color{darktext} #1}}
\newcommand*{\projectdatestyle}[1]{{\fontsize{9pt}{1em}\bodyfont\color{graytext} #1}}
% HONORS
\newcommand*{\honortitlestyle}[1]{{\fontsize{9pt}{1em}\bodyfont\color{graytext} #1}}
\newcommand*{\honorpositionstyle}[1]{{\fontsize{10pt}{1em}\bodyfont\bfseries\color{darktext} #1}}
\newcommand*{\honordatestyle}[1]{{\fontsize{9pt}{1em}\bodyfont\color{graytext} #1}}
\newcommand*{\honorlocationstyle}[1]{{\fontsize{8pt}{1em}\bodyfontlight\slshape\color{awesome} #1}}
% SKILLS
\newcommand*{\skilltypestyle}[1]{{\fontsize{10pt}{1em}\bodyfont\bfseries\color{darktext} #1}}
\newcommand*{\skillsetstyle}[1]{{\fontsize{9pt}{1em}\bodyfontlight\scshape\color{text} #1}}
%——————————————————————————-
% Commands for personal information
%——————————————————————————-
% Define photo ID
% Usage: \photo[circle|rectangle,edge|noedge,left|right]{}
\newcommand{\photo}[2][circle,edge,left]{\def\@photo{#2}\@for\tmp:=#1\do{\ifthenelse{\equal{\tmp}{circle} \or \equal{\tmp}{rectangle}}
{\let\@photoshape\tmp}{}\ifthenelse{\equal{\tmp}{edge} \or \equal{\tmp}{noedge}}
{\let\@photoedge\tmp}{}\ifthenelse{\equal{\tmp}{left} \or \equal{\tmp}{right}}
{\let\@photoalign\tmp}{}}}
\def\@photoshape{circle}
\def\@photoedge{edge}
\def\@photoalign{left}\newcommand*{\name}[2]{\def\@firstname{#1}\def\@lastname{#2}} % Usage: \name{
}{ }
\newcommand*{\firstname}[1]{\def\@firstname{#1}} % Usage: \firstname{}
\newcommand*{\lastname}[1]{\def\@lastname{#1}} % Usage: \lastname{}
\newcommand*{\address}[1]{\def\@address{#1}}
\newcommand*{\position}[1]{\def\@position{#1}}
\newcommand*{\mobile}[1]{\def\@mobile{#1}}
\newcommand*{\email}[1]{\def\@email{#1}}
\newcommand*{\facebook}[1]{\def\@facebook{#1}}
\newcommand*{\instagram}[1]{\def\@instagram{#1}}
\newcommand*{\spotify}[1]{\def\@spotify{#1}}
\newcommand*{\skype}[1]{\def\@skype{#1}} % Usage: \skype{}
\newcommand*{\youtube}[1]{\def\@youtube{#1}}%——————————————————————————-
% Commands for extra
%——————————————————————————-
%% Define helper macros a user can change easily
% Header
\newcommand{\acvHeaderNameDelim}{\space}
\newcommand{\acvHeaderAfterNameSkip}{.4mm}
\newcommand{\acvHeaderAfterPositionSkip}{.4mm}
\newcommand{\acvHeaderAfterAddressSkip}{.4mm}
\newcommand{\acvHeaderIconSep}{\space\space}
\newcommand{\acvHeaderSocialSep}{\quad\textbar\quad}
\newcommand{\acvHeaderAfterSocialSkip}{6mm}
\newcommand{\acvHeaderAfterQuoteSkip}{5mm}% Others
\newcommand{\acvSectionTopSkip}{3mm}
\newcommand{\acvSectionContentTopSkip}{2.5mm}%——————————————————————————-
% Commands for utilities
%——————————————————————————-
% Use to align an element of tabular table
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}% Use to draw horizontal line with specific thickness
\def\vhrulefill#1{\leavevmode\leaders\hrule\@height#1\hfill \kern\z@}% Use to execute conditional statements by checking empty string
\newcommand*{\ifempty}[3]{\ifthenelse{\isempty{#1}}{#2}{#3}}%——————————————————————————-
% Commands for elements of CV structure
%——————————————————————————-
% Define a header for CV
% Usage: \makecvheader
\newcommand*{\makecvheader}[1][C]{\newcommand*{\drawphoto}{\ifthenelse{\isundefined{\@photo}}{}{\newlength{\photodim}
\ifthenelse{\equal{\@photoshape}{circle}}
{\setlength{\photodim}{1.3cm}}
{\setlength{\photodim}{1.8cm}}
\ifthenelse{\equal{\@photoedge}{edge}}
{\def\@photoborder{darkgray}}
{\def\@photoborder{none}}
\begin{tikzpicture}
\node[\@photoshape, draw=\@photoborder, line width=0.3mm, inner sep=\photodim, fill overzoom image=\@photo] () {};
\end{tikzpicture}}}
\newlength{\headertextwidth}
\newlength{\headerphotowidth}
\ifthenelse{\isundefined{\@photo}}{
\setlength{\headertextwidth}{\textwidth}
\setlength{\headerphotowidth}{0cm}}
{\setlength{\headertextwidth}{0.76\textwidth}
\setlength{\headerphotowidth}{0.24\textwidth}}\begin{minipage}[c]{\headerphotowidth}
\ifthenelse{\equal{\@photoalign}{left}}{\raggedright\drawphoto}{}
\end{minipage}
\begin{minipage}[c]{\headertextwidth}
\ifthenelse{\equal{#1}{L}}{\raggedright}{\ifthenelse{\equal{#1}{R}}{\raggedleft}{\centering}}
\headerfirstnamestyle{\@firstname}\headerlastnamestyle{{}\acvHeaderNameDelim\@lastname}%
\\[\acvHeaderAfterNameSkip]%
\ifthenelse{\isundefined{\@position}}{}{\headerpositionstyle{\@position\\[\acvHeaderAfterPositionSkip]}}%
\ifthenelse{\isundefined{\@address}}{}{\headeraddressstyle{\@address\\[\acvHeaderAfterAddressSkip]}}%
\headersocialstyle{%
\newbool{isstart}%
\setbool{isstart}{true}%
\ifthenelse{\isundefined{\@mobile}}%
{}%
{\faWhatsapp\acvHeaderIconSep\@mobile\setbool{isstart}{false}}%
\ifthenelse{\isundefined{\@email}}%
{}%
{\ifbool{isstart}{\setbool{isstart}{false}}{\acvHeaderSocialSep}%
\href{mailto:\@email}{\faEnvelopeO\acvHeaderIconSep\@email}%
}%
\ifthenelse{\isundefined{\@skype}}%
{}%
{\ifbool{isstart}{\setbool{isstart}{false}}{\acvHeaderSocialSep}%
\faSkype\acvHeaderIconSep\@skype}%
\ifthenelse{\isundefined{\@facebook}}%
{}%
{\ifbool{isstart}{\setbool{isstart}{false}}{\\}
\href{https://www.facebook.com/\@facebook}{\faFacebookSquare\acvHeaderIconSep\@facebook}}%
\ifthenelse{\isundefined{\@instagram}}%
{}%
{\ifbool{isstart}{\setbool{isstart}{false}}{\acvHeaderSocialSep}%
\href{https://www.instagram.com/\@instagram}{\faInstagram\acvHeaderIconSep\@instagram}}%
\ifthenelse{\isundefined{\@youtube}}%
{}%
{\ifbool{isstart}{\setbool{isstart}{false}}{\acvHeaderSocialSep}%
\href{https://www.youtube.com/channel/UC8MNwPi0SNMQ32RCRHScjTQ}{\faYoutubePlay\acvHeaderIconSep\@youtube}}%
\ifthenelse{\isundefined{\@spotify}}%
{}%
{\ifbool{isstart}{\setbool{isstart}{false}}{\acvHeaderSocialSep}%
\href{https://open.spotify.com/artist/6GLxfJ0uVPHwqhbjyUDRXT}{\faSpotify\acvHeaderIconSep\@spotify}}%
\ifthenelse{\isundefined{\@extrainfo}}%
{}%
{\ifbool{isstart}{\setbool{isstart}{false}}{\acvHeaderSocialSep}%
\@extrainfo}}
\\[\acvHeaderAfterSocialSkip]%
\end{minipage}%
\begin{minipage}[c]{\headerphotowidth}%
\ifthenelse{\equal{\@photoalign}{right}}{\raggedleft\drawphoto}{}
\end{minipage}}\newcommand*{\makecvfooter}[3]{\fancyfoot{}\fancyfoot[L]{\footerstyle{#1}}\fancyfoot[C]{\footerstyle{#2}}\fancyfoot[R]{\footerstyle{#3}}}
\newcommand{\cvsection}[1]{\vspace{\acvSectionTopSkip}\sectionstyle{#1}\phantomsection \color{gray}\vhrulefill{0.9pt}}
\newcommand{\cvsubsection}[1]{\vspace{\acvSectionContentTopSkip}\vspace{-3mm}\subsectionstyle{#1}\phantomsection}
\newenvironment{cvparagraph}{\vspace{\acvSectionContentTopSkip}\vspace{-3mm}\paragraphstyle}{\par \vspace{2mm}}\newenvironment{cventries}{\vspace{\acvSectionContentTopSkip}\vspace{-2mm}
\begin{center}\setlength\tabcolsep{5pt}\setlength{\extrarowheight}{0pt}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} R{2.2cm} L{\textwidth}}}
{\end{tabular*}
\end{center}}
\newcommand*{\cventry}[4]{\entrydatestyle{#4} & \entrypositionstyle{#1} \\ & \entrytitlestyle{#2}, \entrylocationstyle{#3} \\}
\newcommand*{\cventryb}[6]{\entrydatestyle{#5} & \entrypositionstyle{#1} \\ \entrydatestyle{#6} & \thesis{#2} \\ & \entrytitlestyle{#3}, \entrylocationstyle{#4} \\}
\newcommand*{\cventryc}[8]{\entrydatestyle{#1} & \entrypositionstyle{#2} \\ \entrydatestyle{#3} & \thesis{#4} \\ \entrydatestyle{#5} & \thesis{#6} \\ & \entrytitlestyle{#7} \\}
\newcommand*{\cventryd}[6]{\entrydatestyle{#1} & \entrypositionstyle{#2} \\ \entrydatestyle{#3} & \thesis{#4} \\ & \entrytitlestyle{#5} \\}\newenvironment{cvprojects}{\vspace{\acvSectionContentTopSkip}
\vspace{-2mm}
\begin{center}
\setlength\tabcolsep{5pt}
\setlength{\extrarowheight}{0pt}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} R{2.2cm} L{\textwidth}}}{%
\end{tabular*}
\end{center}}
\newcommand*{\cvproject}[3]{\projectdatestyle{#3} & \projectpositionstyle{#1} \\ & \projecttitlestyle{#2} \\}\newenvironment{cvhonors}
{\vspace{\acvSectionContentTopSkip}
\vspace{-2mm}
\begin{center}
\setlength\tabcolsep{5pt}
\setlength{\extrarowheight}{0pt}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} R{2.2cm} L{\textwidth}}}
{\end{tabular*}
\end{center}}
\newcommand*{\cvhonor}[4]{\honordatestyle{#4} & \honorpositionstyle{#1} \\ & \honortitlestyle{#2}, \honorlocationstyle{#3} \\}\newenvironment{cvskills}
{\vspace{\acvSectionContentTopSkip}
\vspace{-2.0mm}
\begin{center}
\setlength\tabcolsep{1ex}
\setlength{\extrarowheight}{9pt}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} R{2.2cm} L{\textwidth * \real{0.9}}}}
{\end{tabular*}
\end{center}}
\newcommand*{\cvskill}[2]{\skilltypestyle{#1} & \skillsetstyle{#2} \\}
- Devi essere connesso per rispondere a questo topic.