[tex-eplain] definexref and hanging indents

Oleg Katsitadze olegkat at gmail.com
Fri Jan 11 19:23:17 CET 2008


On Fri, Jan 11, 2008 at 08:50:38AM +0000, Adam Fenn wrote:
> This works, but my full macro uses a relay so that I can use extra arguments
> and these are not passed on to the xref.

You're not adding the args of \mymacroRelay to \csname #1
phrase\endcsname.  You do it in the wrong order -- you first put
\the\toks4 into \csname #1 phrase\endcsname, and then set \the\toks4
to the correct value.

How about something like this:

,----
| \def\mymacro#1#2#3#4#5#6#7#8#9{%
| \li
| \def\ArgII{#2, }%                                   surname 1
| \def\ArgIII{#3; }%                                  forename 1
| \def\ArgIV{#4, }%                                  surname 2
| \def\ArgV{#5; }%                                   forename 2
| \def\ArgVI{#6, }%                                  surname 3
| \def\ArgVII{#7; }%                                 forename 3
| \def\ArgVIII{#8, }%                                surname 4
| \def\ArgIX{#9: }%                                  forename 4
| \begingroup
| \advance\itemnumber by -1
| \advance\itemletter by -1
| \advance\itemromannumeral by -1
| \endgroup
| \global\advance\ldxrefcount by1
| \toks4={\smallskip\noindent
|     \hangindent=1em\hangafter=1
|     #2, #3; #4, #5; #6, #7; #8, #9: }%
| \mymacroRelay{#1}
| }
|
| \def\mymacroRelay#1#2#3#4#5#6{%
| \toks6={`#2', #6. }%
| \global\expandafter\edef\csname #1 phrase\endcsname{%
|   \the\toks4 \the\toks6 }%
|  \definexref{#1}{[\marker]}{}%
| \ArgII
| \ArgIII
| \ArgIV
| \ArgV
| \ArgVI
| \ArgVII
| \ArgVIII
| \ArgIX
| `#2',            % article title
| {\it #3},       % journal
| #4               % number
| (#5),            % year
| #6.              % pages
| }
`----

> Thanks again for all your help Oleg.

Sure, I'm glad to be able to help.

Cheers,
Oleg


More information about the tex-eplain mailing list