* numbered equations in html export
@ 2014-06-30 16:35 Eric Schulte
2014-06-30 20:22 ` Nicolas Goaziou
0 siblings, 1 reply; 7+ messages in thread
From: Eric Schulte @ 2014-06-30 16:35 UTC (permalink / raw)
To: Org Mode Mailing List
[-- Attachment #1: Type: text/plain, Size: 89 bytes --]
Hi,
All equations are numbered "1" when the attached example file is
exported to HTML.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: example.org --]
[-- Type: text/x-org, Size: 242 bytes --]
#+Title: Example
* H1
See Equation [[the-first]],
#+name: the-first
\begin{equation}
n_{i+1} = \frac{n_{i} (d-i) (e-1)}{(i+1)}
\end{equation}
and also Equation [[the-second]].
#+name: the-second
\begin{equation}
n_{0} = 1
\end{equation}
[-- Attachment #3: Type: text/plain, Size: 99 bytes --]
Thanks,
--
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D (see https://u.fsf.org/yw)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: numbered equations in html export
2014-06-30 16:35 numbered equations in html export Eric Schulte
@ 2014-06-30 20:22 ` Nicolas Goaziou
2014-07-01 4:19 ` Eric Schulte
0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2014-06-30 20:22 UTC (permalink / raw)
To: Eric Schulte; +Cc: Org Mode Mailing List
Hello,
Eric Schulte <schulte.eric@gmail.com> writes:
> All equations are numbered "1" when the attached example file is
> exported to HTML.
>
> #+Title: Example
>
> * H1
> See Equation [[the-first]],
>
> #+name: the-first
> \begin{equation}
> n_{i+1} = \frac{n_{i} (d-i) (e-1)}{(i+1)}
> \end{equation}
>
> and also Equation [[the-second]].
>
> #+name: the-second
> \begin{equation}
> n_{0} = 1
> \end{equation}
Only captioned equations are numbered. Behaviour is undefined for other
equations.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: numbered equations in html export
2014-06-30 20:22 ` Nicolas Goaziou
@ 2014-07-01 4:19 ` Eric Schulte
2014-07-01 13:29 ` Nicolas Goaziou
0 siblings, 1 reply; 7+ messages in thread
From: Eric Schulte @ 2014-07-01 4:19 UTC (permalink / raw)
To: Eric Schulte; +Cc: Org Mode Mailing List
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Hello,
>
> Eric Schulte <schulte.eric@gmail.com> writes:
>
>> All equations are numbered "1" when the attached example file is
>> exported to HTML.
>>
>> #+Title: Example
>>
>> * H1
>> See Equation [[the-first]],
>>
>> #+name: the-first
>> \begin{equation}
>> n_{i+1} = \frac{n_{i} (d-i) (e-1)}{(i+1)}
>> \end{equation}
>>
>> and also Equation [[the-second]].
>>
>> #+name: the-second
>> \begin{equation}
>> n_{0} = 1
>> \end{equation}
>
> Only captioned equations are numbered. Behaviour is undefined for other
> equations.
>
Why is this the default behavior? It looks to me like even when they're
present captions on equations aren't displayed for HTML or LaTeX export.
Additionally I don't see why captions should be related to, or required
for, the numbering of equations.
In a related issue which I believe is more convincingly a bug; links to
equations (whether numbered or not, with or without captions) don't
actually point anywhere. A link to the name is constructed, but no
anchor with the name is inserted into the page.
Would it make sense to change the current behavior as follows?
1. On HTML export all named equations are made into targets for a link
based on their name.
2. All named and referenced equations are numbered.
Thanks,
>
>
> Regards,
--
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D (see https://u.fsf.org/yw)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: numbered equations in html export
2014-07-01 4:19 ` Eric Schulte
@ 2014-07-01 13:29 ` Nicolas Goaziou
2014-07-01 14:02 ` Nick Dokos
0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2014-07-01 13:29 UTC (permalink / raw)
To: Eric Schulte; +Cc: Org Mode Mailing List
Hello,
Eric Schulte <schulte.eric@gmail.com> writes:
> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>> Only captioned equations are numbered. Behaviour is undefined for other
>> equations.
> Why is this the default behavior? It looks to me like even when they're
> present captions on equations aren't displayed for HTML or LaTeX export.
LaTeX export uses its own numbering mechanism over which Org has no
control. It is true that captions are not used in latex environments,
but that's orthogonal to the problem. Let's put it aside for now.
HTML export relies on Org's mechanism to number objects (i.e.,
`org-export-get-ordinal'). It conforms to numbering rules of other
elements, like tables. It is important for tables to require a caption.
Otherwise, a list of tables would have non-consecutive numbers.
Equations are consistent with this.
> Additionally I don't see why captions should be related to, or required
> for, the numbering of equations.
It is odd to reference a number used nowhere. For example, it is
confusing to follow an "equation 2" link and see a page full of
equations with no attached number below.
Admittedly, this point is moot as long as captions are not visible on
latex environments. I think this should be fixed instead.
Another advantage is that you can always link to an unnumbered equation
(just providing a name and no caption), which would not be possible if
every named equation was numbered.
> In a related issue which I believe is more convincingly a bug; links to
> equations (whether numbered or not, with or without captions) don't
> actually point anywhere. A link to the name is constructed, but no
> anchor with the name is inserted into the page.
This looks like a limitation from `org-html-latex-environment' (there
is a comment about it) due to mathjax handling.
> Would it make sense to change the current behavior as follows?
>
> 1. On HTML export all named equations are made into targets for a link
> based on their name.
It makes sense, there is just mathjax case to handle. It could go along
with your other patch protecting characters, as a special treatment
related to mathjax.
> 2. All named and referenced equations are numbered.
IMO it would be more sensible to handle captions for equations, for the
reasons explained above.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: numbered equations in html export
2014-07-01 13:29 ` Nicolas Goaziou
@ 2014-07-01 14:02 ` Nick Dokos
2014-07-01 14:56 ` Nicolas Goaziou
0 siblings, 1 reply; 7+ messages in thread
From: Nick Dokos @ 2014-07-01 14:02 UTC (permalink / raw)
To: emacs-orgmode
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>> Additionally I don't see why captions should be related to, or required
>> for, the numbering of equations.
>
> It is odd to reference a number used nowhere. For example, it is
> confusing to follow an "equation 2" link and see a page full of
> equations with no attached number below.
>
> Admittedly, this point is moot as long as captions are not visible on
> latex environments. I think this should be fixed instead.
>
Not sure I understand correctly: are you saying that in the latex output
every numbered equation would then have a visible caption?
--
Nick
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: numbered equations in html export
2014-07-01 14:02 ` Nick Dokos
@ 2014-07-01 14:56 ` Nicolas Goaziou
2014-07-01 15:33 ` Nick Dokos
0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2014-07-01 14:56 UTC (permalink / raw)
To: Nick Dokos; +Cc: emacs-orgmode
Nick Dokos <ndokos@gmail.com> writes:
> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>
>> Admittedly, this point is moot as long as captions are not visible on
>> latex environments. I think this should be fixed instead.
>>
>
> Not sure I understand correctly: are you saying that in the latex output
> every numbered equation would then have a visible caption?
No I'm not. I suggested to ignore latex export back-end since it has its
own numbering mechanism. I'm saying that in HTML output, numbering LaTeX
equations could be done through captions.
It is also possible to not use captions but, instead, regular numbering
with appropriate LaTeX environments or macros (e.g., \tag{x}). But then,
export engine cannot possibly be aware of that, so relying on #+NAME to
get an equation number is bound to fail.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: numbered equations in html export
2014-07-01 14:56 ` Nicolas Goaziou
@ 2014-07-01 15:33 ` Nick Dokos
0 siblings, 0 replies; 7+ messages in thread
From: Nick Dokos @ 2014-07-01 15:33 UTC (permalink / raw)
To: emacs-orgmode
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Nick Dokos <ndokos@gmail.com> writes:
>
>> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>>
>>> Admittedly, this point is moot as long as captions are not visible on
>>> latex environments. I think this should be fixed instead.
>>>
>>
>> Not sure I understand correctly: are you saying that in the latex output
>> every numbered equation would then have a visible caption?
>
> No I'm not. I suggested to ignore latex export back-end since it has its
> own numbering mechanism. I'm saying that in HTML output, numbering LaTeX
> equations could be done through captions.
>
> It is also possible to not use captions but, instead, regular numbering
> with appropriate LaTeX environments or macros (e.g., \tag{x}). But then,
> export engine cannot possibly be aware of that, so relying on #+NAME to
> get an equation number is bound to fail.
>
OK - thanks.
Nick
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-07-01 15:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-30 16:35 numbered equations in html export Eric Schulte
2014-06-30 20:22 ` Nicolas Goaziou
2014-07-01 4:19 ` Eric Schulte
2014-07-01 13:29 ` Nicolas Goaziou
2014-07-01 14:02 ` Nick Dokos
2014-07-01 14:56 ` Nicolas Goaziou
2014-07-01 15:33 ` Nick Dokos
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).