emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* preview and default class [8.2.5h (release_8.2.5h-677-g55b0a3 @ /home/youngfrog/sourcetrees/org-mode/lisp/)]
@ 2014-03-06 12:47 Nicolas Richard
  2014-03-13 14:26 ` Bastien
  0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Richard @ 2014-03-06 12:47 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I was a little bit surprised that previewing latex fragments doesn't use
the same class as latex export. That's contrary to my expectation but I
don't know how to fix it. The reason I expected that is : I set a
default (personnal) latex class which defines many commands that I use
everyday when writing latex, and thus also when writing latex in org
documents.

Also, it took me a lot of time to find out that org-format-latex-header
was used for previewing latex fragments. I suggest that we mention it in
the manual in (info "(org) Previewing LaTeX fragments"). It's already
mentionned in (info "(org) LaTeX fragments") in a footnote, but I think
the variable must be found in the "Previewing" section too.

Here's a patch to do it, but maybe the whole footnote should be moved to
the "Previewing" section instead ?

From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
Date: Thu, 6 Mar 2014 13:21:41 +0100
Subject: [PATCH] * doc/org.texi: mention org-format-latex-header near
 org-format-latex-options

---
 doc/org.texi | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 7e66034..b85f8c0 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -10228,10 +10228,11 @@ Remove the overlay preview images.
 @end table
 
 @vindex org-format-latex-options
-You can customize the variable @code{org-format-latex-options} to influence
-some aspects of the preview.  In particular, the @code{:scale} (and for HTML
-export, @code{:html-scale}) property can be used to adjust the size of the
-preview images.
+@vindex org-format-latex-header
+You can customize the variables @code{org-format-latex-options} and
+@code{org-format-latex-header} to influence some aspects of the preview.  In
+particular, the @code{:scale} (and for HTML export, @code{:html-scale})
+property of the former can be used to adjust the size of the preview images.
 
 @vindex org-startup-with-latex-preview
 You can turn on the previewing of all @LaTeX{} fragments in a file with
-- 
1.8.5.2

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

* Re: preview and default class [8.2.5h (release_8.2.5h-677-g55b0a3 @ /home/youngfrog/sourcetrees/org-mode/lisp/)]
  2014-03-06 12:47 preview and default class [8.2.5h (release_8.2.5h-677-g55b0a3 @ /home/youngfrog/sourcetrees/org-mode/lisp/)] Nicolas Richard
@ 2014-03-13 14:26 ` Bastien
  2014-03-19 22:22   ` Nicolas Richard
  0 siblings, 1 reply; 11+ messages in thread
From: Bastien @ 2014-03-13 14:26 UTC (permalink / raw)
  To: Nicolas Richard; +Cc: emacs-orgmode

Hi Nicolas,

Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:

> Also, it took me a lot of time to find out that org-format-latex-header
> was used for previewing latex fragments. I suggest that we mention it in
> the manual in (info "(org) Previewing LaTeX fragments"). It's already
> mentionned in (info "(org) LaTeX fragments") in a footnote, but I think
> the variable must be found in the "Previewing" section too.

Agreed.

> Here's a patch to do it, but maybe the whole footnote should be moved to
> the "Previewing" section instead ?

Mhh, yes, I'm for moving it to the previewing section.

Do you want to get commit access so that you can fix this directly?
Otherwise, just send a patch and I'll apply it.

Thanks!

-- 
 Bastien

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

* Re: preview and default class [8.2.5h (release_8.2.5h-677-g55b0a3 @ /home/youngfrog/sourcetrees/org-mode/lisp/)]
  2014-03-13 14:26 ` Bastien
@ 2014-03-19 22:22   ` Nicolas Richard
  2014-03-20 10:55     ` Bastien
  0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Richard @ 2014-03-19 22:22 UTC (permalink / raw)
  To: Bastien; +Cc: Nicolas Richard, emacs-orgmode

Hi Bastien,

> Mhh, yes, I'm for moving it to the previewing section.
>
> Do you want to get commit access so that you can fix this directly?
> Otherwise, just send a patch and I'll apply it.
>
> Thanks!

