ArchiveOrangemail archive

Discussion list for Xy-pic package


xy-pic.tug.org
(List home) (Recent threads) (32 other TeX Users Group lists)

Subscription Options

  • RSS or Atom: Read-only subscription using a browser or aggregator. This is the recommended way if you don't need to send messages to the list. You can learn more about feed syndication and clients here.
  • Conventional: All messages are delivered to your mail address, and you can reply. To subscribe, send an email to the list's subscribe address with "subscribe" in the subject line, or visit the list's homepage here.
  • This list contains about 783 messages, beginning May 2001
  • This list doesn't seem to be active
Report the Spam
This button sends a spam report to the moderator. Please use it sparingly. For other removal requests, read this.
Are you sure? yes no

Showing an arrow in text

Ad
Josep Maria Font 1390494080Thu, 23 Jan 2014 16:21:20 +0000 (UTC)
Hi,

I am new to the list, and hope some more experienced folks may give some help.

I am using several simple arrow diagrams made with xymatrices in a paper, and I want to show the arrow used in the diagrams in an inline comment, in ordinary text. For this I am writing this small xymatrix, containing just an arrow between two empty nodes:

$\xymatrix@C=10pt{*{}\ar[r]&*{}}$

However, when compiling, TeX complains with

> Argument of \doSpecialRotate@@ has an extra }

If I hit "s" the compilation continues, as expected, and ends by producing the wanted result, after complaining that> Runaway argument?
> \xP@doSpecialRotate@@ {\xy \nter@ \endxy \xy@ \xymatrix {\nter@ {}}}\fi \ETC.and that

> Paragraph ended before \doSpecialRotate@@ was complete.

I can't see any obvious mistake in my code, but I am aware that Xy-pic has a very complicated syntax. Any help would be appreciated.

Best,


JMaF





Aquest correu electrònic i els annexos poden contenir informació confidencial o protegida legalment i està adreçat exclusivament a la persona o entitat destinatària. Si no sou el destinatari final o la persona encarregada de rebre’l, no esteu autoritzat a llegir-lo, retenir-lo, modificar-lo, distribuir-lo, copiar-lo ni a revelar-ne el contingut. Si heu rebut aquest correu electrònic per error, us preguem que n’informeu al remitent i que elimineu del sistema el missatge i el material annex que pugui contenir. Gràcies per la vostra col·laboració.

Este correo electrónico y sus anexos pueden contener información confidencial o legalmente protegida y está exclusivamente dirigido a la persona o entidad destinataria. Si usted no es el destinatario final o la persona encargada de recibirlo, no está autorizado a leerlo, retenerlo, modificarlo, distribuirlo, copiarlo ni a revelar su contenido. Si ha recibido este mensaje electrónico por error, le rogamos que informe al remitente y elimine del sistema el mensaje y el material anexo que pueda contener. Gracias por su colaboración.

This email message and any documents attached to it may contain confidential or legally protected material and are intended solely for the use of the individual or organization to whom they are addressed. We remind you that if you are not the intended recipient of this email message or the person responsible for processing it, then you are not authorized to read, save, modify, send, copy or disclose any of its contents. If you have received this email message by mistake, we kindly ask you to inform the sender of this and to eliminate both the message and any attachments it carries from your account. Thank you for your collaboration.
Josep Maria Font 1390552694Fri, 24 Jan 2014 08:38:14 +0000 (UTC)
Surprising. Although I am using a lot of packages, after experimenting I have found that the same error appears when the command occurs in the caption of a simple figure environment. The following minimal file shows it:

--------------------------------------------------------------------
\documentclass{amsart}
\usepackage[all]{xy} % including cmtip makes no difference
\begin{document}
\begin{figure}
\[
x
\]
\caption{The arrow $\xymatrix@C=10pt{*{}\ar[r]&*{}}$ is nice.}
\end{figure}

The arrow $\xymatrix@C=10pt{*{}\ar[r]&*{}}$ is nice.

\end{document}
--------------------------------------------------------------------

It breaks with the first occurrence but not with the second. BTW, I am using Xy-pic version 3.8.8 <2012/05/24>, the one included in TeX Live 2013. And, FWIW, with TeXShop 3.26 and Mac OS X 10.8.5.

???


JMaFOn 23/01/2014, at 23:00, Philip Hirschhorn  wrote:

