Variantni definice

Stepan Kasal kasal at matsrv.math.cas.cz
Wed Aug 7 11:32:12 CEST 2002


On Tue, 6 Aug 2002 13:18:12 +0000 (UTC), Matej Cepl <matej at ceplovi.cz> wrote:
>     \newcommand{\fcite}[1]{\footnote{\cite{#1}}}
>     \newcommand{\ffcite}[2]{\footnote{\cite[#2]{#1}}}

Ahoj Mateji,
	pokud bys chtel pouzit nepovinny parametr, jak jej umoznuje
\newcommand, vypadalo by to asi takto:

\newcommand \fcite [2][]{%
        \def \temptxt {#1}%
        \ifx \temptxt\empty
                \footnote {\cite{#2}}%
        \else
                \footnote {\cite[#1]{#2}}%
        \fi
}

Vedlejsi dusledek je takovy, ze \fcite[]{xxx} je totez jako \fcite{xxx},
coz pro \cite neplati, ale nemyslim, ze by to vadilo.

Stepan





More information about the csTeX mailing list