LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

 Options: Use Classic View Use Proportional Font Show Text Part by Default Show All Mail Headers Topic: [<< First] [< Prev] [Next >] [Last >>]

 Re: xparse Lars Hellström <[log in to unmask]> Tue, 1 Sep 2009 17:10:30 +0200 text/plain (33 lines) Joseph Wright skrev: > Lars Hellström wrote: >> I was thinking more about single spaces, as in >> >> \moveto 0 0 \curveto 47 0 100 53 100 100 >> >> (the idea being to express a bunch of graphic data compactly while still >> allowing the code to survive reflowing in a text editor), but this is of >> course on the boundary of what can be considered LaTeX2e-ish syntax. > > Personally, I'm not a fan of that input syntax: I prefer something like > the pgf approach. The idea was indeed that these should boil down to \pgfpathqmoveto and \pgfpathqcurveto respectively; I just wanted something more compact at FMi-level -2 (or thereabout). (So everything would be in a special environment, and instead of \moveto the command name might really be \M.) > However, I did a quick test and as I hoped you can do > this with > > \DeclareDocumentCommand \moveto { u{~} u{~} } { ... } > > Not sure how robust this is, but if you really want to do it you can at > least have a go. I'll hopefully do it using \def fairly soon (need to generate the curve data first), but my concern was rather for someone in the far future who might not have \def readily available and thus wanting to go via \DeclareDocumentCommand instead. Lars Hellström