> I get no errors when I process the file
> --------------------------------------------------------------------
> \documentclass{amsart}
> \usepackage[all,cmtip]{xy}
> \begin{document}
>
>
> The arrow $\xymatrix@C=10pt{*{}\ar[r]&*{}}$ is nice.
>
>
> \end{document}
> --------------------------------------------------------------------
>
> Are you using some other version of the \usepackage command?
>
> Hope this helps.
>
> Phil
>
>
> On Thu, 23 Jan 2014, Josep Maria Font wrote:
>
>> Hi,
>>
>> I am new to the list, and hope some more experienced folks may give some help.
>>
>> I am using several simple arrow diagrams made with xymatrices in a paper, and I want to show the arrow used in the diagrams in an inline comment, in ordinary text. For this I am writing this small xymatrix, containing just an arrow between two empty nodes:
>>
>> $\xymatrix@C=10pt{*{}\ar[r]&*{}}$
>>
>> However, when compiling, TeX complains with
>>
>>> Argument of \doSpecialRotate@@ has an extra }
>>
>> If I hit "s" the compilation continues, as expected, and ends by producing the wanted result, after complaining that
>>
>>> Runaway argument?
>>> \xP@doSpecialRotate@@ {\xy \nter@ \endxy \xy@ \xymatrix {\nter@ {}}}\fi \ETC.
>>
>> and that
>>
>>> Paragraph ended before \doSpecialRotate@@ was complete.
>>
>> I can't see any obvious mistake in my code, but I am aware that Xy-pic has a very complicated syntax. Any help would be appreciated.
>>
>> Best,
>>
>>
>> JMaF--------------------------------------------------------------------

It breaks with the first occurrence but not with the second. BTW, I am using Xy-pic version 3.8.8 <2012/05/24>, the one included in TeX Live 2013. And, FWIW, with TeXShop 3.26 and Mac OS X 10.8.5.

???


JMaF


On 23/01/2014, at 23:00, Philip Hirschhorn  wrote:

> I get no errors when I process the file
> --------------------------------------------------------------------
> \documentclass{amsart}
> \usepackage[all,cmtip]{xy}
> \begin{document}
>
>
> The arrow $\xymatrix@C=10pt{*{}\ar[r]&*{}}$ is nice.
>
>
> \end{document}
> --------------------------------------------------------------------
>
> Are you using some other version of the \usepackage command?
>
> Hope this helps.
>
> Phil
>
>
> On Thu, 23 Jan 2014, Josep Maria Font wrote:
>
>> Hi,
>>
>> I am new to the list, and hope some more experienced folks may give some help.
>>
>> I am using several simple arrow diagrams made with xymatrices in a paper, and I want to show the arrow used in the diagrams in an inline comment, in ordinary text. For this I am writing this small xymatrix, containing just an arrow between two empty nodes:
>>
>> $\xymatrix@C=10pt{*{}\ar[r]&*{}}$
>>
>> However, when compiling, TeX complains with
>>
>>> Argument of \doSpecialRotate@@ has an extra }
>>
>> If I hit "s" the compilation continues, as expected, and ends by producing the wanted result, after complaining that
>>
>>> Runaway argument?
>>> \xP@doSpecialRotate@@ {\xy \nter@ \endxy \xy@ \xymatrix {\nter@ {}}}\fi \ETC.
>>
>> and that
>>
>>> Paragraph ended before \doSpecialRotate@@ was complete.
>>
>> I can't see any obvious mistake in my code, but I am aware that Xy-pic has a very complicated syntax. Any help would be appreciated.
>>
>> Best,
>>
>>
>> JMaF



Aquest correu electrònic i els annexos poden contenir informació confidencial o protegida legalment i està adreçat exclusivament a la persona o entitat destinatària. Si no sou el destinatari final o la persona encarregada de rebre’l, no esteu autoritzat a llegir-lo, retenir-lo, modificar-lo, distribuir-lo, copiar-lo ni a revelar-ne el contingut. Si heu rebut aquest correu electrònic per error, us preguem que n’informeu al remitent i que elimineu del sistema el missatge i el material annex que pugui contenir. Gràcies per la vostra col·laboració.

Este correo electrónico y sus anexos pueden contener información confidencial o legalmente protegida y está exclusivamente dirigido a la persona o entidad destinataria. Si usted no es el destinatario final o la persona encargada de recibirlo, no está autorizado a leerlo, retenerlo, modificarlo, distribuirlo, copiarlo ni a revelar su contenido. Si ha recibido este mensaje electrónico por error, le rogamos que informe al remitente y elimine del sistema el mensaje y el material anexo que pueda contener. Gracias por su colaboración.

This email message and any documents attached to it may contain confidential or legally protected material and are intended solely for the use of the individual or organization to whom they are addressed. We remind you that if you are not the intended recipient of this email message or the person responsible for processing it, then you are not authorized to read, save, modify, send, copy or disclose any of its contents. If you have received this email message by mistake, we kindly ask you to inform the sender of this and to eliminate both the message and any attachments it carries from your account. Thank you for your collaboration.
Josep Maria Font 1390599152Fri, 24 Jan 2014 21:32:32 +0000 (UTC)
Just to report on the solution of the problem below, courtesy of Philip Hirschhorn.

