emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* how to insert fraction & integration
@ 2012-09-27 12:53 Supriya Sawant
  2012-09-27 22:37 ` Bastien
  0 siblings, 1 reply; 6+ messages in thread
From: Supriya Sawant @ 2012-09-27 12:53 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 328 bytes --]

how to insert fraction & integration in emacs .org file

eg. test.org

\frac{1}{2}
\sqrt{x^2-1}

when I export it into html using org-export-as-html it gives

test.html

\frac{1}{2}
\sqrt{x2-1}

I am new to org-mode.
can anyone tell me whether I am inserted equation in right way??






Thanks & Regards,
Supriya Pravin Sawant

[-- Attachment #2: Type: text/html, Size: 474 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to insert fraction & integration
  2012-09-27 12:53 how to insert fraction & integration Supriya Sawant
@ 2012-09-27 22:37 ` Bastien
  2012-09-28  2:44   ` Nick Dokos
  0 siblings, 1 reply; 6+ messages in thread
From: Bastien @ 2012-09-27 22:37 UTC (permalink / raw)
  To: Supriya Sawant; +Cc: emacs-orgmode

Hi Supriya,

Supriya Sawant <sp.sawant14@gmail.com> writes:

> how to insert fraction & integration in emacs .org file
>
> eg. test.org
>  
> \frac{1}{2}
> \sqrt{x^2-1}
>
> when I export it into html using org-export-as-html it gives
>
> test.html
>
> \frac{1}{2}
> \sqrt{x^2-1}
>
> I am new to org-mode.
> can anyone tell me whether I am inserted equation in right way?? 

Use the LaTeX syntax directly: $...$ to inline them and $$...$$ to
center them in the page.  This works both in LaTeX and HTML.

  #+TITLE: Test
  
  $\frac{1}{2}$ and $\sqrt{x^2-1}$
  
  or 
  
  $$\frac{1}{2}$$
  
  $$\sqrt{x^2-1}$$

HTH,
  
-- 
 Bastien

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to insert fraction & integration
  2012-09-27 22:37 ` Bastien
@ 2012-09-28  2:44   ` Nick Dokos
  2012-09-28  6:35     ` Bastien
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2012-09-28  2:44 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode, Supriya Sawant

Bastien <bzg@altern.org> wrote:

> Hi Supriya,
> 
> Supriya Sawant <sp.sawant14@gmail.com> writes:
> 
> > how to insert fraction & integration in emacs .org file
> >
> > eg. test.org
> > 
> > \frac{1}{2}
> > \sqrt{x^2-1}
> >
> > when I export it into html using org-export-as-html it gives
> >
> > test.html
> >
> > \frac{1}{2}
> > \sqrt{x^2-1}
> >
> > I am new to org-mode.
> > can anyone tell me whether I am inserted equation in right way??
> 
> Use the LaTeX syntax directly: $...$ to inline them and $$...$$ to
> center them in the page.  This works both in LaTeX and HTML.
> 
>   #+TITLE: Test
>   
>   $\frac{1}{2}$ and $\sqrt{x^2-1}$
>   
>   or 
>   
>   $$\frac{1}{2}$$
>   
>   $$\sqrt{x^2-1}$$
> 

This may work for org, but $$...$$ in particular does not work for
LaTeX. I would recommend that you don't use these delimiters: use \(
... \) for inlines and \[...\] for displays.

$$...$$ is plain TeX, not LaTeX, and according to Lamport (p. 233),
"... does not work properly." See also

   http://www.tex.ac.uk/cgi-bin/texfaq2html?label=dolldoll

Nick

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to insert fraction & integration
  2012-09-28  2:44   ` Nick Dokos
@ 2012-09-28  6:35     ` Bastien
  2012-09-28 14:36       ` Nick Dokos
  2012-09-28 17:03       ` Nicolas Richard
  0 siblings, 2 replies; 6+ messages in thread
From: Bastien @ 2012-09-28  6:35 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode, Supriya Sawant

Hi Nick,

Nick Dokos <nicholas.dokos@hp.com> writes:

