emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-preview-latex-fragment is very picky
@ 2013-05-05 17:45 Uwe Brauer
  2013-05-05 19:07 ` Rasmus
  0 siblings, 1 reply; 7+ messages in thread
From: Uwe Brauer @ 2013-05-05 17:45 UTC (permalink / raw)
  To: emacs-orgmode

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


Hello 
the following formula works well with org-preview-latex-fragment
$\|v^k(t)\|_{H_{s+1,\delta}}$

However 

$ \|v^k(t)\|_{H_{s+1,\delta}}$

Not nor 

$ \|v^k(t)\|_{H_{s+1,\delta}}$,

Could that behaviour made a little less picky?

thanks

Uwe Brauer 

[-- Attachment #2.1: Type: text/html, Size: 543 bytes --]

[-- Attachment #2.2: org-nXABlu_752c05ad8adc0f745a325b4220278bb1d334f798.png --]
[-- Type: image/png, Size: 514 bytes --]

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

* Re: org-preview-latex-fragment is very picky
  2013-05-05 17:45 org-preview-latex-fragment is very picky Uwe Brauer
@ 2013-05-05 19:07 ` Rasmus
  2013-05-05 20:01   ` Marcin Borkowski
                     ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Rasmus @ 2013-05-05 19:07 UTC (permalink / raw)
  To: emacs-orgmode

Uwe Brauer <oub@mat.ucm.es> writes:

> Hello 
> the following formula works well with org-preview-latex-fragment
> $\|v^k(t
>
> However 
>
> $ \|vk(t)\|_{Hs+1,δ}$
>
> Not nor 
>
> $ \|vk(t)\|_{Hs+1,δ}$,
>
> Could that behaviour made a little less picky?

Probably not.

Note these are Org features irrespective of fragment preview.  There
was some talk about it not so long ago.

Basically, it just happens that $·$ works as desired most of the time.
The proper way in LaTeX as well as in Org is \(·\).  Often you'll find
that in challenging cases you're better off with \(·\).

To see whether $·$ will work I use

  (setq org-highlight-latex-and-related '(latex))

To have nice symbols making preview of fragments less dire I use
pretty entities:

  (setq org-pretty-entities t)

Pretty entities can also be turned on locally.  For missing glyphs
you're using you can do something like:

  (setq org-entities-user '(("implies" "\\Rightarrow" t "&rArr;" "=>" "=>" "⇒")
                            ("iff" "\\iff" t "&hArr;" "<=>" "<=>" "⇔")))

Hope this helps. 

–Rasmus

-- 
Don't panic!!!

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

* Re: org-preview-latex-fragment is very picky
  2013-05-05 19:07 ` Rasmus
@ 2013-05-05 20:01   ` Marcin Borkowski
  2013-05-06  7:52   ` Uwe Brauer
  2013-05-07 11:06   ` another example (was: org-preview-latex-fragment is very picky) Uwe Brauer
  2 siblings, 0 replies; 7+ messages in thread
From: Marcin Borkowski @ 2013-05-05 20:01 UTC (permalink / raw)
  To: emacs-orgmode

Dnia 2013-05-05, o godz. 21:07:23
Rasmus <rasmus@gmx.us> napisał(a):

> Basically, it just happens that $·$ works as desired most of the time.
> The proper way in LaTeX as well as in Org is \(·\).  Often you'll find
> that in challenging cases you're better off with \(·\).

Just before someone asks why:
http://tex.stackexchange.com/questions/510/are-and-preferable-to-dollar-signs-for-math-mode

Regards,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University

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

* Re: org-preview-latex-fragment is very picky
  2013-05-05 19:07 ` Rasmus
  2013-05-05 20:01   ` Marcin Borkowski
@ 2013-05-06  7:52   ` Uwe Brauer
  2013-05-07 11:06   ` another example (was: org-preview-latex-fragment is very picky) Uwe Brauer
  2 siblings, 0 replies; 7+ messages in thread
From: Uwe Brauer @ 2013-05-06  7:52 UTC (permalink / raw)
  To: emacs-orgmode

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

>> "rasmus" == rasmus  <Rasmus> writes:

   > Uwe Brauer <oub@mat.ucm.es> writes:
   > Probably not.

   > Note these are Org features irrespective of fragment preview.  There
   > was some talk about it not so long ago.

   > Basically, it just happens that $·$ works as desired most of the time.
   > The proper way in LaTeX as well as in Org is \(·\).  Often you'll find
   > that in challenging cases you're better off with \(·\).

   > To see whether $·$ will work I use

   >   (setq org-highlight-latex-and-related '(latex))

   > To have nice symbols making preview of fragments less dire I use
   > pretty entities:

   >   (setq org-pretty-entities t)

   > Pretty entities can also be turned on locally.  For missing glyphs
   > you're using you can do something like:

   >   (setq org-entities-user '(("implies" "\\Rightarrow" t "&rArr;" "=>" "=>" "⇒")
   >                             ("iff" "\\iff" t "&hArr;" "<=>" "<=>" "⇔")))

   > Hope this helps. 

Thanks for pointing out these settings, I will try them out.

Uwe 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5556 bytes --]

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

* another example (was: org-preview-latex-fragment is very picky)
  2013-05-05 19:07 ` Rasmus
  2013-05-05 20:01   ` Marcin Borkowski
  2013-05-06  7:52   ` Uwe Brauer
@ 2013-05-07 11:06   ` Uwe Brauer
  2013-05-07 11:44     ` another example Rasmus
  2 siblings, 1 reply; 7+ messages in thread
From: Uwe Brauer @ 2013-05-07 11:06 UTC (permalink / raw)
  To: emacs-orgmode

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

<#secure method=smime mode=sign>
>> "rasmus" == rasmus  <Rasmus> writes:

   > Uwe Brauer <oub@mat.ucm.es> writes:

   > Probably not.

   > Note these are Org features irrespective of fragment preview.  There
   > was some talk about it not so long ago.

   > Basically, it just happens that $·$ works as desired most of the time.
   > The proper way in LaTeX as well as in Org is \(·\).  Often you'll find
   > that in challenging cases you're better off with \(·\).



Look the following examples 

> \begin{displaymath}
>  X_{s,\delta}:=H_{s,\delta}\times H_{s,\delta+1}\times H_{s,\delta+1}\times
> H_{s+1,\delta+2}
> \end{displaymath}
org-preview-latex-fragment does not work, change displaymath for
equation, again org-preview-latex-fragment does not work, but 
\[ \] does work, this is odd

>\[
>  X_{s,\delta}:=H_{s,\delta}\times H_{s,\delta+1}\times H_{s,\delta+1}\times
> H_{s+1,\delta+2}
>\]

[-- Attachment #2.1: Type: text/html, Size: 1740 bytes --]

[-- Attachment #2.2: org-NAF1g1_39a70726779ea6c4f5021ec69b906ca446c67867.png --]
[-- Type: image/png, Size: 942 bytes --]

[-- Attachment #2.3: org-NAF1g1_615f06face85603b5848feef83b02c709d1aa4f8.png --]
[-- Type: image/png, Size: 95 bytes --]

[-- Attachment #2.4: org-NAF1g1_6c040320b71a946323b3cd89683edd40f92bd973.png --]
[-- Type: image/png, Size: 95 bytes --]

[-- Attachment #2.5: org-NAF1g1_6d827db6a883587c0f868ac871bde5f0b196e0f7.png --]
[-- Type: image/png, Size: 95 bytes --]

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

* Re: another example
  2013-05-07 11:06   ` another example (was: org-preview-latex-fragment is very picky) Uwe Brauer
@ 2013-05-07 11:44     ` Rasmus
  2013-05-08 10:42       ` Uwe Brauer
  0 siblings, 1 reply; 7+ messages in thread
From: Rasmus @ 2013-05-07 11:44 UTC (permalink / raw)
  To: emacs-orgmode

Uwe Brauer <oub@mat.ucm.es> writes:

> Look the following examples 
>
>> \begin{displaymath}
>> Xs,δ:=Hs,δ× Hs,δ+1× Hs,δ+1×
>> Hs+1,δ+2
>> \end{displaymath}
> org-preview-latex-fragment does not work, change displaymath for
> equation, again org-preview-latex-fragment does not work, but 
> \[ \]
> does work, this is odd


1. The example you posted contains utf8 symbols and you'd likely need
   unicodemath (the package) to display it.  For this you'd need
   xelatex or lualatex.  But probably you wrote it as plain LaTeX code
   in your document.

2. displaymath is from amsmath.  This works on my system:
   #+BEGIN_SRC org
   #+LATEX_HEADER: \usepackage{amsmath}
   \begin{displaymath}
   x=1
   \end{displaymath}
   #+END_SRC

-Rasmus

-- 
Got mashed potatoes. Ain't got no T-Bone. No T-Bone

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

* Re: another example
  2013-05-07 11:44     ` another example Rasmus
@ 2013-05-08 10:42       ` Uwe Brauer
  0 siblings, 0 replies; 7+ messages in thread
From: Uwe Brauer @ 2013-05-08 10:42 UTC (permalink / raw)
  To: emacs-orgmode

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

>> "rasmus" == rasmus  <Rasmus> writes:

   > Uwe Brauer <oub@mat.ucm.es> writes:
   >> Look the following examples 
   >> 
>> \begin{displaymath}
>> Xs,δ:=Hs,δ× Hs,δ+1× Hs,δ+1×
>> Hs+1,δ+2
>> \end{displaymath}
   >> org-preview-latex-fragment does not work, change displaymath for
   >> equation, again org-preview-latex-fragment does not work, but 
   >> \[ \]
   >> does work, this is odd


   > 1. The example you posted contains utf8 symbols and you'd likely need
   >    unicodemath (the package) to display it.  For this you'd need
   >    xelatex or lualatex.  But probably you wrote it as plain LaTeX code
   >    in your document.

Hm it seems that the coding was changed when sending the formula, since
I wrote \delta in the original mail not δ.

In any case: *why* does \[ \] work, if it is question of a missing package? 

   > 2. displaymath is from amsmath.  This works on my system:
   >    #+BEGIN_SRC org
   >    #+LATEX_HEADER: \usepackage{amsmath}
   >    \begin{displaymath}
   >    x=1
   >    \end{displaymath}
   >    #+END_SRC

Really?

Here is a minimal example 
of a LaTeX file, which is not using amsmath, but the file is compiled as
it should be:


\documentclass{article}

\begin{document}
\begin{displaymath}
  \int dx
\end{displaymath}
\end{document}



I also extended the corresponding configuration in org.el



(defcustom org-format-latex-header "\\documentclass[12pt]{article}
\\usepackage[usenames]{color}
\\usepackage{amsmath}
\\usepackage{plain}
\\usepackage[mathscr]{eucal}


Uwe 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5556 bytes --]

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

end of thread, other threads:[~2013-05-08 10:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-05 17:45 org-preview-latex-fragment is very picky Uwe Brauer
2013-05-05 19:07 ` Rasmus
2013-05-05 20:01   ` Marcin Borkowski
2013-05-06  7:52   ` Uwe Brauer
2013-05-07 11:06   ` another example (was: org-preview-latex-fragment is very picky) Uwe Brauer
2013-05-07 11:44     ` another example Rasmus
2013-05-08 10:42       ` Uwe Brauer

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