Forum archive 2000-2006

Šarūnas Burdulis - Brace macro expansion

Šarūnas Burdulis - Brace macro expansion

by Arnold Pizer -
Number of replies: 0
inactiveTopicBrace macro expansion topic started 6/7/2006; 11:33:09 AM
last post 6/8/2006; 9:05:09 AM
userarūnas Burdulis - Brace macro expansion  blueArrow
6/7/2006; 11:33:09 AM (reads: 508, responses: 5)
Using Webwork and PG 2.2.0. When $LBRACE and $RBRACE macros are used as in the problem context below, they do not correctly expand in HTML view as { and }. Instead 'lbrace' and 'rbrace' are generated. The same is with $LB and $RB. LBRACE() is output as 'lbrace' too. $DOLLAR and $PERCENT work correctly. Any ideas what we are missing here?

Thanks, Sarunas


loadMacros(,,,, ); ... ... ...




<| Post or View Comments |>

userMichael Gage - Re: Brace macro expansion  blueArrow
6/7/2006; 12:39:08 PM (reads: 626, responses: 0)
This is a bug. \lbrace and \rbrace are supposed to be defined in a preamble file which is loaded before running tex on the formula. For some reason the file is not being loaded. I've added this to the bug list. It may take a few days to track down how this behavior arose so that we can fix it properly without creating some new bug. :-)

-- Mike

<| Post or View Comments |>

userJohn Jones - Re: Brace macro expansion  blueArrow
6/7/2006; 1:48:53 PM (reads: 617, responses: 0)
\lbrace and \rbrace are standard commands in LaTeX, but they are only valid in math mode. Perhaps a solution would be to have $LBRACE expand to \ensuremath\lbrace in TeX mode.


<| Post or View Comments |>

userMichael Gage - Re: Brace macro expansion  blueArrow
6/7/2006; 3:53:09 PM (reads: 612, responses: 0)
That's probably a good idea, but the problem here is deeper, I think. For some reason the Tex preamble is not being read in either image or "formatted text", i.e. tth mode.

Still haven't tracked it down completely, but you can look in the bug reports to see the progress so far.

<| Post or View Comments |>

userMichael Gage - Re: Brace macro expansion  blueArrow
6/7/2006; 5:40:37 PM (reads: 618, responses: 1)
Two things to try. First, as John Jones remarks above, make sure that the \lbrace and \rbrace are inside math mode:




since TeX code is only evaluated inside one of the math modes.

This will probably fix the problem. If not

you may need to place the line:

use WeBWorK::Constants;

in the file pg/lib/WeBWorK/PG/

just after

use WeBWorK::EquationCache;

<| Post or View Comments |>

userarūnas Burdulis - Re: Brace macro expansion  blueArrow
6/8/2006; 9:05:09 AM (reads: 713, responses: 0)
Thank you!


does the trick.


<| Post or View Comments |>