Here's a patch. I can commit it if you like, but I don't want to do so
without some review (it's not as trivial a change as moving the
corresponding footnote to the other section).


From 4b431a0fc2a4df7cecd8b6649227415ed86e7f7c Mon Sep 17 00:00:00 2001
From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
Date: Wed, 19 Mar 2014 23:13:39 +0100
Subject: [PATCH] Keep documentation on "Previewing LaTeX" in its own section

* doc/org.texi: Keep documentation on "Previewing LaTeX" in its own
  section
---
 doc/org.texi | 39 ++++++++++++++++++---------------------
 1 file changed, 18 insertions(+), 21 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index c442f83..447cde9 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -10140,19 +10140,13 @@ format sub- and superscripts in a WYSIWYM way.
 Going beyond symbols and sub- and superscripts, a full formula language is
 needed.  Org mode can contain @LaTeX{} math fragments, and it supports ways
 to process these for several export back-ends.  When exporting to @LaTeX{},
-the code is obviously left as it is.  When exporting to HTML, Org invokes the
-@uref{http://www.mathjax.org, MathJax library} (@pxref{Math formatting in
+the code is obviously left as it is.  When exporting to HTML, Org can invoke
+the @uref{http://www.mathjax.org, MathJax library} (@pxref{Math formatting in
 HTML export}) to process and display the math@footnote{If you plan to use
 this regularly or on pages with significant page views, you should install
 @file{MathJax} on your own server in order to limit the load of our server.}.
