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

Alison A Baski/FS/VCU lon-capa-users@mail.lon-capa.org
Mon, 26 Feb 2007 13:07:42 -0500


This is a multipart message in MIME format.
--=_alternative 006394428525728E_=
Content-Type: text/plain; charset="US-ASCII"

Hi Todd,

THANK YOU so much for pointing out the units problem to me.  Now, I have 
exactly what I need (and know a little bit about LaTex now).

Alison






Todd Ruskell <truskell@mines.edu> 
Sent by: lon-capa-users-admin@mail.lon-capa.org
02/26/2007 11:25 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] Answer Box issue & Style File






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
_______________________________________________
LON-CAPA-users mailing list
LON-CAPA-users@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-users


--=_alternative 006394428525728E_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Hi Todd,</font>
<br>
<br><font size=2 face="sans-serif">THANK YOU so much for pointing out the
units problem to me. &nbsp;Now, I have exactly what I need (and know a
little bit about LaTex now).</font>
<br>
<br><font size=2 face="sans-serif">Alison</font>
<br>
<br>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Todd Ruskell &lt;truskell@mines.edu&gt;</b>
</font>
<br><font size=1 face="sans-serif">Sent by: lon-capa-users-admin@mail.lon-capa.org</font>
<p><font size=1 face="sans-serif">02/26/2007 11:25 AM</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
lon-capa-users@mail.lon-capa.org</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">lon-capa-users@mail.lon-capa.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [LON-CAPA-users] Answer Box issue
&amp; Style File</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><tt><font size=2>Alison,<br>
<br>
The arguments of \framebox and \parbox need units. &nbsp;Something like<br>
\parbox{150mm}<br>
<br>
Todd<br>
<br>
Alison A Baski/FS/VCU wrote:<br>
&gt; <br>
&gt; Hi Guy,<br>
&gt; <br>
&gt; Thanks for the pointers about the style file. I have created a style<br>
&gt; file (see below) that makes a box that I like when creating a PDF
file<br>
&gt; (using Selected Problems from folder).<br>
&gt; <br>
&gt; <br>
&gt; *_HOWEVER_*, when I create a &nbsp;PDF file for a student (using Selected<br>
&gt; Problems from folder for Selected People), LaTeX does not successfully<br>
&gt; parse the text file.<br>
&gt; <br>
&gt; The following error message is created:<br>
&gt; Illegal unit of measure (pt inserted).<br>
&gt; 1.8\framebox[150]{\parbox{150}{ \vspace*{1cm}}}<br>
&gt; <br>
&gt; Is there something I am doing wrong here?<br>
&gt; <br>
&gt; Thanks,<br>
&gt; Alison<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; _Style file_:<br>
&gt; &lt;definetag name=&quot;textline&quot;&gt;<br>
&gt; &lt;render&gt;<br>
&gt; &lt;tex&gt;\framebox[150]{\parbox{150}{ \vspace*{1cm}}}&lt;/tex&gt;<br>
&gt; &lt;/render&gt;<br>
&gt; &lt;/definetag&gt;<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; *Guy Albertelli II &lt;guy@albertelli.com&gt;*<br>
&gt; Sent by: lon-capa-users-admin@mail.lon-capa.org<br>
&gt; <br>
&gt; 02/26/2007 02:44 AM<br>
&gt; Please respond to<br>
&gt; lon-capa-users@mail.lon-capa.org<br>
&gt; <br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
&gt; To<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lon-capa-users@mail.lon-capa.org<br>
&gt; cc<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
&gt; Subject<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Re:
[LON-CAPA-users] Change size of &quot;Answer&quot; box appearing on PDF
printout?<br>
&gt; <br>
&gt; <br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; Hi Alison,<br>
&gt; <br>
&gt; You can turn the &lt;textline /&gt; into arbitray LaTeX code for printing.<br>
&gt; <br>
&gt; You'll need to create in CSTR a lon-capa style file<br>
&gt; <br>
&gt; (in CSTR<br>
&gt; Select action 'New Style File:' and give it a name.)<br>
&gt; <br>
&gt; In the edit mode change the contents of the .sty file to<br>
&gt; <br>
&gt; &lt;definetag name=&quot;textline&quot;&gt;<br>
&gt; &nbsp; &nbsp;&lt;render&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &lt;tex&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LaTeX you'd prefer to appear
in replacment of the existing<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;box. Examples of what you
would want here are later in this<br>
&gt; email.<br>
&gt; &nbsp; &nbsp; &nbsp; &lt;/tex&gt;<br>
&gt; &nbsp; &nbsp;&lt;/render&gt;<br>
&gt; &lt;/definetag&gt;<br>
&gt; <br>
&gt; Then publish this .sty file.<br>
&gt; <br>
&gt; Enter your course and<br>
&gt; - Click Main Menu<br>
&gt; - Click PARM<br>
&gt; - Click 'Set Course Environment'<br>
&gt; - Change the field 'Default XML Style File' to point to the file you<br>
&gt; &nbsp;just published. (You can use the 'Select Style File' link to
get a<br>
&gt; &nbsp;window to navigate to it and pick it.)<br>
&gt; - Click 'Set Course Environment' to make this take effect<br>
&gt; <br>
&gt; Now if you navigate to the problem and print it should have the change<br>
&gt; you wanted.<br>
&gt; <br>
&gt; - this is a global change to your course, all problems that have a<br>
&gt; &nbsp;textline will print with the above change as long as the 'Default<br>
&gt; &nbsp;XML Style File' is set to this. By deleting this set value the<br>
&gt; &nbsp;printing will revert back to the way it worked before.<br>
&gt; &nbsp;(Ther are ways to work around this using the &lt;block&gt; tag
inside of<br>
&gt; &nbsp;the &lt;tex&gt; tag in the .sty file, but I'll save that for
a later email<br>
&gt; &nbsp;if still needed/wanted.)<br>
&gt; <br>
&gt; - If you want to change the effects of the sty file, chanign the sty<br>
&gt; &nbsp;and re-publishing it will take effect immeadiately if the PARM
is<br>
&gt; &nbsp;set fo the course.<br>
&gt; <br>
&gt; Some examples of what to put between the &lt;tex&gt;&lt;/tex&gt;and
their effects:<br>
&gt; <br>
&gt; This will leave a 3cm gap where the box previously appeared:<br>
&gt; <br>
&gt; &nbsp;&lt;tex&gt;\vspace*{3cm}&lt;/tex&gt;<br>
&gt; <br>
&gt; <br>
&gt; This will create a box the width of the column of the sheet, and 3cm<br>
&gt; tall:<br>
&gt; <br>
&gt; &nbsp;&lt;tex&gt;\framebox[\textwidth]{\parbox{\textwidth}{ \vspace*{3cm}
}}&lt;/tex&gt;<br>
&gt; <br>
&gt; <br>
&gt; This will crate a box with 2 lines around it the width of a column
of<br>
&gt; the sheet, ad 3cm tall:<br>
&gt; <br>
&gt; &nbsp;&lt;tex&gt;\fbox{\framebox[\textwidth]{\parbox{\textwidth}{<br>
&gt; \vspace*{3cm}}}}&lt;/tex&gt;<br>
&gt; <br>
&gt; <br>
&gt; Hopefully this will work better for you?<br>
&gt; <br>
&gt; <br>
&gt; -- <br>
&gt; guy@albertelli.com &nbsp; 0-7-0-9-27,137<br>
&gt; _______________________________________________<br>
&gt; LON-CAPA-users mailing list<br>
&gt; LON-CAPA-users@mail.lon-capa.org<br>
&gt; http://mail.lon-capa.org/mailman/listinfo/lon-capa-users<br>
&gt; <br>
<br>
-- <br>
Dr. Todd Ruskell<br>
Senior Lecturer, Department of Physics &nbsp; &nbsp; &nbsp; Office: &nbsp;Meyer
Hall 326<br>
Colorado School of Mines &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; Phone: 303-384-2080<br>
1523 Illinois Street &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; Fax: 303-273-3919<br>
Golden, CO 80401<br>
_______________________________________________<br>
LON-CAPA-users mailing list<br>
LON-CAPA-users@mail.lon-capa.org<br>
http://mail.lon-capa.org/mailman/listinfo/lon-capa-users<br>
</font></tt>
<br>
--=_alternative 006394428525728E_=--