On Thursday, February 28, 2013 7:46:37 AM UTC-8, Travis Scrimshaw wrote:
>
> Hey,
>
> The problem is the "align" environment: it is not meant to be used in math 
>> mode, but rather as a way to enter math mode instead of \[ \] delimiters 
>> (or $$ $$ delimiters, etc.). Using the ".. math::" markup tells Sphinx that 
>> the following code should be typeset in math mode, and then using 
>> \begin{align} tells it to enter math mode again, and this naturally leads 
>> to an error when you run pdflatex on it. You can look at the LaTeX source 
>> code to check (in doc/output/latex/en/...); it will probably have an align 
>> environment nested inside a gather environment.
>>
>> Using an environment like "aligned" is better, since aligned is meant to 
>> be used within math mode.
>>
>> So no, I don't think it's a bug.
>>
>>  
> How difficult would it be to get the html docbuild to also fail on putting 
> align* in the ".. MATH::" and would anyone be opposed to putting a note 
> about the aligned environment in the developer's guide?
>

My guess is that the reason it works is because MathJax is being forgiving 
in how it parses things. I don't know if MathJax has a "strict" setting 
which would complain in these cases.

I think the developer's guide could have a comment about how the ".. 
math::" environment puts you into math mode, so using {align} won't work 
while {aligned} will. Also mention "nowrap".  (There have been other issues 
with this, for example people using \texttt{...} for the output of _latex_, 
even though \texttt is, as its name indicates, supposed to be used in text 
mode, not math mode. So I definitely think we should point out that output 
from _latex_ methods and anything in ".. math::" blocks should be in math 
mode.)
 
-- 
John


-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to