- Questo topic ha 9 risposte, 2 partecipanti ed è stato aggiornato l'ultima volta 18 anni, 5 mesi fa da .
-
Topic
-
Salve..devo creare, a partire da dei sorgenti molto scarni, strutturati in questa maniera`
\begin{LTabs}
\Title{Su e giù}
\Address{Su di lì}
\Author{Bla di bla}\BeginAbstract ecco qua \EndAbstract
\end{LTabs}`
un libro di una conferenza. All’incirca ho 1500 abstract da mettere, alcuni su due colonne, altri su una colonna. Ho un file .sty che da un senso ai comandi scritti là sopra, ma non è utile (almeno a me) per poter creare il libro, in quanto mi mette un abstract per pagina, e per ogni abstract crea un box di dimensioni predefinite…
Per completezza eccolo qua
`
% ——————————————————————–
%
% LTabs.sty
%
% Style file for the preparation of abstracts for the LT25 Conference.
%
% Modification history:
% Modified for the LT25 Conference by Reyer Jochemsen
% Modified for the LT24 Conference by Yasu Takano
% Modified for the LT23 Conference by Kimitoshi Kono
% Version (1.5) for the LT22 Conference by Tomi Ruokola
%
% The original version by H.F. Braun (Hans.Braun@uni-bayreuth.de)
% is based on dpg.sty (version 2.4) by J”urgen Bachteler and
% Harald D”aubler, which provides testing for correct input
% and produces meaningful error messages (translation: H.F. Braun).
% dpg.sty, in turn, is based on
% LETTER STANDARD DOCUMENT STYLE — Released 25 March 92
% for LaTeX version 2.09
% 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.
%
% ——————————————————————–\typeout{} \typeout{============= Abstract for LT25 ==============}
\typeout{}\newdimen\LT@dimenBoxHeight % height of box for abstract
\newdimen\LT@dimenBoxWidth % width of box for abstract
\newdimen\LT@dimenHeadHeight % free space above abstract
\newdimen\LT@RightWidth % width of right column for addenda\def\LT@Sizes%
{
\def\LT@HeadHeight{8.0} % free space above abstract in cm
\def\LT@BoxHeight{9} % height of abstract in cm
\def\LT@SkipAddenda{20mm} % dist. between abstract and addenda
% (18cm-\LT@HeadHeight-\LT@BoxHeight)
\def\LT@TextSizeAddenda{\normalsize}
\def\LT@BoxWidth{16} % Width of abstract box in cm
\def\LT@LeftWidth{8cm} % Width of left column for addenda
% do some calculations:
\LT@dimenHeadHeight=\LT@HeadHeight cm
\LT@dimenBoxHeight=\LT@BoxHeight cm
\LT@dimenBoxWidth=\LT@BoxWidth cm
\LT@RightWidth=\LT@BoxWidth cm
\advance\LT@RightWidth by -\LT@LeftWidth
\advance\LT@RightWidth by -5mm
}% Use \MakeFrametrue in your document to force
% drawing of a frame of allowed size
\newif\ifMakeFrame \MakeFramefalse% True for invited papers
\newif\ifInvited \Invitedfalse\long\def\@makefntext#1{\noindent
\hangindent 5\p@\hbox
to5\p@{\hss $\m@th^{\@thefnmark}$}#1}% Two commands to open and close a savebox. Superfluous text in the
% input file between calls to these commands is ignored. These boxes
% must be closed at the beginning of a command and opened again at the
% end. The first opening and last closing is done by the environment
% `LTabstract'.\newsavebox{\LT@Waste}
\def\LT@bbox{\savebox{\LT@Waste}\bgroup}
\def\LT@ebox{\egroup}% ——————————————————————–
% Definition von \LT@IfString{string}{dann}{sonst}
% Der dann-Zweig wird ausgefuehrt, wenn string nur Buchstaben
% enthaelt.
% Andernfalls wird der sonst-Zweig ausgefuehrt.
% Spezialfall: string ist leer, dann wird der sonst-Zweig ausgefuehrt\newif\ifIfString%
\newif\ifIfLoop%
\def\IS@HoleErstesZeichen*#1#2*****{#1\edef\IS@Abfragetextspeicher{%
\IS@Abfragetextspeicher#1}\def\IS@Abfragetext{*#2*****}}%
\def\IS@ErstesZeichen{\expandafter\IS@HoleErstesZeichen%
\IS@Abfragetext}%
\def\LT@IfString#1#2#3%
{%
\def\IS@Abfragetextspeicher{}%
\def\IS@Abfragetextoriginal{#1}%
\def\IS@Abfragetext{*#1*****}%
\def\IS@LeeresMakro{******}%
\def\IS@SpaceMakro{* *****}%
\ifx\IS@Abfragetext\IS@LeeresMakro\relax%
\IfStringfalse%
\else%
\IfStringtrue\IfLooptrue%
\loop%
\ifcat a\IS@ErstesZeichen%
\ifx\IS@Abfragetext\IS@LeeresMakro\relax%
\IfLoopfalse%
\fi%
\ifx\IS@Abfragetext\IS@SpaceMakro\relax%
\IfLoopfalse%
\IfStringfalse%
\fi%
\else%
\IfLoopfalse%
\IfStringfalse%
\fi%
\ifIfLoop%
\repeat%
\fi%
\ifx\IS@Abfragetextoriginal\IS@Abfragetextspeicher\else%
\IfStringfalse\fi%
\ifIfString#2\else#3\fi%
}
% ——————————————————————–% Definition of Title:
\def\Title#1{\LT@ebox\@ifundefined{LT@TitleText}%
{\def\LT@TitleText{#1}}%
{\LT@ErrorTooMany{Title}}\LT@bbox}% Definition of Address:
\def\LT@AddressText{}
\newcounter{LT@AddressCount}\setcounter{LT@AddressCount}{1}
\def\Address#1#2%
{%
\LT@ebox
\LT@IfString{#1}{}{\LT@ErrorAddressTag}
\@ifundefined{LT@AddressCharacter#1}{}%
{\LT@ErrorDuplicateAddress{#1}}
\expandafter\edef\csname LT@AddressCharacter#1\endcsname{%
$^{\alph{LT@AddressCount}}$}
\ifnum1=\value{LT@AddressCount}
% just one address, no numbering required
\def\LT@SchalterAddressNumbering##1{}
\def\LT@AddressText{\LT@SchalterAddressNumbering%
{LT@AddressCharacter#1}#2}
\else
% more than one address, numbering required
\def\LT@SchalterAddressNumbering{\@nameuse}
% this is a potentially troublesome recursive definition
\long\edef\LT@AddressText{\LT@AddressText{}\noexpand\par
\@nameuse{LT@AddressCharacter#1}#2}
\fi
\stepcounter{LT@AddressCount}
\LT@bbox
}% body of the abstract
\long\def\BeginAbstract#1\EndAbstract%
{
\LT@ebox
\@ifundefined{LT@AbstractText}%
{\def\LT@AbstractText{%
\setcounter{footnote}{0}\def\thefootnote{\arabic{footnote}}%
#1\par}}%
{\LT@ErrorTooManyAbstracts}
\LT@bbox
}
%%%%%%%%%%We do not use the following%%%%%%%%%%%%%%%%%%%%%
% Key words
%
%\def\KEYS#1{\LT@ebox\@ifundefined{LT@KEYSText}{\def\LT@KEYSText{#1}}%
% {\LT@ErrorTooMany{KEYS}}\LT@bbox}\def\SA{\LT@ebox\@ifundefined{LT@SECTText}
{\def\LT@SECTText{Quantum gases, fluids and solids}}%
{\LT@ErrorTooMany{SECT}}\LT@bbox}
\def\SB{\LT@ebox\@ifundefined{LT@SECTText}
{\def\LT@SECTText{Superconductivity}}%
{\LT@ErrorTooMany{SECT}}\LT@bbox}
\def\SC{\LT@ebox\@ifundefined{LT@SECTText}
{\def\LT@SECTText{Magnetism and properties of solids}}%
{\LT@ErrorTooMany{SECT}}\LT@bbox}
\def\SD{\LT@ebox\@ifundefined{LT@SECTText}
{\def\LT@SECTText{Quantum electron transport}}%
{\LT@ErrorTooMany{SECT}}\LT@bbox}
\def\SE{\LT@ebox\@ifundefined{LT@SECTText}
{\def\LT@SECTText{Applications, materials and techniques}}%
{\LT@ErrorTooMany{SECT}}\LT@bbox}%%%%%%%%%%We do not use the following%%%%%%%%%%%%%%%%%%%%%
% PACS Numberss
%\def\PACS#1{\LT@ebox\@ifundefined{LT@PACSText}{\def\LT@PACSText{#1}}%
% {\LT@ErrorTooMany{PACS}}\LT@bbox}
%
% Contact person (corresponding author)
%
%\def\ContactAuthor#1#2{\LT@ebox\@ifundefined{LT@ContactAuthorText}%
% {\def\LT@ContactFirstName{#1}\def\LT@ContactLastName{#2}
% \ifx\@empty\LT@ContactFirstName \LT@ErrorNo{ContactAuthor}\fi
% \ifx\@empty\LT@ContactLastName \LT@ErrorNo{ContactAuthor}\fi
% \def\LT@ContactAuthorText{#1 \ignorespaces#2}}%
%{\LT@ErrorTooMany{ContactAuthor}}\LT@bbox}
%
%\def\Department#1{\LT@ebox\@ifundefined{LT@DepartmentText}%
% {\def\LT@DepartmentText{#1}}{\LT@ErrorTooMany{Department}}\LT@bbox}
%
%\def\Institute#1{\LT@ebox\@ifundefined{LT@InstituteText}%
% {\def\LT@InstituteText{#1}}{\LT@ErrorTooMany{Institute}}\LT@bbox}
%
%\def\StreetAddress#1{\LT@ebox\@ifundefined{LT@StreetAddressText}%
% {\def\LT@StreetAddressText{#1}}{\LT@ErrorTooMany{StreetAddress}}%
% \LT@bbox}
%
%\def\PostalCode#1{\LT@ebox\@ifundefined{LT@PostalCodeText}%
% {\def\LT@PostalCodeText{#1}}{\LT@ErrorTooMany{PostalCode}}\LT@bbox}
%
%\def\City#1{\LT@ebox\@ifundefined{LT@CityText}%
% {\def\LT@CityText{#1}}{\LT@ErrorTooMany{City}}\LT@bbox}
%
%\def\Country#1{\LT@ebox\@ifundefined{LT@CountryText}%
% {\def\LT@CountryText{#1}}{\LT@ErrorTooMany{Country}}\LT@bbox}
%
%\def\Email#1{\LT@ebox\@ifundefined{LT@EmailText}%
% {\def\LT@EmailText{#1}}{\LT@ErrorTooMany{Email}}\LT@bbox}
%
%\def\Fax#1{\LT@ebox\@ifundefined{LT@FaxText}%
% {\def\LT@FaxText{#1}}{\LT@ErrorTooMany{Fax}}\LT@bbox}
%
%\def\Phone#1{\LT@ebox\@ifundefined{LT@PhoneText}%
% {\def\LT@PhoneText{#1}}{\LT@ErrorTooMany{Phone}}\LT@bbox}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Author
\def\Author{\LT@Author{}}
\def\Speaker{\LT@Author{LT@Speak}}\newif\ifSpeakerDefined\SpeakerDefinedfalse
% Definition of LT@Author, in order to place `and' correctly:
\newcounter{LT@Count}
\newcounter{LT@AuthorCount}
\def\LT@Author#1#2#3#4%
{%
\LT@ebox
\LT@IfString{#2}{}{\LT@ErrorAuthorAddressNotString}
\@ifundefined{LT@AddressCharacter#2}%
{\LT@ErrorAuthorAddressNotDefined{#2}}{}
\stepcounter{LT@AuthorCount}
\def\test{#1}
\ifx\@empty\test
% this is an author
\expandafter\def\csname LT@Author\alph{LT@AuthorCount}\endcsname{%
#3 \ignorespaces#4%
\LT@SchalterAddressNumbering{LT@AddressCharacter#2}}
\else
% this is the speaker
\ifSpeakerDefined \LT@ErrorTooMany{Speaker} \fi
\SpeakerDefinedtrue
\expandafter\def\csname LT@Author\alph{LT@AuthorCount}\endcsname{%
\underline{#3 \ignorespaces#4}%
\LT@SchalterAddressNumbering{LT@AddressCharacter#2}}
\fi
\LT@bbox
}\def\InvitedPaper{\LT@ebox\Invitedtrue\LT@bbox}
% End of command definitions —————————————–
% Compose, executed by \end{LTabstract}:
\def\LT@Compose{
% Test if commands are missing:
\LT@TestIfMissing
}% Make the title and text boxes:
\def\LT@MakeTextbox%
{
\setbox0=\vbox{%
\hsize=\LT@dimenBoxWidth\LT@MakeTitlebox\LT@MakeBody}
}
\def\LT@MakeTitlebox%
{
% Title:
{\large\bf\LT@TitleText}\vspace{7pt}\par%
% Authors:
\setcounter{LT@Count}{1}%
{\csname LT@Author\alph{LT@Count}\endcsname}%
\ifnum \value{LT@AuthorCount}>1\relax%
\stepcounter{LT@Count}%
\ifnum \value{LT@AuthorCount}>2\relax%
\def\LT@Comma{,}%
\loop%
{, \csname LT@Author\alph{LT@Count}\endcsname}%
\stepcounter{LT@Count}%
\ifnum \value{LT@Count}<\value{LT@AuthorCount}% \repeat% \else% \def\LT@Comma{}% \fi% {% \LT@Comma{} and \csname LT@Author\alph{LT@Count}\endcsname% }% \fi\vspace{7pt}\par % Affiliations: {\LT@AddressText\vspace{7pt}\par}% } \def\LT@MakeBody{\LT@AbstractText% % % % Modified by T.O. on 21 Dec. 2001 to enlarge the space % between the body and the footnote % % \ifvoid\@footins\else\vskip3pt\par\unvbox\@footins\fi} \ifvoid\@footins\else\vskip5pt\par\unvbox\@footins\fi} % Prepare output at end of LaTeX run: \def\LT@Make{% \LT@Sizes% \LT@MakeTextbox% \unitlength=1cm\relax% \dimen0=\ht0% \advance\dimen0 by \dp0% \ifdim \dimen0>\LT@dimenBoxHeight
\def\LT@Frames{\framebox}
\else
\def\LT@Frames{\makebox}
\fi
\begin{picture}(\LT@BoxWidth,\LT@BoxHeight)(0,0)%
\ifMakeFrame
% produce a frame of allowed size for testing purposes
\put(0,0){\framebox(\LT@BoxWidth,\LT@BoxHeight){}}
\else
% produce a frame of allowed size if abstract is too long
\put(0,0){\LT@Frames(\LT@BoxWidth,\LT@BoxHeight){}}
\fi
\put(0,0){\vbox to \LT@dimenBoxHeight {\box0\vss}}%
\end{picture}%
\ifdim \dimen0>\LT@dimenBoxHeight
\@latexerr{Text too long}{Your text is too long. Please shorten.}
\advance\dimen0 by -\LT@dimenBoxHeight
\advance\dimen0 by 1cm
\par\vbox to \dimen0{\vss\hbox{Caution: Above text is too long.
Please shorten to make it fit inside the frame.}}
\fi
\vspace{\LT@SkipAddenda}\par\LT@TextSizeAddenda
% File: \jobname\vskip\baselineskip\par
% Section: \LT@SECTText\\[3mm]
% Keywords: \LT@KEYSText\\[3mm]
\ifInvited INVITED PAPER\\[3mm]\fi
\par%%%%%%%%%%We do not use the following%%%%%%%%%%%%%%%%%%%%%
% Contact person: \\ \LT@ContactAuthorText\vskip\baselineskip\par
% \parbox[t]{\LT@LeftWidth}%
% {Address:\\
% \LT@DepartmentText\\
% \LT@InstituteText\\
% \LT@StreetAddressText\\
% \LT@PostalCodeText\\
% \LT@CityText\\
% \LT@CountryText}
% \begin{tabular}[t]{@{}ll@{}}
% Email: & \LT@EmailText \\
% Fax: & \LT@FaxText\\
% Phone: & \LT@PhoneText
% \end{tabular}\hfill
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
}\newenvironment{LTabstract}{\clearpage\bgroup%
\setcounter{LT@AuthorCount}{0}\setcounter{LT@AddressCount}{1}
\LT@bbox}{\LT@ebox\LT@Compose\LT@Make\egroup}% ——————————————————————–
% Error handling\def\LT@ErrorTooMany#1%
{
\@latexerr{>#1< was defined more than once}{} } \def\LT@ErrorTooManyAbstracts% { \@latexerr{The abstract body was defined more than once}{} } \def\LT@ErrorNo#1% { \@latexerr{No >#1< was defined}{} } \def\LT@ErrorNoAuthor% { \@latexerr{No >Authors< were defined}{} } \def\LT@ErrorNoAbstract% { \@latexerr{No >Abstract Text< was given. Please place the text ^^Jbetween \string\BeginAbstract\space ... \string\EndAbstract}{} } %\def\LT@ErrorNoKEYS% %{ % \@latexerr{No >Key words< were given}{} %} %\def\LT@ErrorNoSECT% %{ % \@latexerr{No >Section< was given}{} %} \def\LT@ErrorDuplicateAddress#1% { \@latexerr{The address tag >#1< was multiply defined}{} } \def\LT@ErrorAddressTag% { \@latexerr{Illegal character in an address tag. ^^JThe tag field may contain only letters, no special characters}{} } \def\LT@ErrorAuthorAddressNotString% { \@latexerr{Illegal address tag in \string\Author\space or \string\Speaker ^^JThe tag field may contain only letters, no special characters}{} } \def\LT@ErrorAuthorAddressNotDefined#1% { \@latexerr{Address tag >#1< undefined in \string\Author\space or \string\Speaker.^^JYou need to call `\string\Address{#1}{Author's Affiliation}'}{} } \def\LT@ErrorWrongCharacter#1% { \@latexerr{File contains an illegal character >#1<. ^^JUse only 7-bit ASCII characters. ^^JRepresent special characters using TeX-notation (e.g. \string\"a )}{} } % Test if commands are missing: \def\LT@TestIfMissing% { \@ifundefined{LT@TitleText}{\LT@ErrorNo{Title}} {\ifx\@empty\LT@TitleText \LT@ErrorNo{Title}\fi} \ifnum\value{LT@AuthorCount}=0\relax\LT@ErrorNoAuthor\fi \ifSpeakerDefined\else\LT@ErrorNo{Speaker}\fi \@ifundefined{LT@AbstractText}{\LT@ErrorNoAbstract}{} % \@ifundefined{LT@KEYSText}{\LT@ErrorNoKEYS} % {\ifx\@empty\LT@KEYSText \LT@ErrorNoKEYS\fi} % \@ifundefined{LT@SECTText}{\LT@ErrorNoSECT} % {\ifx\@empty\LT@SECTText \LT@ErrorNoSECT\fi} % \@ifundefined{LT@ContactAuthorText}{\LT@ErrorNo{ContactAuthor}} % {\ifx\@empty\LT@ContactAuthorText \LT@ErrorNo{ContactAuthor}\fi} % \@ifundefined{LT@DepartmentText}{\LT@ErrorNo{Department}}{} % \@ifundefined{LT@InstituteText}{\LT@ErrorNo{Institute}}{} % \@ifundefined{LT@StreetAddressText}{\LT@ErrorNo{StreetAddress}}{} % \@ifundefined{LT@PostalCodeText}{\LT@ErrorNo{PostalCode}}{} % \@ifundefined{LT@CityText}{\LT@ErrorNo{City}} % {\ifx\@empty\LT@CityText \LT@ErrorNo{City}\fi} % \@ifundefined{LT@CountryText}{\LT@ErrorNo{Country}} % {\ifx\@empty\LT@CountryText \LT@ErrorNo{Country}\fi} % \@ifundefined{LT@EmailText}{\LT@ErrorNo{Email}} % {\ifx\@empty\LT@EmailText \LT@ErrorNo{Email}\fi} % \@ifundefined{LT@FaxText}{\LT@ErrorNo{Fax}} % {\ifx\@empty\LT@FaxText \LT@ErrorNo{Fax}\fi} % \@ifundefined{LT@PhoneText}{\LT@ErrorNo{Phone}}{} } % Layout \LT@Sizes \parindent 0pt \oddsidemargin 0pt \evensidemargin 0pt \ps@empty \headheight\LT@dimenHeadHeight \headsep 0pt \topskip 0pt % sufficiently small to fit on letter size paper \textheight 25cm % correct for headheight \advance\textheight by -\LT@dimenHeadHeight % compensate for automatic 1in margin \topmargin -1in \textwidth\LT@dimenBoxWidth \parskip 0pt % Activate all ASCII characters with code >= 128 and
% produce error message\@tempcnta=128
\loop\ifnum\@tempcnta<256
\catcode\@tempcnta=\active
\uccode`\~=\@tempcnta
\uppercase{\def~{(character ~ not allowed. Use only 7-bit ASCII.)}}
\advance\@tempcnta\@ne
\repeat% Footnotes are handled by putting them in \box\@footins.
% This is spat out by \end{LTabstract} (in \LT@MakeBody).\newbox\@footins % Declare a box for the footnotes
\def\thefootnote{\fnsymbol{footnote}} % Use symbols for footnotes
% This is redefined to \arabic{footnote} for footnotes in the main
% body of the abstract (between \BeginAbstract .. \EndAbstract)% Redefine \LaTeX's \@footnotetext
\long\def\@footnotetext#1{\global\setbox\@footins
\vbox{\unvbox\@footins
\normalsize
\hsize\LT@dimenBoxWidth \@parboxrestore
\edef\@currentlabel{\csname p@mpfootnote\endcsname\@thefnmark}
\@makefntext
{\ignorespaces #1\strut}}}\long\def\@makefntext#1{%\parindent 1em\noindent
$^{\@thefnmark}$#1\strut}\endinput
`
Ora qualche anima pia che provasse a compilare una cosa qualsiasi con la sintassi scritta sopra, con questo file .sty, e vedesse il risultato, saprebbe dirmi come ottenere lo stesso risultato (anche molto più semplice) però eliminando la restrizione che questo .sty impone (un abstract per pagina con un box personalizzato)? In pratica a me interesserebbe mantenere la struttura dei file come sopra (con ordine \title \address, etc.) ma facendo sì che gli autori vengano (nel dvi o pdf) menzionati prima degli indirizzi (come avviene compilando la sintassi sopra con questo .sty)…
Insomma, sapere come mettere dentro un contenitore le variabili da ordinare poi quando si chiude il file, con \end{LTabs}..
So che non è facile, ma un aiuto, anche piccolo, sarà graditissimo..
- Devi essere connesso per rispondere a questo topic.