After some experimenting, it seems that the error appears in minimal examples, but only when the offending \xymatrix occurs in the argument of a \caption{...} (the original situation) or of a \section{...} commands. Encapsulating the whole \xymatrix into a user-defined command, and using it in such places together with a \protect command in front of it solved the issue.

It is not clear *why* this happens, anyway (the error mentions \xP@doSpecialRotate@@).

Best,


JMaFOn Thu, 23 Jan 2014, Josep Maria Font wrote:

> Hi,
>
> I am new to the list, and hope some more experienced folks may give some help.
>
> I am using several simple arrow diagrams made with xymatrices in a paper, and I want to show the arrow used in the diagrams in an inline comment, in ordinary text. For this I am writing this small xymatrix, containing just an arrow between two empty nodes:
>
> $\xymatrix@C=10pt{*{}\ar[r]&*{}}$
>
> However, when compiling, TeX complains with
>
>> Argument of \doSpecialRotate@@ has an extra }
>
> If I hit "s" the compilation continues, as expected, and ends by producing the wanted result, after complaining that
>
>> Runaway argument?
>> \xP@doSpecialRotate@@ {\xy \nter@ \endxy \xy@ \xymatrix {\nter@ {}}}\fi \ETC.
>
> and that
>
>> Paragraph ended before \doSpecialRotate@@ was complete.
>
> I can't see any obvious mistake in my code, but I am aware that Xy-pic has a very complicated syntax. Any help would be appreciated.
>
> Best,
>
>
> JMaFAquest correu electrònic i els annexos poden contenir informació confidencial o protegida legalment i està adreçat exclusivament a la persona o entitat destinatària. Si no sou el destinatari final o la persona encarregada de rebre’l, no esteu autoritzat a llegir-lo, retenir-lo, modificar-lo, distribuir-lo, copiar-lo ni a revelar-ne el contingut. Si heu rebut aquest correu electrònic per error, us preguem que n’informeu al remitent i que elimineu del sistema el missatge i el material annex que pugui contenir. Gràcies per la vostra col·laboració.

Este correo electrónico y sus anexos pueden contener información confidencial o legalmente protegida y está exclusivamente dirigido a la persona o entidad destinataria. Si usted no es el destinatario final o la persona encargada de recibirlo, no está autorizado a leerlo, retenerlo, modificarlo, distribuirlo, copiarlo ni a revelar su contenido. Si ha recibido este mensaje electrónico por error, le rogamos que informe al remitente y elimine del sistema el mensaje y el material anexo que pueda contener. Gracias por su colaboración.

This email message and any documents attached to it may contain confidential or legally protected material and are intended solely for the use of the individual or organization to whom they are addressed. We remind you that if you are not the intended recipient of this email message or the person responsible for processing it, then you are not authorized to read, save, modify, send, copy or disclose any of its contents. If you have received this email message by mistake, we kindly ask you to inform the sender of this and to eliminate both the message and any attachments it carries from your account. Thank you for your collaboration.
Ross Moore 1390603863Fri, 24 Jan 2014 22:51:03 +0000 (UTC)
Hello Josep, Kris Rose and others,On 25/01/2014, at 9:44 AM, Josep Maria Font wrote:

> Just to report on the solution of the problem below, courtesy of Philip Hirschhorn.
> 
> After some experimenting, it seems that the error appears in minimal examples, but only when the offending \xymatrix occurs in the argument of a \caption{...} (the original situation) or of a \section{...} commands.Is this any different to when using other *fragile* commands within such a setting?
(Yes it is; see further down!)

This works fine for me:

   \caption{The arrow $\protect\xymatrix@C=10pt{*{}\protect\ar[r]&*{}}$ is nice.}

except ...

> Encapsulating the whole \xymatrix into a user-defined command, and using it in such places together with a \protect command in front of it solved the issue.

  ... when  \listoffigures  is actually called.

Now the problem becomes one of the category code of '@'.

viz. we have this line in the  .lof  file:

\contentsline {figure}{\numberline {1}{\ignorespaces The arrow $\xymatrix @C=10pt{*{}\ar [r]&*{}}$ is nice.}}{1}



But when the .lof file is input the category code of '@' is 11;
viz.

\listoffigures ->\@starttoc {lof}\listfigurename 

