Re: Libro per conferenza

#22985
Up
0
Down
::

Ma non c’è modo di avere solo il risultato finale? Nel senso che (non so se sia possibile, credo di si, visto che il file lo fa) vorrei il comando \Author che scrive dentro una variabile il suo argomento, e così il comando \Address, etc..dopodiché, quando si chiude l’environment LTabstract, si scrivono i valori di queste variabili in ordine..

Primo tentativo: copiati questo in un file newltabs.sty
`\ProvidesPackage{newltabs}

\newtoks\auth@toks\newtoks\affil@toks

\newcommand{\Author}[3]{%
\auth@toks=\expandafter{\the\auth@toks\@authoraff{#1}{#2 #3}}%
}
\newcommand\Speaker[3]{\Author{#1}{\bfseries#2}{#3}}

\newcommand{\Address}[2]{%
\affil@toks=\expandafter{\the\affil@toks\@affil{#1}{#2}}%
}

\def\Title{\def\@title}

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

\def\LTabstract{\auth@toks{}\affil@toks{}}
\def\endLTabstract{\vbox{
\centerline{\bfseries\large\@title}
\medskip
\the\auth@toks\medskip
{\footnotesize\the\affil@toks}\bigskip
\box\abs@box}\vspace{8ex plus 4ex minus 2ex}\goodbreak}

\def\@authoraff#1#2{{#2}\,\textsuperscript{\itshape#1}\par}
\def\@affil#1#2{\textsuperscript{\itshape#1}\ #2\par}

\endinput`
Il documento di prova è
`\documentclass[a4paper]{book}
\usepackage[latin1]{inputenc}
\usepackage{newltabs}

\begin{document}

\begin{LTabstract}
\Title{Some strange materials} \Address{a}{Department of
Physics, Leiden University, 2300 RA Leiden,
Netherlands} \Address{b}{Low Temperature Laboratory,
Helsinki University of Technology, Helsinki, Finland}

\Speaker{a}{J.}{Bueno} \Author{b}{R.}{Blaauwgeers}
\Author{a}{R.}{Partapsing} \Author{a}{I.}{Taminiau}
\Author{a}{R.}{Jochemsen}
\BeginAbstract Copyright (C) 1991 by Leslie Lamport The
footnote handling is based on APS abstract style of June
26, 1989, written by Charles Karney with contributions
from Cris Barnes and Tom Murphy, but has been strongly
modified.\EndAbstract
\end{LTabstract}

\begin{LTabstract}
\Title{Some strange materials} \Address{a}{Department of
Physics, Leiden University, 2300 RA Leiden,
Netherlands} \Address{b}{Low Temperature Laboratory,
Helsinki University of Technology, Helsinki, Finland}

\Speaker{a}{J.}{Bueno} \Author{b}{R.}{Blaauwgeers}
\Author{a}{R.}{Partapsing} \Author{a}{I.}{Taminiau}
\Author{a}{R.}{Jochemsen}
\BeginAbstract Copyright (C) 1991 by Leslie Lamport The
footnote handling is based on APS abstract style of June
26, 1989, written by Charles Karney with contributions
from Cris Barnes and Tom Murphy, but has been strongly
modified.\EndAbstract
\end{LTabstract}

\end{document}`
Non dovrebbe essere troppo difficile capire come funziona 🙂 Né migliorarlo secondo le tue esigenze. Il prezzo lo conosci. 🙂

Ciao
Enrico

Go to top