[cstex] \csname a expandovani...

Zdenek Wagner zdenek.wagner at gmail.com
Sun Jun 26 10:20:00 CEST 2011


Dne 26. června 2011 7:59 Petr Tomasek <tomasek at etf.cuni.cz> napsal(a):
>
> Zdravim!
>
> mam takovouto konstrukci:
>
> \fnstyls=0\loop%
> \edef\fnstyleid{\csname fontstyleid:\the\fnstyls \endcsname}%
> \expandafter\def\csname fontstyleset:\fnstyleid \endcsname{}%
> \advance \fnstyls by 1 \ifnum \fnstyls<\fncountstyles\repeat
>
> Idea je takova, ze v makru pojmenovanem "fontstyleid:0", "fonstyleid:1",
> "fontstyleid:2"... mam identifkator a potreboval bych nastavit
> makro "fontstyleset:<identifikator>" na {} (tj. na prazdy obsah).
>
U me se to expanduje, ale havaruje to na tom, ze \fontstyleid:0 neni
definovano. S jeho expanzi si tedy TeX neumi poradit a ohlasi, ze
chybi \endcsname.

> Ovsem to nejak nefunguje, tipuji, ze v konstrukci
> "\csname fontstyleset:\fnstyleid \endcsname" se \fnstyleid neexpanduje
> dostatecne brzo. Poradite, prosim, co s tim? Zkousel jsem jeste
> pridat \expandafter, ale taky se nedarilo.
>
> (Jedna se o plain (Xe)TeX, prosim, nepiste, jak byste to delali
> v LaTeXu ;-)
>
Nejake LaTeXove balicky pro smycky sice jsou, ale stejne bych to delal
radeji plainovsky.

> Dekuji
>
> --
> Petr Tomasek <http://www.etf.cuni.cz/~tomasek>
> Jabber: butrus at jabbim.cz
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> EA 355:001  DU DU DU DU
> EA 355:002  TU TU TU TU
> EA 355:003  NU NU NU NU NU NU NU
> EA 355:004  NA NA NA NA NA
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> _______________________________________________
> csTeX mailing list
> csTeX at cs.felk.cvut.cz
> http://lists.felk.cvut.cz/mailman/listinfo/cstex
>



-- 
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz




More information about the csTeX mailing list