[XeTeX] newcommand with optional arguments

Diederick C. Niehorster diederick at niehorster.eu
Tue Dec 2 12:56:24 CET 2008


Thanks, that did the trick.

I'm moving on now with the possessive cite command to automatically include
the correct possessive suffix, `'' for strings ending in `s', `'s' in other
cases.
This proves difficult, probably as I have never attempted to write a tex
macro before. Please find attached what I have got so far.

Now, I have two problems:
- The \posssuff{\citeauthor{#2}} on line 47 does not return the correct
suffix. This is because right now the macros simply operate on the citation
key, not on the actual author-string as will appear in the pdf.
I do not know how to query this author-string given the citation key and
then operate on it.
- The \posssuff macro doesn't work. It is supposed to test if the last
character of the input is an `s' and print different stuff based on that.
However, it seems that currently the else branch is always executed, even if
the \if should be true.

For the second problem, what am I doing wrong?
For the first; is this possible and can someone point me in the right
direction?

Any comments on the macros in general are also appreciated of course!

Thanks for your help,
Diederick

> -----Original Message-----
> From: xetex-bounces at tug.org [mailto:xetex-bounces at tug.org] On Behalf Of
Apostolos
> Syropoulos
> Sent: Monday, December 01, 2008 12:09 AM
> To: Unicode-based TeX for Mac OS X and other platforms
> Subject: Re: [XeTeX] newcommand with optional arguments
> 
> > \makeatletter
> > \long\def\tlist at if@empty at nTF #1{%
> > . . . . . . . . . . . . . . . . . . . . . . . . . . .
> > }
> > \makeatother
> 
>  Comment out the command \makeatletter and \makeatother.
> The error is created by \makeatother.
> A.S.
> 
> ----------------------
> Apostolos Syropoulos
> Xanthi, Greece
> http://obelix.ee.duth.gr/~apostolo
> http://asyropoulos.wordpress.com
> 
> 
> 
> 
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: w.tex
Type: application/octet-stream
Size: 3455 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20081202/aeef6564/attachment.obj 


More information about the XeTeX mailing list