\@starttoc #1#2->\begingroup \setTrue {#1}\par \removelastskip \vskip \z@skip \
@startsection {}\@M \z@ {\linespacing \@plus \linespacing }{.5\linespacing }{\c
entering \contentsnamefont }{#2}\ifx \contentsname #2\else \addcontentsline {to
c}{section}{#2}\fi \makeatletter \@input {\jobname .#1}\if@filesw \@xp \newwrit
e \csname tf@#1\endcsname \immediate \@xp \openout \csname tf@#1\endcsname \job
name .#1\relax \fi \global \@nobreakfalse \endgroup \addvspace {32\p@ \@plus 14
\p@ }\let \tableofcontents \relax 
#1<-lof
#2<-\listfigurename 


See those commands:  \makeatletter \@input {\jobname .#1} 


This is presumably because many packages, and LaTeX itself, 
can write internal commands into auxiliary files, where @ is part
of the command name.

Unfortunately, this will kill Xy-pic's parsing of:  \xymatrix @C=10pt


\xymatrix@setup ->\ifx \space@ \next 
 \expandafter \DN@ \space {\xyFN@ \xymatrix@setup }\else 
 \ifx \bgroup \next \let \next@ =\xymatrix@ii \else 
 \addAT@ \ifx \next \addAT@ \DN@ {\xy@ {@}{}\xyFN@ \xymatrix@at }\else 
 \ifx "\next \let \next@=\xymatrix@prefix \else 
 \DN@ {\xyerror@ {\string \xymatrix <setup>{<rows>} expected}{}}%
 \fi \fi \fi \fi \next@ 
{\ifx}
{false} % <--- next character is not a space
{\ifx}
{false} % <--- next character is not a '{'

\addAT@ #1->#1@
#1<-\ifx 
{\ifx}
{false} % <--- next character is not an '@'-symbol
{\ifx}
{false} % <--- next character is not a '"'


 ... but the next character is an '@'-letter !!!


[to Kris Rose: 
  we need an extra line or two here in \xymatrix@setup 
  to cope with this possibility, which isn't that unusual!
]> 
> It is not clear *why* this happens, anyway (the error mentions \xP@doSpecialRotate@@).Your solution of defining the Xy-pic coding as the expansion of 
a macro is the best solution,
(which must come *before*  \listoffigures  is called; e.g. in the preamble)
provided either:

 a.  you call that macro with  \protect inside a \caption  or  \section

OR
 b. use  \DeclareRobustCommand  to make the macro definition.
    Now the  \protect  is not unnecessary.

\DeclareRobustCommand{\myxycaption}{\xymatrix@C=10pt{*{}\protect\ar[r]&*{}}}

\caption{The arrow $\myxycaption$ is nice.}> 
> Best,
> 
> 
> JMaFHope this helps,

	Ross------------------------------------------------------------------------
Ross Moore                                        
Mathematics Department                           office: E7A-206      
Macquarie University                             tel: +61 (0)2 9850 8955
Sydney, Australia  2109                          fax: +61 (0)2 9850 8114
Josep Maria Font 1390727981Sun, 26 Jan 2014 09:19:41 +0000 (UTC)
On 25/01/2014, at 1:02, Ross Moore  wrote:

> Hope this helps,Your analysis helped a lot to understand *why* the error was happening, at least to those of us who are just *users* of this wonderful package. Understanding the whys of everything is (should be ?) the major goal of any mathematician.

And, yes, Philip had already warned me of defining the macro before using \listoffigures. And your reminder about \DeclareRobustCommand is also welcome...

Best,


JMaF



Aquest correu electrònic i els annexos poden contenir informació confidencial o protegida legalment i està adreçat exclusivament a la persona o entitat destinatària. Si no sou el destinatari final o la persona encarregada de rebre’l, no esteu autoritzat a llegir-lo, retenir-lo, modificar-lo, distribuir-lo, copiar-lo ni a revelar-ne el contingut. Si heu rebut aquest correu electrònic per error, us preguem que n’informeu al remitent i que elimineu del sistema el missatge i el material annex que pugui contenir. Gràcies per la vostra col·laboració.

Este correo electrónico y sus anexos pueden contener información confidencial o legalmente protegida y está exclusivamente dirigido a la persona o entidad destinataria. Si usted no es el destinatario final o la persona encargada de recibirlo, no está autorizado a leerlo, retenerlo, modificarlo, distribuirlo, copiarlo ni a revelar su contenido. Si ha recibido este mensaje electrónico por error, le rogamos que informe al remitente y elimine del sistema el mensaje y el material anexo que pueda contener. Gracias por su colaboración.

This email message and any documents attached to it may contain confidential or legally protected material and are intended solely for the use of the individual or organization to whom they are addressed. We remind you that if you are not the intended recipient of this email message or the person responsible for processing it, then you are not authorized to read, save, modify, send, copy or disclose any of its contents. If you have received this email message by mistake, we kindly ask you to inform the sender of this and to eliminate both the message and any attachments it carries from your account. Thank you for your collaboration.
Home | About | Privacy