I'm using the classic thesis style with the \graffito command (example here). How can I modify the command below to add some vertical spacing before the text which is set to a standard value by default but can be changed by including a parameter?
% Graffiti as in GKP's book "Concrete Mathematics"
% thanks to Lorenzo Pantieri and Enrico Gregorio
\def\graffito@setup{%
\vspace{0.7em}
% \slshape\footnotesize% this was due to \slhape in above book
\itshape\footnotesize\leavevmode\color{Black}%
\parindent=0pt \lineskip=0pt \lineskiplimit=0pt %
\tolerance=2000 \hyphenpenalty=300 \exhyphenpenalty=300%
\doublehyphendemerits=100000%
\finalhyphendemerits=\doublehyphendemerits}
My first approach would be to add a \vspace{#1} into the beginning, but I'm not aware how to include (i) this parameter #1 into the definition; (ii) include a default value for the parameter. I also didn't managed to translate the code snippet below into a \newcommand definition which, as I am aware, supports default parameters.
\newcommand\graffito@setup[1][0.7em]{\vspace{#1}...}
instead (since you use LaTeX syntax anyway)? Then you can call\graffito@setup[1em]
to use something else than the default. – Skillmon Jan 15 '19 at 11:49\graffito
should do and how it is defined, what you want to do with it, and where your optional parameter should be. The easiest way to patch above's definition to include a changeable offset, is to define a length and change the definition to use that length:\newlength\mylength\setlength\mylength{.7em}
and then\vspace{\mylength}
instead of\vspace{0.7em}
. To change it, just change the length. No argument hacking needed. – Skillmon Jan 15 '19 at 12:26%
after300
and10000
are definitely not mine.;-)
– egreg Jan 15 '19 at 12:36