Re: Titoletti dei paragrafi in ambiente definito

#24627
Up
0
Down
::


😯 😕 😳 😥 😥 😥 😥 😥 😥
Il codice che ho usato fin ora si è rivelato miseramente fallato!!!
Usando
`

\newtoks\auth@toks\newtoks\affil@toks\newtoks\authN@toks
\newcommand{\Author}[3]{%
\auth@toks=\expandafter{\the\auth@toks\@authoraff{#1}{#2 #3}, }%
\authN@toks=\expandafter{\the\authN@toks {#2 #3}, }
}
\newcommand{\LastAuthor}[3]{%
\auth@toks=\expandafter{\the\auth@toks\@authoraff{#1}{#2 #3}}%
\authN@toks=\expandafter{\the\authN@toks {#2 #3}}
}
\newcommand{\Address}[2]{%
\affil@toks=\expandafter{\the\affil@toks\@affil{#1}{#2}}%
}

\newbox\abs@box
\def\BeginAbstract{\setbox\abs@box=\vbox\bgroup}
\def\EndAbstract{\egroup\goodbreak}

\def\LTabstract{\auth@toks{}\affil@toks{}}
\def\endLTabstract{\vbox{
%\centerline{\bfseries\LARGE\@section} % uso \chapter
%\vspace{1cm}
{\noindent\itshape\the\auth@toks} %
{\addcontentsline{toc}{subsection}{\footnotesize\ \itshape di \the \authN@toks}}
\vspace{0,5cm}
{\footnotesize\the\affil@toks}\bigskip
\box\abs@box}\vspace{8ex plus 4ex minus 2ex}\goodbreak\newpage}

\def\@authoraff#1#2{{#2}\,\textsuperscript{\itshape#1}}
\def\@affil#1#2{\textsuperscript{\itshape#1}\ #2\par}
`
il testo dell’abstract non può essere più lungo di una pagina perchè altrimenti nel file pdf che genero il testo esce sotto. Incredibille!!!
Ma come mai LaTex mi fa una cosa del genere???? 😥
Ok, niente, suppongo che sia colpa dell’ambiente abstract e del codice che lo genera.
Ho provato a smanettare, a inserire qua e la il comando \goodbreak (non so a cosa serve, ma a giudicare dal nome…) ma non ho ottenuto risultati. Il testo dell’abstract sfora sotto, irrimediabilmente.
`

\documentclass[10pt]{book}
\usepackege{…vari…}
\usepackage{geometry={17cm,24cm}, text={12.5 cm, 18.5 cm}, centering, heightrounded}
\begin{LTabstract}
\Title{Some strange materials}
\Address{a}{Department of Physics, Leiden University, 2300 RA Leiden}
\Address{b}{ Helsinki University of Technology, Helsinki, Finland}
\Author{a}{J.}{Bueno}
\LastAuthor{a}{R.}{Jochemsen}
\BeginAbstract
\lipsum
\lipsum
\EndAbstract
\end{LTabstract}
`
Questo è il codice di prova…
Grazie.

Go to top