Carl-

The $ and \[ notation are used by TeX and LaTeX for formatting math.  The 
symbol $ some-math-stuff $ typesets the math between the two dollar signs as 
mathematics in the current line of text.   Using double dollar signs $$mathy 
stuff$$ typesets the  mathematics as a centered formula on its own line.  This 
notation has been incorporated into Lon-Capa:
<m>$ formula $</m> displays the math inline, both on the web and in the 
generated PDF document.  <m>$$ formula $$</m> creates a centered formula both 
on the web and in the PDF.

The symbols \(  formula \) creates inline math, and \[ formula \] creates a 
centered formula.  They are almost equivalent.  In "A Guide to LaTeX" by Helmut 
Kopka and Patrick W. Daly, they explain the difference between the symbols. 
(page 118)

"\( is fragile and $ is robust"  

Elsewhere in the book they explain "fragile" and "robust." (page 23)

"The influence of certain commands is not limited to the place where they 
appear but may also affect other parts of the document.  For example, the 
sectioning commands, such as \chapter{heading}, generate the headings not only 
at the point where they are issued but also possibly at the top of each of the 
following pages in a different typeface, and perhaps once again, in yet another 
typeface, in the table of contents.  Such an argument that appears at several 
places in the document is called a moving argument .

"Moving arguments can create problems if they contain commands that are 
prematurely interpreted before they are finally applied.  Such commands are 
said to be fragile, while others that can withstand moving are called robust.  
A fragile command can still be safely used within a moving argument if it is 
preceded by \protect."

I don't know whether the 'fragile' and 'robust' qualities of \( and $ have any 
bearing within Lon-Capa, but I have always used <m>$ formula $</m> and <m>$$ 
formula $$</m> with the expected results.

For what it's worth, I often have 3 reference books nearby as I'm working on LC 
authoring: Perl, HTML, and LaTeX. ;-)

I hope this helps.

Rex Abert
Associate Professor of Mathematics
Tallahassee Community College
________________________________________
From: lon-capa-users-boun...@mail.lon-capa.org 
[lon-capa-users-boun...@mail.lon-capa.org] on behalf of Carl Lira 
[l...@egr.msu.edu]
Sent: Wednesday, December 2, 2015 3:08 PM
To: 'Discussion list for LON-CAPA users'
Subject: Re: [LON-CAPA-users] FW: printing of math

OK, this seems to occur with the 'simple course page'.

I created a 'Blank Web Page' and copied/pasted my html code from the 'simple
course page', and the pdf rendered fine (using $).

I still would like a good explanation of $ and \[.


-----Original Message-----
From: lon-capa-users-boun...@mail.lon-capa.org
[mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Carl Lira
Sent: Wednesday, December 02, 2015 2:53 PM
To: 'Discussion list for LON-CAPA users' <lon-capa-users@mail.lon-capa.org>
Subject: Re: [LON-CAPA-users] FW: printing of math

Hmm, I removed the $ before I send my inquiry. I could not recall why I had
them inserted, so I removed them and it did not work with or without the $ -
documentation needs to be improved about the function/need of the $ and \[
variants. I also tried using \[ and \], and that did not work either. Maybe
something with my math rendering settings (currently set to MathJax)?

This error is on a simple web page (I don't see a capability to envoke the
mathjax editor on a simple web page). I manually inserted the <m> and/or $
\[ so the equation occurs within the <p> tag. I tried changing the spacing
also in the event that a space was needed before/after the $ but that did
not help.

Can someone give me a good explanation of $ and \[?

Carl Lira

-----Original Message-----
From: lon-capa-users-boun...@mail.lon-capa.org
[mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Peter Dencker
Sent: Wednesday, December 02, 2015 10:42 AM
To: Discussion list for LON-CAPA users <lon-capa-users@mail.lon-capa.org>
Subject: Re: [LON-CAPA-users] FW: printing of math



OK, the inconsistency is the point. Now, the question arises how to fix.
In the interests of backward compatibility I would prefer that once working
problems should also in the future...

- Peter

On 12/02/2015 04:25 PM, Damien Guillaume wrote:
>> Why it is a bug? It seems to be import to distinguish between
>>
>>     <m> $ \widetilde{\nu}=1/\lambda $ </m> or <m> \(
>> \widetilde{\nu}=1/\lambda \) </m>
>>
>> and, on the other hand,
>>
>> <m> \[ \widetilde{\nu}=1/\lambda \] </m>
>
> The current behavior, with MathJax displaying equations as if there
> were $ delimiters while other renderers do not, is a bug because it
> leads to errors. I am not suggesting we remove delimiters at this
> point: the easiest fix (which is probably what we will do if it is not
> already
> done) is to make MathJax display fail when it is missing $ delimiters.
> It makes sense especially since MathJax only supports equations, while
> <m> is supposed to handle LaTeX outside of equation delimiters.
>
> In the future I think we should move away from non-math LaTeX (which
> would reduce this problem), but that is another topic of discussion.
>
> Damien
> _______________________________________________
> LON-CAPA-users mailing list
> LON-CAPA-users@mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users


--
Dr. Peter Dencker
    wissenschaftl. Mitarbeiter

UNIVERSITÄT ZU LÜBECK
    INSTITUT FÜR MATHEMATIK

    Ratzeburger Allee 160
    23562 Lübeck

    Tel +49 451 500 4254
    Fax +49 451 500 3373
    denc...@math.uni-luebeck.de

    www.math.uni-luebeck.de
_______________________________________________
LON-CAPA-users mailing list
LON-CAPA-users@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-users


_______________________________________________
LON-CAPA-users mailing list
LON-CAPA-users@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-users


_______________________________________________
LON-CAPA-users mailing list
LON-CAPA-users@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
_______________________________________________
LON-CAPA-users mailing list
LON-CAPA-users@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-users

Reply via email to