[LON-CAPA-users] Answer Box issue & Style File

Todd Ruskell lon-capa-users@mail.lon-capa.org
Mon, 26 Feb 2007 09:25:36 -0700


Alison,

The arguments of \framebox and \parbox need units.  Something like
\parbox{150mm}

Todd

Alison A Baski/FS/VCU wrote:
> 
> Hi Guy,
> 
> Thanks for the pointers about the style file. I have created a style
> file (see below) that makes a box that I like when creating a PDF file
> (using Selected Problems from folder).
> 
> 
> *_HOWEVER_*, when I create a  PDF file for a student (using Selected
> Problems from folder for Selected People), LaTeX does not successfully
> parse the text file.
> 
> The following error message is created:
> Illegal unit of measure (pt inserted).
> 1.8\framebox[150]{\parbox{150}{ \vspace*{1cm}}}
> 
> Is there something I am doing wrong here?
> 
> Thanks,
> Alison
> 
> 
> 
> _Style file_:
> <definetag name="textline">
> <render>
> <tex>\framebox[150]{\parbox{150}{ \vspace*{1cm}}}</tex>
> </render>
> </definetag>
> 
> 
> 
> 
> 
> *Guy Albertelli II <guy@albertelli.com>*
> Sent by: lon-capa-users-admin@mail.lon-capa.org
> 
> 02/26/2007 02:44 AM
> Please respond to
> lon-capa-users@mail.lon-capa.org
> 
> 	
> To
> 	lon-capa-users@mail.lon-capa.org
> cc
> 	
> Subject
> 	Re: [LON-CAPA-users] Change size of "Answer" box appearing on PDF printout?
> 
> 
> 	
> 
> 
> 
> 
> 
> Hi Alison,
> 
> You can turn the <textline /> into arbitray LaTeX code for printing.
> 
> You'll need to create in CSTR a lon-capa style file
> 
> (in CSTR
> Select action 'New Style File:' and give it a name.)
> 
> In the edit mode change the contents of the .sty file to
> 
> <definetag name="textline">
>    <render>
>       <tex>
>            LaTeX you'd prefer to appear in replacment of the existing
>            box. Examples of what you would want here are later in this
> email.
>       </tex>
>    </render>
> </definetag>
> 
> Then publish this .sty file.
> 
> Enter your course and
> - Click Main Menu
> - Click PARM
> - Click 'Set Course Environment'
> - Change the field 'Default XML Style File' to point to the file you
>  just published. (You can use the 'Select Style File' link to get a
>  window to navigate to it and pick it.)
> - Click 'Set Course Environment' to make this take effect
> 
> Now if you navigate to the problem and print it should have the change
> you wanted.
> 
> - this is a global change to your course, all problems that have a
>  textline will print with the above change as long as the 'Default
>  XML Style File' is set to this. By deleting this set value the
>  printing will revert back to the way it worked before.
>  (Ther are ways to work around this using the <block> tag inside of
>  the <tex> tag in the .sty file, but I'll save that for a later email
>  if still needed/wanted.)
> 
> - If you want to change the effects of the sty file, chanign the sty
>  and re-publishing it will take effect immeadiately if the PARM is
>  set fo the course.
> 
> Some examples of what to put between the <tex></tex>and their effects:
> 
> This will leave a 3cm gap where the box previously appeared:
> 
>  <tex>\vspace*{3cm}</tex>
> 
> 
> This will create a box the width of the column of the sheet, and 3cm
> tall:
> 
>  <tex>\framebox[\textwidth]{\parbox{\textwidth}{ \vspace*{3cm} }}</tex>
> 
> 
> This will crate a box with 2 lines around it the width of a column of
> the sheet, ad 3cm tall:
> 
>  <tex>\fbox{\framebox[\textwidth]{\parbox{\textwidth}{
> \vspace*{3cm}}}}</tex>
> 
> 
> Hopefully this will work better for you?
> 
> 
> -- 
> guy@albertelli.com   0-7-0-9-27,137
> _______________________________________________
> LON-CAPA-users mailing list
> LON-CAPA-users@mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
> 

-- 
Dr. Todd Ruskell
Senior Lecturer, Department of Physics       Office:  Meyer Hall 326
Colorado School of Mines                     Phone: 303-384-2080
1523 Illinois Street                         Fax: 303-273-3919
Golden, CO 80401