* How do you use org for other formats
@ 2009-07-30 16:06 zwz
2009-07-30 17:13 ` Bernt Hansen
0 siblings, 1 reply; 13+ messages in thread
From: zwz @ 2009-07-30 16:06 UTC (permalink / raw)
To: emacs-orgmode
Hi,
I recently found the problem when I want to export the org file to
html and pdf. I guess there will be some people (who are also not so
familiar with the powerful org-mode) bothered by the same issue, that
is, html and pdf requires different org format sometimes.
- I use $ y = x_1^2 + x_2^2 $ in org, it works for pdf, but not for html
- "_" in text will introduce mess in pdf, not in html
I definitely want to keep only one org which I can export to other
formats correctly. I do not know if it is already implemented in
org-mode.
I just wondered if it is possible to introduce a abstract level (or
notations) so that org can translate it according to the target
format, just like how org treat the headlines (*).
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How do you use org for other formats
2009-07-30 16:06 How do you use org for other formats zwz
@ 2009-07-30 17:13 ` Bernt Hansen
2009-07-30 17:49 ` Brian van den Broek
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Bernt Hansen @ 2009-07-30 17:13 UTC (permalink / raw)
To: zwz; +Cc: emacs-orgmode
zwz <zhangweize@gmail.com> writes:
> I recently found the problem when I want to export the org file to
> html and pdf. I guess there will be some people (who are also not so
> familiar with the powerful org-mode) bothered by the same issue, that
> is, html and pdf requires different org format sometimes.
> - I use $ y = x_1^2 + x_2^2 $ in org, it works for pdf, but not for html
> - "_" in text will introduce mess in pdf, not in html
>
> I definitely want to keep only one org which I can export to other
> formats correctly. I do not know if it is already implemented in
> org-mode.
>
> I just wondered if it is possible to introduce a abstract level (or
> notations) so that org can translate it according to the target
> format, just like how org treat the headlines (*).
The following test file works fine for me as far as I can tell
,----[ x.org ]
| #+TITLE: x.org
| #+AUTHOR: Bernt Hansen
| #+EMAIL: bernt@norang.ca
| #+DATE: 2009-07-30 Thu
| #+DESCRIPTION:
| #+KEYWORDS:
| #+LANGUAGE: en
| #+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
| #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc
| #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
| #+EXPORT_SELECT_TAGS: export
| #+EXPORT_EXCLUDE_TAGS: noexport
| #+LINK_UP:
| #+LINK_HOME:
|
| * Test
|
| Some math formulae:
|
| y = x_1^2 + x_2^2
|
| y^2 = 2x^2 + 1
|
| z_2 = x_1 + x_2 + 2 (y_1 + y_2 + r)
`----
This renders HTML (C-c C-e b) [*1*] and PDF (C-c C-e d) [*2*] that look
fine to me
-Bernt
[*1*] http://www.norang.ca/tmp/x.html
[*2*] http://www.norang.ca/tmp/x.pdf
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: How do you use org for other formats
2009-07-30 17:13 ` Bernt Hansen
@ 2009-07-30 17:49 ` Brian van den Broek
2009-07-30 18:00 ` Bernt Hansen
2009-08-03 4:37 ` Carsten Dominik
2009-07-30 17:53 ` Nick Dokos
2009-07-31 22:13 ` zwz
2 siblings, 2 replies; 13+ messages in thread
From: Brian van den Broek @ 2009-07-30 17:49 UTC (permalink / raw)
To: Bernt Hansen; +Cc: emacs-orgmode, zwz
Bernt Hansen said unto the world at 30/07/09 01:13 PM:
> zwz <zhangweize@gmail.com> writes:
>
>> I recently found the problem when I want to export the org file to
>> html and pdf. I guess there will be some people (who are also not so
>> familiar with the powerful org-mode) bothered by the same issue, that
>> is, html and pdf requires different org format sometimes.
>> - I use $ y = x_1^2 + x_2^2 $ in org, it works for pdf, but not for html
>> - "_" in text will introduce mess in pdf, not in html
<snip>
> The following test file works fine for me as far as I can tell
>
> ,----[ x.org ]
> | #+TITLE: x.org
> | #+AUTHOR: Bernt Hansen
> | #+EMAIL: bernt@norang.ca
> | #+DATE: 2009-07-30 Thu
> | #+DESCRIPTION:
> | #+KEYWORDS:
> | #+LANGUAGE: en
> | #+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
> | #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc
> | #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
> | #+EXPORT_SELECT_TAGS: export
> | #+EXPORT_EXCLUDE_TAGS: noexport
> | #+LINK_UP:
> | #+LINK_HOME:
> |
> | * Test
> |
> | Some math formulae:
> |
> | y = x_1^2 + x_2^2
> |
> | y^2 = 2x^2 + 1
> |
> | z_2 = x_1 + x_2 + 2 (y_1 + y_2 + r)
> `----
>
> This renders HTML (C-c C-e b) [*1*] and PDF (C-c C-e d) [*2*] that look
> fine to me
>
> -Bernt
>
> [*1*] http://www.norang.ca/tmp/x.html
> [*2*] http://www.norang.ca/tmp/x.pdf
Hi all,
I don't export from org at all, but Bernt's pdf doesn't look right to
me. Notice that in the first equation, the exponents appear as `^2'
(i.e., with the `^' character). As a heavy LaTeX user, I would write
it as `y = x_{1}^{2} + x_{2}^{2}', but trying Bernt's file with this
modification, I still had the same result (`^2' in the output as
opposed to a superscripted `2'). Org 6.28d and emacs 22.2.1 on ubuntu
8.10.
Best,
Brian vdB
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: How do you use org for other formats
2009-07-30 17:13 ` Bernt Hansen
2009-07-30 17:49 ` Brian van den Broek
@ 2009-07-30 17:53 ` Nick Dokos
2009-07-30 18:02 ` Bernt Hansen
2009-08-03 4:37 ` Carsten Dominik
2009-07-31 22:13 ` zwz
2 siblings, 2 replies; 13+ messages in thread
From: Nick Dokos @ 2009-07-30 17:53 UTC (permalink / raw)
To: Bernt Hansen; +Cc: emacs-orgmode, zwz
Bernt Hansen <bernt@norang.ca> wrote:
> zwz <zhangweize@gmail.com> writes:
>
> > I recently found the problem when I want to export the org file to
> > html and pdf. I guess there will be some people (who are also not so
> > familiar with the powerful org-mode) bothered by the same issue, that
> > is, html and pdf requires different org format sometimes.
> > - I use $ y = x_1^2 + x_2^2 $ in org, it works for pdf, but not for html
> > - "_" in text will introduce mess in pdf, not in html
> >
> > I definitely want to keep only one org which I can export to other
> > formats correctly. I do not know if it is already implemented in
> > org-mode.
> >
> > I just wondered if it is possible to introduce a abstract level (or
> > notations) so that org can translate it according to the target
> > format, just like how org treat the headlines (*).
>
> The following test file works fine for me as far as I can tell
>
> ,----[ x.org ]
> | #+TITLE: x.org
> | #+AUTHOR: Bernt Hansen
> | #+EMAIL: bernt@norang.ca
> | #+DATE: 2009-07-30 Thu
> | #+DESCRIPTION:
> | #+KEYWORDS:
> | #+LANGUAGE: en
> | #+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
> | #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc
> | #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
> | #+EXPORT_SELECT_TAGS: export
> | #+EXPORT_EXCLUDE_TAGS: noexport
> | #+LINK_UP:
> | #+LINK_HOME:
> |
> | * Test
> |
> | Some math formulae:
> |
> | y = x_1^2 + x_2^2
> |
> | y^2 = 2x^2 + 1
> |
> | z_2 = x_1 + x_2 + 2 (y_1 + y_2 + r)
> `----
>
> This renders HTML (C-c C-e b) [*1*] and PDF (C-c C-e d) [*2*] that look
> fine to me
>
> -Bernt
>
> [*1*] http://www.norang.ca/tmp/x.html
> [*2*] http://www.norang.ca/tmp/x.pdf
>
>
>
Well, not quite: the subscripts in HTML are too big and the first formula in
the PDF does not have superscripts (it still has the carets): I checked LaTeX
export and the problem is present there:
y = x$_1$\^{}2 + x$_2$\^{}2
y$^2$ = 2x$^2$ + 1
z$_2$ = x$_1$ + x$_2$ + 2 (y$_1$ + y$_2$ + r)
Nick
PS. The exponent in the last formula (i.e. the 4) is absent from the org
file: cut-n-paste problem?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: How do you use org for other formats
2009-07-30 17:49 ` Brian van den Broek
@ 2009-07-30 18:00 ` Bernt Hansen
2009-07-30 18:31 ` Nick Dokos
2009-08-03 4:37 ` Carsten Dominik
1 sibling, 1 reply; 13+ messages in thread
From: Bernt Hansen @ 2009-07-30 18:00 UTC (permalink / raw)
To: Brian van den Broek; +Cc: emacs-orgmode, zwz
Brian van den Broek <vanden@gmail.com> writes:
> Bernt Hansen said unto the world at 30/07/09 01:13 PM:
>> zwz <zhangweize@gmail.com> writes:
>>
>>> I recently found the problem when I want to export the org file to
>>> html and pdf. I guess there will be some people (who are also not so
>>> familiar with the powerful org-mode) bothered by the same issue, that
>>> is, html and pdf requires different org format sometimes.
>>> - I use $ y = x_1^2 + x_2^2 $ in org, it works for pdf, but not for html
>>> - "_" in text will introduce mess in pdf, not in html
>
> <snip>
>
>> The following test file works fine for me as far as I can tell
>>
>> ,----[ x.org ]
>> | #+TITLE: x.org
>> | #+AUTHOR: Bernt Hansen
>> | #+EMAIL: bernt@norang.ca
>> | #+DATE: 2009-07-30 Thu
>> | #+DESCRIPTION: | #+KEYWORDS: | #+LANGUAGE: en
>> | #+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
>> | #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc
>> | #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
>> | #+EXPORT_SELECT_TAGS: export
>> | #+EXPORT_EXCLUDE_TAGS: noexport
>> | #+LINK_UP: | #+LINK_HOME: | | * Test
>> | | Some math formulae:
>> | | y = x_1^2 + x_2^2
>> | | y^2 = 2x^2 + 1
>> | | z_2 = x_1 + x_2 + 2 (y_1 + y_2 + r)
>> `----
>>
>> This renders HTML (C-c C-e b) [*1*] and PDF (C-c C-e d) [*2*] that look
>> fine to me
>>
>> -Bernt
>>
>> [*1*] http://www.norang.ca/tmp/x.html
>> [*2*] http://www.norang.ca/tmp/x.pdf
>
>
> Hi all,
>
> I don't export from org at all, but Bernt's pdf doesn't look right to
> me. Notice that in the first equation, the exponents appear as `^2'
> (i.e., with the `^' character). As a heavy LaTeX user, I would write
> it as `y = x_{1}^{2} + x_{2}^{2}', but trying Bernt's file with this
> modification, I still had the same result (`^2' in the output as
> opposed to a superscripted `2'). Org 6.28d and emacs 22.2.1 on ubuntu
> 8.10.
Actually you're right - I didn't notice that. If I export via docbook
(C-c C-e V) it looks better: http://www.norang.ca/tmp/x-3.pdf
-Bernt
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: How do you use org for other formats
2009-07-30 17:53 ` Nick Dokos
@ 2009-07-30 18:02 ` Bernt Hansen
2009-08-03 4:37 ` Carsten Dominik
1 sibling, 0 replies; 13+ messages in thread
From: Bernt Hansen @ 2009-07-30 18:02 UTC (permalink / raw)
To: nicholas.dokos; +Cc: emacs-orgmode, zwz
Nick Dokos <nicholas.dokos@hp.com> writes:
> Well, not quite: the subscripts in HTML are too big and the first formula in
> the PDF does not have superscripts (it still has the carets): I checked LaTeX
> export and the problem is present there:
>
> y = x$_1$\^{}2 + x$_2$\^{}2
>
> y$^2$ = 2x$^2$ + 1
>
> z$_2$ = x$_1$ + x$_2$ + 2 (y$_1$ + y$_2$ + r)
>
>
> Nick
>
> PS. The exponent in the last formula (i.e. the 4) is absent from the org
> file: cut-n-paste problem?
Bah. I added the ^4 after I'd already included it in the email :-P.
Sorry.
Some math formulae:
y = x_1^2 + x_2^2
y^2 = 2x^2 + 1
z_2 = x_1 + x_2 + 2 (y_1 + y_2 + r)^4
-Bernt
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: How do you use org for other formats
2009-07-30 18:00 ` Bernt Hansen
@ 2009-07-30 18:31 ` Nick Dokos
2009-07-30 18:43 ` Bernt Hansen
0 siblings, 1 reply; 13+ messages in thread
From: Nick Dokos @ 2009-07-30 18:31 UTC (permalink / raw)
To: Bernt Hansen; +Cc: emacs-orgmode, zwz
Bernt Hansen <bernt@norang.ca> wrote:
> Brian van den Broek <vanden@gmail.com> writes:
>
> > Bernt Hansen said unto the world at 30/07/09 01:13 PM:
> >> zwz <zhangweize@gmail.com> writes:
> >>
> >>> I recently found the problem when I want to export the org file to
> >>> html and pdf.
> > <snip>
> >
> >> The following test file works fine for me as far as I can tell
> >>
> >> ,----[ x.org ]
> >> | #+TITLE: x.org
> >> | #+AUTHOR: Bernt Hansen
> >> | #+EMAIL: bernt@norang.ca
> >> | #+DATE: 2009-07-30 Thu
> >> | #+DESCRIPTION: | #+KEYWORDS: | #+LANGUAGE: en
> >> | #+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
> >> | #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc
> >> | #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
> >> | #+EXPORT_SELECT_TAGS: export
> >> | #+EXPORT_EXCLUDE_TAGS: noexport
> >> | #+LINK_UP: | #+LINK_HOME: | | * Test
> >> | | Some math formulae:
> >> | | y = x_1^2 + x_2^2
> >> | | y^2 = 2x^2 + 1
> >> | | z_2 = x_1 + x_2 + 2 (y_1 + y_2 + r)
> >> `----
> >>
> >> This renders HTML (C-c C-e b) [*1*] and PDF (C-c C-e d) [*2*] that look
> >> fine to me
> >>
> >
> >
> >
> > I don't export from org at all, but Bernt's pdf doesn't look right to
> > me. Notice that in the first equation, the exponents appear as `^2'
> > (i.e., with the `^' character). As a heavy LaTeX user, I would write
> > it as `y = x_{1}^{2} + x_{2}^{2}', but trying Bernt's file with this
> > modification, I still had the same result (`^2' in the output as
> > opposed to a superscripted `2'). Org 6.28d and emacs 22.2.1 on ubuntu
> > 8.10.
>
> Actually you're right - I didn't notice that. If I export via docbook
> (C-c C-e V) it looks better: http://www.norang.ca/tmp/x-3.pdf
>
Yes, it does look much better (does it work as well with HTML?). So there
is a bug in the LaTeX exporter apparently. However, I tried the LaTeX
fragments approach in section 11.3 of the manual and it works fine with
both LaTeX and HTML (but you have to turn the LaTeX option on: exporting
to HTML then preprocesses the LaTeX fragments to produce images that can
then be included in the HTML file):
,----
| #+OPTIONS: LaTeX:t
|
| * Test
|
| Some math formulae:
|
|
| \begin{equation}
| y = x_1^2 + x_2^2
| \end{equation}
|
| \begin{equation}
| y^2 = 2x^2 + 1
| \end{equation}
|
| \begin{equation}
| z_2 = x_1 + x_2 + 2 (y_1 + y_2 + r)^4
| \end{equation}
`----
Thanks,
Nick
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: How do you use org for other formats
2009-07-30 18:31 ` Nick Dokos
@ 2009-07-30 18:43 ` Bernt Hansen
2009-07-31 0:59 ` Baoqiu Cui
0 siblings, 1 reply; 13+ messages in thread
From: Bernt Hansen @ 2009-07-30 18:43 UTC (permalink / raw)
To: nicholas.dokos; +Cc: emacs-orgmode, zwz
Nick Dokos <nicholas.dokos@hp.com> writes:
> Bernt Hansen <bernt@norang.ca> wrote:
>
>> Actually you're right - I didn't notice that. If I export via docbook
>> (C-c C-e V) it looks better: http://www.norang.ca/tmp/x-3.pdf
>>
>
> Yes, it does look much better (does it work as well with HTML?).
I've never tried that. My DocBook toolchain seems to be a bit broken
ATM since installing nxhtml mode. I just used the standard PDF via
Docbook export in org-mode to generate that file. I've never tried
DocBook to HTML (or any other format). I'd really like to get to a
point where everything goes through a standard DocBook toolchain since
it supports more output formats.
-Bernt
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How do you use org for other formats
2009-07-30 18:43 ` Bernt Hansen
@ 2009-07-31 0:59 ` Baoqiu Cui
0 siblings, 0 replies; 13+ messages in thread
From: Baoqiu Cui @ 2009-07-31 0:59 UTC (permalink / raw)
To: emacs-orgmode
Hi,
Bernt Hansen <bernt@norang.ca> writes:
> Nick Dokos <nicholas.dokos@hp.com> writes:
>
>> Bernt Hansen <bernt@norang.ca> wrote:
>>
>>> Actually you're right - I didn't notice that. If I export via docbook
>>> (C-c C-e V) it looks better: http://www.norang.ca/tmp/x-3.pdf
>>>
>>
>> Yes, it does look much better (does it work as well with HTML?).
>
> I've never tried that. My DocBook toolchain seems to be a bit broken
> ATM since installing nxhtml mode. I just used the standard PDF via
> Docbook export in org-mode to generate that file. I've never tried
> DocBook to HTML (or any other format). I'd really like to get to a
> point where everything goes through a standard DocBook toolchain since
> it supports more output formats.
As long as the PDF generated from DocBook output is good, the HTML
format should be good too.
Here is the HTML output converted from DocBook XML file (the command I
used is ``xsltproc /Users/bcui/Downloads/docbook-xsl-ns/xhtml/chunk.xsl
t.xml'', where t.xml is the DocBook exporting result):
------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>a</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.75.1" /><link rel="home" href="index.html" title="a" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">a</th></tr></table><hr /></div><div xml:lang="en" class="article" title="a" lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id402943"></a>a</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Baoqiu</span> <span class="othername"></span> <span class="surname">Cui</span></h3><code class="email"><<a class="email" href="mailto:bcui@yahoo-inc.com">bcui@yahoo-inc.com</a>></code></div></div></div><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="index.html#sec-1">Some math formulae: </a></span></dt></dl></div><div class="section" title="Some math formulae:"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="sec-1"></a>Some math formulae: </h2></div></div></div><p>
y = x<sub>1</sub><sup>2</sup> + x<sub>2</sub><sup>2</sup>
</p><p>
y<sup>2</sup> = 2x<sup>2</sup> + 1
</p><p>
z<sub>2</sub> = x<sub>1</sub> + x<sub>2</sub> + 2 (y<sub>1</sub> + y<sub>2</sub> + r)<sup>4</sup>
</p></div></div><div class="navfooter"><hr /></div></body></html>
------------------------------------------------------------------------
Here is the original Org file:
------------------------------------------------------------------------
* Some math formulae:
y = x_1^2 + x_2^2
y^2 = 2x^2 + 1
z_2 = x_1 + x_2 + 2 (y_1 + y_2 + r)^4
------------------------------------------------------------------------
Regards,
Baoqiu
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How do you use org for other formats
2009-07-30 17:13 ` Bernt Hansen
2009-07-30 17:49 ` Brian van den Broek
2009-07-30 17:53 ` Nick Dokos
@ 2009-07-31 22:13 ` zwz
2009-08-01 1:55 ` Bernt Hansen
2 siblings, 1 reply; 13+ messages in thread
From: zwz @ 2009-07-31 22:13 UTC (permalink / raw)
To: emacs-orgmode
Bernt Hansen <bernt@norang.ca> writes:
> zwz <zhangweize@gmail.com> writes:
>
>> I recently found the problem when I want to export the org file to
>> html and pdf. I guess there will be some people (who are also not so
>> familiar with the powerful org-mode) bothered by the same issue, that
>> is, html and pdf requires different org format sometimes.
>> - I use $ y = x_1^2 + x_2^2 $ in org, it works for pdf, but not for html
>> - "_" in text will introduce mess in pdf, not in html
>>
>> I definitely want to keep only one org which I can export to other
>> formats correctly. I do not know if it is already implemented in
>> org-mode.
>>
>> I just wondered if it is possible to introduce a abstract level (or
>> notations) so that org can translate it according to the target
>> format, just like how org treat the headlines (*).
>
> The following test file works fine for me as far as I can tell
>
> ,----[ x.org ]
> | #+TITLE: x.org
> | #+AUTHOR: Bernt Hansen
> | #+EMAIL: bernt@norang.ca
> | #+DATE: 2009-07-30 Thu
> | #+DESCRIPTION:
> | #+KEYWORDS:
> | #+LANGUAGE: en
> | #+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
> | #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc
> | #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0
> path:http://orgmode.org/org-info.js
> | #+EXPORT_SELECT_TAGS: export
> | #+EXPORT_EXCLUDE_TAGS: noexport
> | #+LINK_UP:
> | #+LINK_HOME:
> |
> | * Test
> |
> | Some math formulae:
> |
> | y = x_1^2 + x_2^2
> |
> | y^2 = 2x^2 + 1
> |
> | z_2 = x_1 + x_2 + 2 (y_1 + y_2 + r)
> `----
>
> This renders HTML (C-c C-e b) [*1*] and PDF (C-c C-e d) [*2*] that look
> fine to me
>
> -Bernt
>
> [*1*] http://www.norang.ca/tmp/x.html
> [*2*] http://www.norang.ca/tmp/x.pdf
Wow, so many options I have not used before ...
I copied the text, but the exported HTML and PDF looks the same as the
formula in ORG. Then I found it was because in my .emacs, there is
(setq org-export-with-sub-superscripts nil)
After I comment this, it works.
But in this way, I have to pay special attention to sub- and super-
scripts.
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How do you use org for other formats
2009-07-31 22:13 ` zwz
@ 2009-08-01 1:55 ` Bernt Hansen
0 siblings, 0 replies; 13+ messages in thread
From: Bernt Hansen @ 2009-08-01 1:55 UTC (permalink / raw)
To: zwz; +Cc: emacs-orgmode
zwz <zhangweize@gmail.com> writes:
> Bernt Hansen <bernt@norang.ca> writes:
>
>> zwz <zhangweize@gmail.com> writes:
>>
>> The following test file works fine for me as far as I can tell
>>
>> ,----[ x.org ]
<snip>
>> | #+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
<snip>
>>
>> [*1*] http://www.norang.ca/tmp/x.html
>> [*2*] http://www.norang.ca/tmp/x.pdf
>
> Wow, so many options I have not used before ...
>
> I copied the text, but the exported HTML and PDF looks the same as the
> formula in ORG. Then I found it was because in my .emacs, there is
>
> (setq org-export-with-sub-superscripts nil)
>
> After I comment this, it works.
>
> But in this way, I have to pay special attention to sub- and super-
> scripts.
The #+OPTIONS: line with ^:t or ^:nil controls whether _ and ^ create
subscripts and superscripts. I set this per org file to control that
option for export.
-Bernt
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: How do you use org for other formats
2009-07-30 17:49 ` Brian van den Broek
2009-07-30 18:00 ` Bernt Hansen
@ 2009-08-03 4:37 ` Carsten Dominik
1 sibling, 0 replies; 13+ messages in thread
From: Carsten Dominik @ 2009-08-03 4:37 UTC (permalink / raw)
To: Brian van den Broek; +Cc: Bernt Hansen, emacs-orgmode, zwz
On Jul 30, 2009, at 7:49 PM, Brian van den Broek wrote:
> Bernt Hansen said unto the world at 30/07/09 01:13 PM:
>> zwz <zhangweize@gmail.com> writes:
>>> I recently found the problem when I want to export the org file to
>>> html and pdf. I guess there will be some people (who are also not so
>>> familiar with the powerful org-mode) bothered by the same issue,
>>> that
>>> is, html and pdf requires different org format sometimes.
>>> - I use $ y = x_1^2 + x_2^2 $ in org, it works for pdf, but not
>>> for html
>>> - "_" in text will introduce mess in pdf, not in html
>
> <snip>
>
>> The following test file works fine for me as far as I can tell
>> ,----[ x.org ]
>> | #+TITLE: x.org
>> | #+AUTHOR: Bernt Hansen
>> | #+EMAIL: bernt@norang.ca
>> | #+DATE: 2009-07-30 Thu
>> | #+DESCRIPTION: | #+KEYWORDS: | #+LANGUAGE: en
>> | #+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
>> | #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil
>> tags:not-in-toc
>> | #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0
>> path:http://orgmode.org/org-info.js
>> | #+EXPORT_SELECT_TAGS: export
>> | #+EXPORT_EXCLUDE_TAGS: noexport
>> | #+LINK_UP: | #+LINK_HOME: | | * Test
>> | | Some math formulae:
>> | | y = x_1^2 + x_2^2
>> | | y^2 = 2x^2 + 1
>> | | z_2 = x_1 + x_2 + 2 (y_1 + y_2 + r)
>> `----
>> This renders HTML (C-c C-e b) [*1*] and PDF (C-c C-e d) [*2*] that
>> look
>> fine to me
>> -Bernt
>> [*1*] http://www.norang.ca/tmp/x.html
>> [*2*] http://www.norang.ca/tmp/x.pdf
>
>
> Hi all,
>
> I don't export from org at all, but Bernt's pdf doesn't look right
> to me. Notice that in the first equation, the exponents appear as
> `^2' (i.e., with the `^' character). As a heavy LaTeX user, I would
> write it as `y = x_{1}^{2} + x_{2}^{2}', but trying Bernt's file
> with this modification, I still had the same result (`^2' in the
> output as opposed to a superscripted `2'). Org 6.28d and emacs
> 22.2.1 on ubuntu 8.10.
Please note that the non-LaTeX processing is only good for really
trivial
math in Org. The LaTeX exporter has a really hard job handling
a variable with both a sub and a superscript, because it needs to insert
the dollar signs to create math mode without messing up with the number
of dollars. Actually, it is a small wonder that it works as well as
it does,
Bastien did a amazing job when he wrote the LaTeX exporter. The HTML
exporter does not have this specific problem, so it handles x_1^2 OK,
but anything more complex will fail as well.
If you want to typeset a document with math beyond a single subscript
or exponent, the much better way is to actually enclose it in LaTeX
math delimiters. For LaTeX export this will work perfectly. For
HTML export you need to follow Nick's advice in this thread to turn
on LaTeX fragment processing with
#+OPTIONS: LaTeX:t
When you have installed dvipng, HTML files will then include the math
formulas as small images.
- Carsten
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: How do you use org for other formats
2009-07-30 17:53 ` Nick Dokos
2009-07-30 18:02 ` Bernt Hansen
@ 2009-08-03 4:37 ` Carsten Dominik
1 sibling, 0 replies; 13+ messages in thread
From: Carsten Dominik @ 2009-08-03 4:37 UTC (permalink / raw)
To: nicholas.dokos; +Cc: Bernt Hansen, emacs-orgmode, zwz
On Jul 30, 2009, at 7:53 PM, Nick Dokos wrote:
> Bernt Hansen <bernt@norang.ca> wrote:
>
>> zwz <zhangweize@gmail.com> writes:
>>
>>> I recently found the problem when I want to export the org file to
>>> html and pdf. I guess there will be some people (who are also not so
>>> familiar with the powerful org-mode) bothered by the same issue,
>>> that
>>> is, html and pdf requires different org format sometimes.
>>> - I use $ y = x_1^2 + x_2^2 $ in org, it works for pdf, but not
>>> for html
>>> - "_" in text will introduce mess in pdf, not in html
>>>
>>> I definitely want to keep only one org which I can export to other
>>> formats correctly. I do not know if it is already implemented in
>>> org-mode.
>>>
>>> I just wondered if it is possible to introduce a abstract level (or
>>> notations) so that org can translate it according to the target
>>> format, just like how org treat the headlines (*).
>>
>> The following test file works fine for me as far as I can tell
>>
>> ,----[ x.org ]
>> | #+TITLE: x.org
>> | #+AUTHOR: Bernt Hansen
>> | #+EMAIL: bernt@norang.ca
>> | #+DATE: 2009-07-30 Thu
>> | #+DESCRIPTION:
>> | #+KEYWORDS:
>> | #+LANGUAGE: en
>> | #+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
>> | #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil
>> tags:not-in-toc
>> | #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0
>> path:http://orgmode.org/org-info.js
>> | #+EXPORT_SELECT_TAGS: export
>> | #+EXPORT_EXCLUDE_TAGS: noexport
>> | #+LINK_UP:
>> | #+LINK_HOME:
>> |
>> | * Test
>> |
>> | Some math formulae:
>> |
>> | y = x_1^2 + x_2^2
>> |
>> | y^2 = 2x^2 + 1
>> |
>> | z_2 = x_1 + x_2 + 2 (y_1 + y_2 + r)
>> `----
>>
>> This renders HTML (C-c C-e b) [*1*] and PDF (C-c C-e d) [*2*] that
>> look
>> fine to me
>>
>> -Bernt
>>
>> [*1*] http://www.norang.ca/tmp/x.html
>> [*2*] http://www.norang.ca/tmp/x.pdf
>>
>>
>>
>
> Well, not quite: the subscripts in HTML are too big
I think this is probably fixable with CSS, decreasing the font size
in sub and sup. Apparently Docbook does this automatically for
its subscript and superscript tags.
Should we decrease the size of sub and sup in Org's default CSS?
- Carsten
> and the first formula in
> the PDF does not have superscripts (it still has the carets): I
> checked LaTeX
> export and the problem is present there:
>
> y = x$_1$\^{}2 + x$_2$\^{}2
>
> y$^2$ = 2x$^2$ + 1
>
> z$_2$ = x$_1$ + x$_2$ + 2 (y$_1$ + y$_2$ + r)
>
>
> Nick
>
> PS. The exponent in the last formula (i.e. the 4) is absent from the
> org
> file: cut-n-paste problem?
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-08-03 4:37 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-30 16:06 How do you use org for other formats zwz
2009-07-30 17:13 ` Bernt Hansen
2009-07-30 17:49 ` Brian van den Broek
2009-07-30 18:00 ` Bernt Hansen
2009-07-30 18:31 ` Nick Dokos
2009-07-30 18:43 ` Bernt Hansen
2009-07-31 0:59 ` Baoqiu Cui
2009-08-03 4:37 ` Carsten Dominik
2009-07-30 17:53 ` Nick Dokos
2009-07-30 18:02 ` Bernt Hansen
2009-08-03 4:37 ` Carsten Dominik
2009-07-31 22:13 ` zwz
2009-08-01 1:55 ` Bernt Hansen
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).