-Finally, it can also process the mathematical expressions into
-images@footnote{For this to work you need to be on a system with a working
-@LaTeX{} installation.  You also need the @file{dvipng} program or the
-@file{convert}, respectively available at
-@url{http://sourceforge.net/projects/dvipng/} and from the @file{imagemagick}
-suite.  The @LaTeX{} header that will be used when processing a fragment can
-be configured with the variable @code{org-format-latex-header}.} that can be
-displayed in a browser.
+It can also process the mathematical expressions into images that can be
+displayed in a browser (see @pxref{Previewing @LaTeX{} fragments}).
 
 @LaTeX{} fragments don't need any special marking at all.  The following
 snippets will be identified as @LaTeX{} source code:
@@ -10210,11 +10204,21 @@ lines:
 @cindex @LaTeX{} fragments, preview
 
 @vindex org-latex-create-formula-image-program
-If you have @file{dvipng} or @file{imagemagick} installed@footnote{Choose the
-converter by setting the variable
+If you have a working @LaTeX{} installation and either @file{dvipng} or
+@file{convert} installed@footnote{These are respectively available at
+@url{http://sourceforge.net/projects/dvipng/} and from the @file{imagemagick}
+suite. Choose the converter by setting the variable
 @code{org-latex-create-formula-image-program} accordingly.}, @LaTeX{}
-fragments can be processed to produce preview images of the typeset
-expressions:
+fragments can be processed to produce images of the typeset expressions to be
+used for inclusion while exporting to HTML (see @pxref{@LaTeX{} fragments}),
+or for inline previewing within Org mode.
+
+@vindex org-format-latex-options
+@vindex org-format-latex-header
+You can customize the variables @code{org-format-latex-options} and
+@code{org-format-latex-header} to influence some aspects of the preview.  In
+particular, the @code{:scale} (and for HTML export, @code{:html-scale})
+property of the former can be used to adjust the size of the preview images.
 
 @table @kbd
 @kindex C-c C-x C-l
@@ -10230,13 +10234,6 @@ process the entire buffer.
 Remove the overlay preview images.
 @end table
 
-@vindex org-format-latex-options
-@vindex org-format-latex-header
-You can customize the variables @code{org-format-latex-options} and
-@code{org-format-latex-header} to influence some aspects of the preview.  In
-particular, the @code{:scale} (and for HTML export, @code{:html-scale})
-property of the former can be used to adjust the size of the preview images.
-
 @vindex org-startup-with-latex-preview
 You can turn on the previewing of all @LaTeX{} fragments in a file with
 
-- 
1.9.1

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

* Re: preview and default class [8.2.5h (release_8.2.5h-677-g55b0a3 @ /home/youngfrog/sourcetrees/org-mode/lisp/)]
  2014-03-19 22:22   ` Nicolas Richard
@ 2014-03-20 10:55     ` Bastien
  2014-03-20 11:13       ` Nicolas Richard
  2014-03-22 16:15       ` Nicolas Richard
  0 siblings, 2 replies; 11+ messages in thread
From: Bastien @ 2014-03-20 10:55 UTC (permalink / raw)
  To: Nicolas Richard; +Cc: emacs-orgmode

Hi Nicolas,

Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:

> Here's a patch. I can commit it if you like, but I don't want to do so
> without some review (it's not as trivial a change as moving the
> corresponding footnote to the other section).

I can't apply the patch, either on maint or on master, but by reading
it carefully it looks good.

Just add a missing full-stop at the end of the Changelog sentence "in
its own section.", and perhaps use `C-x 4 a' from within the diff to
include the section's name in the Changelog too.

PS: I didn't check carefully because I don't use `C' from magit, but
I assume magit may be wrong in creating Changelogs.  We should report
this to magit maintainers if this is true.

-- 
 Bastien

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

* Re: preview and default class [8.2.5h (release_8.2.5h-677-g55b0a3 @ /home/youngfrog/sourcetrees/org-mode/lisp/)]
  2014-03-20 10:55     ` Bastien
@ 2014-03-20 11:13       ` Nicolas Richard
  2014-03-20 21:56         ` Bastien
  2014-03-22 16:15       ` Nicolas Richard
  1 sibling, 1 reply; 11+ messages in thread
From: Nicolas Richard @ 2014-03-20 11:13 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Le 20/03/2014 11:55, Bastien a écrit :
> Hi Nicolas,
> 
> Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:
> 
>> Here's a patch. I can commit it if you like, but I don't want to do so
>> without some review (it's not as trivial a change as moving the
>> corresponding footnote to the other section).
> 
> I can't apply the patch, either on maint or on master, but by reading
> it carefully it looks good.

> Just add a missing full-stop at the end of the Changelog sentence "in
> its own section.", and perhaps use `C-x 4 a' from within the diff to
> include the section's name in the Changelog too.

Ok, I'll fix that and make sure it can be applied to master (I'm not
sure how I managed to miss that part.)

> PS: I didn't check carefully because I don't use `C' from magit, but
> I assume magit may be wrong in creating Changelogs.  We should report
> this to magit maintainers if this is true.

Indeed there usually is some difference between C (magit) and C-x 4 a. I
will have a look and report it when I get a chance.

-- 
Nico.

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

* Re: preview and default class [8.2.5h (release_8.2.5h-677-g55b0a3 @ /home/youngfrog/sourcetrees/org-mode/lisp/)]
  2014-03-20 11:13       ` Nicolas Richard
@ 2014-03-20 21:56         ` Bastien
  0 siblings, 0 replies; 11+ messages in thread
From: Bastien @ 2014-03-20 21:56 UTC (permalink / raw)
  To: Nicolas Richard; +Cc: emacs-orgmode

Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:

> Indeed there usually is some difference between C (magit) and C-x 4 a. I
> will have a look and report it when I get a chance.

That'd be great, thanks,

-- 
 Bastien

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

* Re: preview and default class [8.2.5h (release_8.2.5h-677-g55b0a3 @ /home/youngfrog/sourcetrees/org-mode/lisp/)]
  2014-03-20 10:55     ` Bastien
  2014-03-20 11:13       ` Nicolas Richard
@ 2014-03-22 16:15       ` Nicolas Richard
  2014-03-22 16:41         ` Bastien
  1 sibling, 1 reply; 11+ messages in thread
From: Nicolas Richard @ 2014-03-22 16:15 UTC (permalink / raw)
  To: Bastien; +Cc: Nicolas Richard, emacs-orgmode

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

Hello Bastien,

Bastien <bzg@gnu.org> writes:
> Just add a missing full-stop at the end of the Changelog sentence "in
> its own section.",

Done

> and perhaps use `C-x 4 a' from within the diff to
> include the section's name in the Changelog too.

I tried that in both parts of the diff, but then I get :
	* org.texi (used, lines): 
(The lines 'used:' and 'lines:' appear in that file.)

I guess that's not the intended result so I left that as is.

> PS: I didn't check carefully because I don't use `C' from magit, but
> I assume magit may be wrong in creating Changelogs.  We should report
> this to magit maintainers if this is true.

In this case it seems that nothing was better than doing what C-x 4 a
did, so I didn't check further.

Here's the new patch :


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Keep-documentation-on-Previewing-LaTeX-in-its-own-se.patch --]
[-- Type: text/x-diff, Size: 3954 bytes --]

From cf5246c5f44fe637cb2000cf92b2f47499d7b8d2 Mon Sep 17 00:00:00 2001
From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
Date: Thu, 6 Mar 2014 13:21:41 +0100
Subject: [PATCH] Keep documentation on "Previewing LaTeX" in its own section

* doc/org.texi: Keep documentation on "Previewing LaTeX" in its own
  section.
---
 doc/org.texi | 38 ++++++++++++++++++--------------------
 1 file changed, 18 insertions(+), 20 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index e835022..2abfa66 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -10147,19 +10147,13 @@ format sub- and superscripts in a WYSIWYM way.
 Going beyond symbols and sub- and superscripts, a full formula language is
 needed.  Org mode can contain @LaTeX{} math fragments, and it supports ways
 to process these for several export back-ends.  When exporting to @LaTeX{},
-the code is obviously left as it is.  When exporting to HTML, Org invokes the
-@uref{http://www.mathjax.org, MathJax library} (@pxref{Math formatting in
+the code is obviously left as it is.  When exporting to HTML, Org can invoke
+the @uref{http://www.mathjax.org, MathJax library} (@pxref{Math formatting in
 HTML export}) to process and display the math@footnote{If you plan to use
 this regularly or on pages with significant page views, you should install
 @file{MathJax} on your own server in order to limit the load of our server.}.
-Finally, it can also process the mathematical expressions into
-images@footnote{For this to work you need to be on a system with a working
-@LaTeX{} installation.  You also need the @file{dvipng} program or the
-@file{convert}, respectively available at
-@url{http://sourceforge.net/projects/dvipng/} and from the @file{imagemagick}
-suite.  The @LaTeX{} header that will be used when processing a fragment can
-be configured with the variable @code{org-format-latex-header}.} that can be
-displayed in a browser.
+It can also process the mathematical expressions into images that can be
+displayed in a browser (see @pxref{Previewing @LaTeX{} fragments}).
 
 @LaTeX{} fragments don't need any special marking at all.  The following
 snippets will be identified as @LaTeX{} source code:
@@ -10217,11 +10211,21 @@ lines:
 @cindex @LaTeX{} fragments, preview
 
 @vindex org-latex-create-formula-image-program
-If you have @file{dvipng} or @file{imagemagick} installed@footnote{Choose the
-converter by setting the variable
+If you have a working @LaTeX{} installation and either @file{dvipng} or
+@file{convert} installed@footnote{These are respectively available at
+@url{http://sourceforge.net/projects/dvipng/} and from the @file{imagemagick}
+suite. Choose the converter by setting the variable
 @code{org-latex-create-formula-image-program} accordingly.}, @LaTeX{}
-fragments can be processed to produce preview images of the typeset
-expressions:
+fragments can be processed to produce images of the typeset expressions to be
+used for inclusion while exporting to HTML (see @pxref{@LaTeX{} fragments}),
+or for inline previewing within Org mode.
+
+@vindex org-format-latex-options
+@vindex org-format-latex-header
+You can customize the variables @code{org-format-latex-options} and
+@code{org-format-latex-header} to influence some aspects of the preview.  In
+particular, the @code{:scale} (and for HTML export, @code{:html-scale})
+property of the former can be used to adjust the size of the preview images.
 
 @table @kbd
 @kindex C-c C-x C-l
@@ -10237,12 +10241,6 @@ process the entire buffer.
 Remove the overlay preview images.
 @end table
 
-@vindex org-format-latex-options
-You can customize the variable @code{org-format-latex-options} to influence
-some aspects of the preview.  In particular, the @code{:scale} (and for HTML
-export, @code{:html-scale}) property can be used to adjust the size of the
-preview images.
-
 @vindex org-startup-with-latex-preview
 You can turn on the previewing of all @LaTeX{} fragments in a file with
 
-- 
1.9.1


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

* Re: preview and default class [8.2.5h (release_8.2.5h-677-g55b0a3 @ /home/youngfrog/sourcetrees/org-mode/lisp/)]
  2014-03-22 16:15       ` Nicolas Richard
@ 2014-03-22 16:41         ` Bastien
  2014-03-22 17:09           ` Nicolas Richard
  0 siblings, 1 reply; 11+ messages in thread
From: Bastien @ 2014-03-22 16:41 UTC (permalink / raw)
  To: Nicolas Richard; +Cc: emacs-orgmode

Hi Nicolas,

Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:

> Done

Thanks, applied on master, with a slight change in the Changelog
entry.

-- 
 Bastien

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

* Re: preview and default class [8.2.5h (release_8.2.5h-677-g55b0a3 @ /home/youngfrog/sourcetrees/org-mode/lisp/)]
  2014-03-22 16:41         ` Bastien
@ 2014-03-22 17:09           ` Nicolas Richard
  2014-03-23  8:29             ` Bastien
  0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Richard @ 2014-03-22 17:09 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Bastien <bzg@gnu.org> writes:
> Thanks, applied on master, with a slight change in the Changelog
> entry.

Ok thanks. For my information, did C-x 4 a work for you in adding the
section name or did you add it manually ?

-- 
Nico.

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

* Re: preview and default class [8.2.5h (release_8.2.5h-677-g55b0a3 @ /home/youngfrog/sourcetrees/org-mode/lisp/)]
  2014-03-22 17:09           ` Nicolas Richard
@ 2014-03-23  8:29             ` Bastien
  2014-03-23  9:53               ` Nicolas Richard
  0 siblings, 1 reply; 11+ messages in thread
From: Bastien @ 2014-03-23  8:29 UTC (permalink / raw)
  To: Nicolas Richard; +Cc: emacs-orgmode

Hi Nicolas,

Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:

> Ok thanks. For my information, did C-x 4 a work for you in adding the
> section name or did you add it manually ?

It worked from the diff.

I applied your patch with git apply, then went to the modified file,
then C-x v =, then hit `n' to go to the next change and `C-x 4 a' to
create the Changelog.

HTH,

-- 
 Bastien

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

* Re: preview and default class [8.2.5h (release_8.2.5h-677-g55b0a3 @ /home/youngfrog/sourcetrees/org-mode/lisp/)]
  2014-03-23  8:29             ` Bastien
@ 2014-03-23  9:53               ` Nicolas Richard
  0 siblings, 0 replies; 11+ messages in thread
From: Nicolas Richard @ 2014-03-23  9:53 UTC (permalink / raw)
  To: Bastien; +Cc: Nicolas Richard, emacs-orgmode

Bastien <bzg@gnu.org> writes:
> It worked from the diff.
>
> I applied your patch with git apply, then went to the modified file,
> then C-x v =, then hit `n' to go to the next change and `C-x 4 a' to
> create the Changelog.

Thanks, I'll try again and hopefully find out what's wrong with what I
did.

Nico.

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

end of thread, other threads:[~2014-03-23  9:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-06 12:47 preview and default class [8.2.5h (release_8.2.5h-677-g55b0a3 @ /home/youngfrog/sourcetrees/org-mode/lisp/)] Nicolas Richard
2014-03-13 14:26 ` Bastien
2014-03-19 22:22   ` Nicolas Richard
2014-03-20 10:55     ` Bastien
2014-03-20 11:13       ` Nicolas Richard
2014-03-20 21:56         ` Bastien
2014-03-22 16:15       ` Nicolas Richard
2014-03-22 16:41         ` Bastien
2014-03-22 17:09           ` Nicolas Richard
2014-03-23  8:29             ` Bastien
2014-03-23  9:53               ` 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).