# [LON-CAPA-users] FW: printing of math

Rex Abert ABERTR at tcc.fl.edu
Fri Dec 4 09:53:15 EST 2015

You have my permission, of course.  We are a sharing community!

Whenever I think about these kinds of things, I am in awe at the fantastic job the creators of Lon-Capa did.

Rex Abert
Associate Professor of Mathematics
Tallahassee Community College
________________________________________
From: lon-capa-users-bounces at mail.lon-capa.org [lon-capa-users-bounces at mail.lon-capa.org] on behalf of Carl Lira [lira at egr.msu.edu]
Sent: Thursday, December 3, 2015 4:00 PM
To: 'Discussion list for LON-CAPA users'
Subject: Re: [LON-CAPA-users] FW: printing of math

Rex:

Thanks for the great response. Part of the issue with implementing the
lon-capa syntax is understanding whether the syntax is related to perl,
html, or lon-capa. Your answer helps a lot because I was not sure which
aspect was related to processing of the <m> tag contents.

I did a fair amount of editing of the authoring manual a couple years ago,
mainly motivated by my own desire to understand the lon-capa authoring
system, and I still have interest in supporting documentation efforts.

Could I have your permission to insert some of your response into the
lon-capa documentation? It seems that the '$' and '$$' methods should be recommended as LaTeX 'robust' and that the '$$' and '$' methods could be explained as supported, but considered as LaTeX 'fragile' with a reference to consult a LaTeX manual if use of the fragile method results in unexpected results occur. Carl Lira Chemical Engineering and Materials Science Michigan State -----Original Message----- From: lon-capa-users-bounces at mail.lon-capa.org [mailto:lon-capa-users-bounces at mail.lon-capa.org] On Behalf Of Rex Abert Sent: Thursday, December 03, 2015 3:29 PM To: Discussion list for LON-CAPA users <lon-capa-users at mail.lon-capa.org> Subject: Re: [LON-CAPA-users] FW: printing of math 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-bounces at mail.lon-capa.org [lon-capa-users-bounces at mail.lon-capa.org] on behalf of Carl Lira [lira at 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-bounces at mail.lon-capa.org [mailto:lon-capa-users-bounces at 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 at 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-bounces at mail.lon-capa.org [mailto:lon-capa-users-bounces at 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 at 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
> 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 at 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
dencker at math.uni-luebeck.de

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

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

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

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