TransWikia.com

Xypic compiling error with auctex

TeX - LaTeX Asked by Partha Pratim Ghosh on December 16, 2020

I have a problem with the following piece of code:


$xymatrix{ {X_{2}} ar@<0.6ex>[r]^-{p_{0}} ar@<-0.6ex>[r]_-{p_{1}} & {X_{1}} }$

is made into a LaTeX macro as:

newcommand{arrp}[4]{mbox{$xymatrix{ {#3} ar@<0.6ex>[r]^-{#1}ar@<-0.6ex>[r]_-{#2} & {#4} }$}}

which is called as

arrp{p}{q}{A}{B}

Normal LaTeX compilation works either way. However, for AucTeX, the former when written down in the tex file compiles with no issues. However, whenver it is written in the latter way it complains as follows:

ERROR: Argument of next@ has an extra }.

— TeX said —

par
l.186 …}}}{comp{e}{cod{}}}{Bb{X}_1}{Bb{X}_1}
.
Since from equation eqr…
— HELP —
From the .log file…

I’ve run across a }' that doesn't seem to match anything. For example, defa#1{…}’ and a}' would produce this error. If you simply proceed now, the par’ that
I’ve just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your }' was spurious, just type 2′ and it will go away.

I would appreciate your help if you could let me know where I am going wrong.

With my regards and thanks,

partha

One Answer

Please find the code here:

documentclass[12pt]{article}

usepackage{amsbsy, amsmath, amssymb, amsthm, bbold, xcolor, xspace}
usepackage[all,pdf]{xy}

usepackage{Documents/tex/essentials/symbols}  % line 1


%input{Documents/tex/essentials/symbols-command} % line 2

%newcommand{arrp}[4]{mbox{$xymatrix{ {#3} ar@<0.6ex>[r]^-{#1} ar@<-0.6ex>[r]_-{#2} %& {#4}}$}} %line 3


begin{document}


Using usual Xy-pic:
$xymatrix{ {A} ar@<0.6ex>[r]^-{f} ar@<-0.6ex>[r]_-{g} & {B}}$

Using the {tt symbols.sty} package which contains all my TeX macros:

arrp{f}{g}{A}{B}


end{document}


%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:

Let me list my attempts and their outcomes:

  • With Line 2 and Line 3 commented out, as it is now, the second parallel pair of arrows does not come, the first comes however. The errors produced is given in the code block:
./testXy.tex:21: Argument of next@ has an extra }.
<inserted text> 
                par 
l.21 arrp{f}{g}{A}{B}
                      
Runaway argument?
hdir 
./testXy.tex:21: Paragraph ended before next@ was complete.
<to be read again> 
                   par 

or

l.21 arrp{f}{g}{A}{B}
                      
./testXy.tex:21: Extra }, or forgotten $.
entrybox ...dimen@ D@p dp z@ =dimen@ boxz@ }
                                                  
l.21 arrp{f}{g}{A}{B}
                      
./testXy.tex:21: Extra }, or forgotten $.
<inserted text> egroup 
                        def Drop@@ {styledboxz@ }def Connect@@ {straig...l.21 arrp{f}{g}{A}{B}

or

l.21 arrp{f}{g}{A}{B}
                      
./testXy.tex:21: Extra }, or forgotten $.
entrybox ...dimen@ D@p dp z@ =dimen@ boxz@ }
                                                  
l.21 arrp{f}{g}{A}{B}
                      
./testXy.tex:21: Extra }, or forgotten $.
<inserted text> egroup 
                        def Drop@@ {styledboxz@ }def Connect@@ {straig...l.21 arrp{f}{g}{A}{B}

or like

./testXy.tex:21: Xy-pic error: illegal <dir>: dir [r]^-{f} not defined.
xyerror@ ...#2}fi errmessage {Xy-pic error: #1}
                                                  }
l.21 arrp{f}{g}{A}{B}
                      
./testXy.tex:21: A <box> was supposed to be here.
<to be read again> 
                   toks@ 
l.21 arrp{f}{g}{A}{B}
                      
./testXy.tex:21: Xy-pic error: illegal <dir>: dir ar@ <-0.6ex>[r]_-{g} not defined.
xyerror@ ...#2}fi errmessage {Xy-pic error: #1}
                                                  }

or

61>
./testXy.tex:24: Improper prevdepth.
newpage ...everypar {}fi par ifdim prevdepth 
                                                  >z@ vskip -ifdim prevd...l.24 end{document}
                   
./testXy.tex:24: Missing } inserted.
<inserted text> 
                }
./testXy.tex:24: Xy-pic error: An xy environment is not closed correctly..
xyerror@ ...#2}fi errmessage {Xy-pic error: #1}
                                                  }
l.24 end{document}

I have put snippets of all forms of errors that have come while the LaTeX engine was trying to find for the error. Obviously there were repetitions, which I excluded.

  • With Line 1 and Line 3 commented out and Line 2 in place, there is no problem and output is produced as expected.

  • With Line 1 and Line 2 commented there was also error:

Runaway argument?
{mbox {$xymatrix { {##3} ar @<0.6ex>[r]^-{##1} ar @<-0.6ex>[r]_-{ETC.
! File ended while scanning use of @argdef.
<inserted text> 

and the process aborted! But there is no ##1 or likewise....

Yet, the file symbols.sty is just the file symbols-command.tex made into a style file instead of making an input of .tex file. I was using these symbols for pretty long time using the *symbols-command.tex" file as input and had not problems. The problem started when I made the style file.

The line is question is obviously the construct in Line 3.

Any help would be appreciated.

With my regards and thanks,

partha

Answered by Partha Pratim Ghosh on December 16, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP