* Previewing chemfig
@ 2014-11-02 19:17 Garreau, Alexandre
2014-11-02 19:45 ` Nicolas Goaziou
0 siblings, 1 reply; 9+ messages in thread
From: Garreau, Alexandre @ 2014-11-02 19:17 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 632 bytes --]
Hello, I’d like to being able to preview chemfig, like lines beginning
with \chemfig{.
But (a) they’re not detected as LaTeX fragments by the previewer (and it
seems only some matchers are accepted by default, I can’t say, for
instance, “^{\\[a-zA-Z]*[a-zA-Z0-9 ].*}$”), and (b) when previewing I
don’t see any way to include packages, like “\usepackage{chemfig}”, so
that even “\begin{flushleft}<\n>\chemfig{O=O}<\n>\end{flushleft}”, for
instance, doesn’t work.
Is there any way to do this? Otherwise, how could I fix it? Which part
of org-mode to hack? Could this be improved for next release?
[-- Attachment #2: Type: application/pgp-signature, Size: 948 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Previewing chemfig
2014-11-02 19:17 Previewing chemfig Garreau, Alexandre
@ 2014-11-02 19:45 ` Nicolas Goaziou
2014-11-02 20:09 ` Garreau, Alexandre
0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2014-11-02 19:45 UTC (permalink / raw)
To: Garreau, Alexandre; +Cc: emacs-orgmode
Hello,
"Garreau, Alexandre" <galex-713@galex-713.eu> writes:
> Hello, I’d like to being able to preview chemfig, like lines beginning
> with \chemfig{.
>
> But (a) they’re not detected as LaTeX fragments by the previewer (and it
> seems only some matchers are accepted by default, I can’t say, for
> instance, “^{\\[a-zA-Z]*[a-zA-Z0-9 ].*}$”), and (b) when previewing I
> don’t see any way to include packages, like “\usepackage{chemfig}”, so
> that even “\begin{flushleft}<\n>\chemfig{O=O}<\n>\end{flushleft}”, for
> instance, doesn’t work.
Have you tried
#+LATEX_HEADER: \usepackage{chemfig}
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Previewing chemfig
2014-11-02 19:45 ` Nicolas Goaziou
@ 2014-11-02 20:09 ` Garreau, Alexandre
2014-11-02 21:32 ` Nicolas Goaziou
0 siblings, 1 reply; 9+ messages in thread
From: Garreau, Alexandre @ 2014-11-02 20:09 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 772 bytes --]
Le 02/11/2014 à 20h45, Nicolas Goaziou a écrit :
> Hello,
>
> "Garreau, Alexandre" <galex-713@galex-713.eu> writes:
>
>> Hello, I’d like to being able to preview chemfig, like lines beginning
>> with \chemfig{.
>>
>> But (a) they’re not detected as LaTeX fragments by the previewer (and it
>> seems only some matchers are accepted by default, I can’t say, for
>> instance, “^{\\[a-zA-Z]*[a-zA-Z0-9 ].*}$”), and (b) when previewing I
>> don’t see any way to include packages, like “\usepackage{chemfig}”, so
>> that even “\begin{flushleft}<\n>\chemfig{O=O}<\n>\end{flushleft}”, for
>> instance, doesn’t work.
>
> Have you tried
>
> #+LATEX_HEADER: \usepackage{chemfig}
Yes. I think it doesn’t influence the preview system.
[-- Attachment #2: Type: application/pgp-signature, Size: 948 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Previewing chemfig
2014-11-02 20:09 ` Garreau, Alexandre
@ 2014-11-02 21:32 ` Nicolas Goaziou
2014-11-02 21:48 ` John Kitchin
0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2014-11-02 21:32 UTC (permalink / raw)
To: Garreau, Alexandre; +Cc: emacs-orgmode
"Garreau, Alexandre" <galex-713@galex-713.eu> writes:
>> Have you tried
>>
>> #+LATEX_HEADER: \usepackage{chemfig}
>
> Yes. I think it doesn’t influence the preview system.
It should. Perhaps your Org is outdated.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Previewing chemfig
2014-11-02 21:32 ` Nicolas Goaziou
@ 2014-11-02 21:48 ` John Kitchin
2014-11-02 23:57 ` g Garreau, Alexandre
0 siblings, 1 reply; 9+ messages in thread
From: John Kitchin @ 2014-11-02 21:48 UTC (permalink / raw)
To: Garreau, Alexandre; +Cc: emacs-orgmode
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
Interestingly, this:
#+LATEX_HEADER: \usepackage{chemfig}
$\chemfig{A-B-[1]C-[3]-D-[7]E-[6]F}$
exports to pdf correctly, but the latex preview is not correct. All the
letters are jumbled on top of each other.
> "Garreau, Alexandre" <galex-713@galex-713.eu> writes:
>
>>> Have you tried
>>>
>>> #+LATEX_HEADER: \usepackage{chemfig}
>>
>> Yes. I think it doesn’t influence the preview system.
>
> It should. Perhaps your Org is outdated.
>
>
> Regards,
--
-----------------------------------
John Kitchin
Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Previewing chemfig
2014-11-02 21:48 ` John Kitchin
@ 2014-11-02 23:57 ` g Garreau, Alexandre
2014-11-03 0:23 ` Rasmus
2014-11-03 21:09 ` John Kitchin
0 siblings, 2 replies; 9+ messages in thread
From: g Garreau, Alexandre @ 2014-11-02 23:57 UTC (permalink / raw)
To: John Kitchin; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 665 bytes --]
On 2014-11-02 at 22:48, John Kitchin wrote:
> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>
> Interestingly, this:
>
> #+LATEX_HEADER: \usepackage{chemfig}
>
>
> $\chemfig{A-B-[1]C-[3]-D-[7]E-[6]F}$
>
>
> exports to pdf correctly, but the latex preview is not correct. All the
> letters are jumbled on top of each other.
Ok, I tested again, and found that actually any preview (even without
chemfig) completely stops working when I add
« #+LATEX_HEADER:\usepackage{chemfig} », even pure maths. I just get
little shrinked transparent void rectangles.
I’m on Debian Testing (Jessy) and hence use Org version 7.9.3f (GNU
Emacs 24.3).
[-- Attachment #2: Type: application/pgp-signature, Size: 948 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Previewing chemfig
2014-11-02 23:57 ` g Garreau, Alexandre
@ 2014-11-03 0:23 ` Rasmus
2014-11-03 1:23 ` Garreau, Alexandre
2014-11-03 21:09 ` John Kitchin
1 sibling, 1 reply; 9+ messages in thread
From: Rasmus @ 2014-11-03 0:23 UTC (permalink / raw)
To: emacs-orgmode
Hello,
g"Garreau, Alexandre" <galex-713@galex-713.eu> writes:
> On 2014-11-02 at 22:48, John Kitchin wrote:
>> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>> Interestingly, this:
>> #+LATEX_HEADER: \usepackage{chemfig}
>> $\chemfig{A-B-[1]C-[3]-D-[7]E-[6]F}$
>> exports to pdf correctly, but the latex preview is not correct. All the
>> letters are jumbled on top of each other.
>
> Ok, I tested again, and found that actually any preview (even without
> chemfig) completely stops working when I add
> « #+LATEX_HEADER:\usepackage{chemfig} », even pure maths. I just get
> little shrinked transparent void rectangles.
To debug check you *Message* buffer. You might see something like
LaTeX errors in `*/tmp/orgtex1687lRq output*'. Use C-c ` to display.
Check the file, compile it, and check that everything works. Compile it
to dvi and try to run dvipng on the file.
For me, dvipng is unhappy about chemfig since it seems to contain PS
elements. If I do
(setq org-latex-create-formula-image-program 'imagemagick)
everything works since it's converted to pdf rather than dvi.
(org-version) => "8.3beta".
> I’m on Debian Testing (Jessy) and hence use Org version 7.9.3f (GNU
> Emacs 24.3).
You might get better results with a recent version of Org. If you
upgrade to Emacs 24.4 you should get Org 8.2.10, I think.
—Rasmus
--
And I faced endless streams of vendor-approved Ikea furniture. . .
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Previewing chemfig
2014-11-03 0:23 ` Rasmus
@ 2014-11-03 1:23 ` Garreau, Alexandre
0 siblings, 0 replies; 9+ messages in thread
From: Garreau, Alexandre @ 2014-11-03 1:23 UTC (permalink / raw)
To: Rasmus; +Cc: emacs-orgmode
On 2014-11-03 at 01:23, Rasmus wrote:
> Hello,
>
> "Garreau, Alexandre" <galex-713@galex-713.eu> writes:
>> On 2014-11-02 at 22:48, John Kitchin wrote:
>>> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>>> Interestingly, this:
>>> #+LATEX_HEADER: \usepackage{chemfig}
>>> $\chemfig{A-B-[1]C-[3]-D-[7]E-[6]F}$
>>> exports to pdf correctly, but the latex preview is not correct. All the
>>> letters are jumbled on top of each other.
>>
>> Ok, I tested again, and found that actually any preview (even without
>> chemfig) completely stops working when I add
>> « #+LATEX_HEADER:\usepackage{chemfig} », even pure maths. I just get
>> little shrinked transparent void rectangles.
>
> To debug check you *Message* buffer. You might see something like
>
> LaTeX errors in `*/tmp/orgtex1687lRq output*'. Use C-c ` to display.
Nothing in *messages*.
> Check the file, compile it, and check that everything works. Compile it
> to dvi and try to run dvipng on the file.
>
> For me, dvipng is unhappy about chemfig since it seems to contain PS
> elements. If I do
>
> (setq org-latex-create-formula-image-program 'imagemagick)
And suddenly, after some trials, everything worked… :D thank you!
> everything works since it's converted to pdf rather than dvi.
>
> (org-version) => "8.3beta".
>
>> I’m on Debian Testing (Jessy) and hence use Org version 7.9.3f (GNU
>> Emacs 24.3).
>
> You might get better results with a recent version of Org. If you
> upgrade to Emacs 24.4 you should get Org 8.2.10, I think.
Myeah, mixing distribution releases is not always a good idea, but I
think with Emacs it’s fine, and I want so much 24.4 features I’ll
probably do it in little time.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Previewing chemfig
2014-11-02 23:57 ` g Garreau, Alexandre
2014-11-03 0:23 ` Rasmus
@ 2014-11-03 21:09 ` John Kitchin
1 sibling, 0 replies; 9+ messages in thread
From: John Kitchin @ 2014-11-03 21:09 UTC (permalink / raw)
To: g Garreau, Alexandre; +Cc: emacs-orgmode
g"Garreau, Alexandre" <galex-713@galex-713.eu> writes:
I cannot reproduce this, my math previews work fine. just the chemfig is
messed up.
> On 2014-11-02 at 22:48, John Kitchin wrote:
>> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>>
>> Interestingly, this:
>>
>> #+LATEX_HEADER: \usepackage{chemfig}
>>
>>
>> $\chemfig{A-B-[1]C-[3]-D-[7]E-[6]F}$
>>
>>
>> exports to pdf correctly, but the latex preview is not correct. All the
>> letters are jumbled on top of each other.
>
> Ok, I tested again, and found that actually any preview (even without
> chemfig) completely stops working when I add
> « #+LATEX_HEADER:\usepackage{chemfig} », even pure maths. I just get
> little shrinked transparent void rectangles.
>
> I’m on Debian Testing (Jessy) and hence use Org version 7.9.3f (GNU
> Emacs 24.3).
>
--
-----------------------------------
John Kitchin
Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-11-03 21:10 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-02 19:17 Previewing chemfig Garreau, Alexandre
2014-11-02 19:45 ` Nicolas Goaziou
2014-11-02 20:09 ` Garreau, Alexandre
2014-11-02 21:32 ` Nicolas Goaziou
2014-11-02 21:48 ` John Kitchin
2014-11-02 23:57 ` g Garreau, Alexandre
2014-11-03 0:23 ` Rasmus
2014-11-03 1:23 ` Garreau, Alexandre
2014-11-03 21:09 ` John Kitchin
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.