emacs-orgmode
[Top][All Lists]

## Re: [O] equation numbering in html and latex export

 From: Samuel Sinayoko Subject: Re: [O] equation numbering in html and latex export Date: Thu, 16 Jun 2011 11:36:16 +0100 User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.12) Gecko/20100914 SUSE/3.0.8 Thunderbird/3.0.8

ThanksEric.Ithinkyou'reright.Itwouldmakesensetouse
withHTMLexporttonumberequations.
I'veputaminimalexamplebelowshowingwhatishappening.

--
#+TITLE:Equationnumbering
#+STYLE:<SCRIPTSRC="jsMath/easy/load.js"></SCRIPT>

*NumberedinHTMLexport/NotnumberedinLaTeX
EquationisnumberedandcanbereferencedinHTMLexport.Equationis
*not*numberedinLaTeXexport.
$$\label{eq:1} y=ax+b$$
Equation\ref{eq:1}isapolynomialoforder1.

*NotnumberedinHTML/NumberedinLaTeX
EquationisnotnumberedbutcanbereferencedinHTMLexport.Equation
isnumberedinLaTeXexport.

\label{eq:1}
y=ax+b

Equation\ref{eq:1}isnotnumberedbutcanbereferencedinHTML
export.ItisnumberedinLaTeXexport.
--

Ialsothinktherightbehaviourwouldbetohaveanumberedequationin
thesecondcaseinbothHTMLandLaTeX,andanunnumberedequationin
thefirstcaseinbothHTMLandLaTeX.Doeseveryoneagree?

I'dbehappytotryandchangethebehaviouroftheHTMLexportif
someonecanpointmeintherightdirection.

Cheers,

Sam

On16/06/1108:53,EricSFragawrote:
>
>
>> Dear list,
>>
>> I've been trying to write short scientific reports that I can export to
>> both LaTeX and HTML. So far I've managed to figure out how to include
>> equations, images, references, and how to include labels and cross
>> reference between all these things.
>>
>> The only problem I have is that I can't get numbered equations in both
>> LaTeX and HTML. Using the snippet below, I'm able to get a numbered
>> equation in HTML but not in LaTeX. I've put
>> in jsMath/easy/load.js. If I replace the by >> $$and$$, I get a numbered equation in LaTeX >> but not in HTML. >> >> How can I get numbered equations in both HTML and LaTeX? >> > I can't help you wish HTML unfortunately but I can summarise the issue > in LaTeX. > > With the standard document class (article say), equations can be either > "displayed" or "inline". Only displayed equations are numbered and then > only if you use =equation= (or =align=, =eqnarray=, etc). ... $$is > equivalent to $...$ which is essentially equivalent to the > unnumbered version of (aka \begin{equation*}). > > The trick would be to get the HTML exporter to apply the same processing > to $$...$$ as it does to$$$$...$$, I guess?