[texhax] Latex examdesign class: bug with \ref'ing a labeled equation

Mauricio Calvao orca at if.ufrj.br
Sun May 2 00:46:48 CEST 2010


Hi Herbert

I do confirm that your fix (commmenting out the four mentioned lines) 
DOES work here; my concern now is, if you please, to understand more 
fully what those original lines were intended to do and get convinced 
that your fix does not have any unpredictable or unwanted side effect... 
Sorry but I do not quite understand what this stuff of catcode of 
"letter" and "other" mean for @ (ampersand)... At any rate, if your are 
really convinced your fix is safe (are you????), I will stand with it!

Thank you very much for your reply and fix!

Herbert Schulz wrote:
> On May 1, 2010, at 4:46 PM, Mauricio Calvao wrote:
> 
>> %% This is file `examdesign.cls',
>> ...
>> \let\exam at oldlabel=\label
>> \renewcommand{\label}[1]{\exam{\exam at oldlabel{\theversion @#1}}}
>> \let\exam at oldref=\ref
>> \renewcommand{\ref}[1]{\exam at oldref{\theversion @#1}} ...
> 
> Howdy,
> 
> Lines 1230--1233 of examdesign.cls are show above. I believe what is happening is that, since the redefinition of the label from labelname to `\theversion @labelname' is set inside the class file where @ has the cat code of a `letter' but, when the label is being read back in from the aux file the @ has a catcode of `other'. I commented out those four lines and it seems to have worked.
> 
> Just a first guess.
> 
> Good Luck,
> 
> Herb Schulz
> (herbs at wideopenwest dot com)
> 
> 
> 


-- 
#######################################
Prof. Mauricio Ortiz Calvao
Federal University of Rio de Janeiro
Institute of Physics, P O Box 68528
CEP 21941-972 Rio de Janeiro, RJ
Brazil

Email: orca at if.ufrj.br
Phone: (55)(21)25627483
Homepage: http://www.if.ufrj.br/~orca
#######################################


More information about the texhax mailing list