> $$...$$ is plain TeX, not LaTeX, and according to Lamport (p. 233),
> "... does not work properly." See also
>
>    http://www.tex.ac.uk/cgi-bin/texfaq2html?label=dolldoll

$$...$$ worked for me for years in LaTeX (using tetex on GNU/Linux)
so I'm curious: is this FAQ entry still accurate?  The web page says
"2012-03-29" but maybe that's just an automated time-stamp, not telling 
whether this entry in particular is still relevant.

Anyway, thanks for the pointer, learning every day!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to insert fraction & integration
  2012-09-28  6:35     ` Bastien
@ 2012-09-28 14:36       ` Nick Dokos
  2012-09-28 17:03       ` Nicolas Richard
  1 sibling, 0 replies; 6+ messages in thread
From: Nick Dokos @ 2012-09-28 14:36 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode, Supriya Sawant

Bastien <bzg@altern.org> wrote:

> Hi Nick,
> 
> Nick Dokos <nicholas.dokos@hp.com> writes:
> 
> > $$...$$ is plain TeX, not LaTeX, and according to Lamport (p. 233),
> > "... does not work properly." See also
> >
> >    http://www.tex.ac.uk/cgi-bin/texfaq2html?label=dolldoll
> 
> $$...$$ worked for me for years in LaTeX (using tetex on GNU/Linux)
> so I'm curious: is this FAQ entry still accurate?  The web page says
> "2012-03-29" but maybe that's just an automated time-stamp, not telling 
> whether this entry in particular is still relevant.
> 
> Anyway, thanks for the pointer, learning every day!
> 

I don't know for sure, but I presume it's still valid: I abandoned
$$...$$ many years ago after reading Lamport and have used \[...\]
ever since. The breakage seems subtle, so why chance it?

Nick

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to insert fraction & integration
  2012-09-28  6:35     ` Bastien
  2012-09-28 14:36       ` Nick Dokos
@ 2012-09-28 17:03       ` Nicolas Richard
  1 sibling, 0 replies; 6+ messages in thread
From: Nicolas Richard @ 2012-09-28 17:03 UTC (permalink / raw)
  To: emacs-orgmode

>>>>> "bzg" == Bastien  <bzg@altern.org> writes:

    bzg> Hi Nick, Nick Dokos <nicholas.dokos@hp.com> writes:

    >> $$...$$ is plain TeX, not LaTeX, and according to Lamport (p.
    >> 233), "... does not work properly." See also
    >> 
    >> http://www.tex.ac.uk/cgi-bin/texfaq2html?label=dolldoll

    bzg> $$...$$ worked for me for years in LaTeX (using tetex on
    bzg> GNU/Linux) so I'm curious: is this FAQ entry still accurate?
    bzg> The web page says "2012-03-29" but maybe that's just an
    bzg> automated time-stamp, not telling whether this entry in
    bzg> particular is still relevant.

It is, but the reasons are not so obvious. You can find some arguments
here :
<http://tex.stackexchange.com/questions/21173/display-math-deadly-sin-in-l2tabu>

In short : 
- without amsmath (but who does not load amsmath?), vertical spacing is
wrong in some circumstances (which should never happen anyway : a
displayed equation can never begin a new paragraph), and
- with amsmath, some other problems remain, most notably the global
option "fleqn" (flush left equations) does not work.

In general, $$ should never be modified by any package, so if you load a
package that should do something with displayed equations, you'd better
not use $$ $$. Unfortunately I don't know which packages are in this
situation.

So, is it worth changing your code ? I personally never use $$ (nor \[ \]) (i)
because I like having meaningful environment names, (ii) because I was
taught not to use them, and (iii) because amsmath makes it easy to
change a environement into another (e.g. change between
numbered/unnumbered, or change between {equation} and {align}).

-- 
Nicolas.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-09-28 17:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-27 12:53 how to insert fraction & integration Supriya Sawant
2012-09-27 22:37 ` Bastien
2012-09-28  2:44   ` Nick Dokos
2012-09-28  6:35     ` Bastien
2012-09-28 14:36       ` Nick Dokos
2012-09-28 17:03       ` Nicolas Richard

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).