Re: [Orgmode] Re: How do you use org for other formats
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 zhangwe...@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: be...@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 ___ 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
Re: [Orgmode] Re: How do you use org for other formats
On Jul 30, 2009, at 7:53 PM, Nick Dokos wrote: Bernt Hansen be...@norang.ca wrote: zwz zhangwe...@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: be...@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 ___ 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
[Orgmode] Re: How do you use org for other formats
Bernt Hansen be...@norang.ca writes: zwz zhangwe...@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: be...@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 ___ 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
[Orgmode] Re: How do you use org for other formats
zwz zhangwe...@gmail.com writes: Bernt Hansen be...@norang.ca writes: zwz zhangwe...@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 ___ 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
[Orgmode] Re: How do you use org for other formats
zwz zhangwe...@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: be...@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 ___ 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
Re: [Orgmode] Re: How do you use org for other formats
Bernt Hansen said unto the world at 30/07/09 01:13 PM: zwz zhangwe...@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: be...@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 ___ 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
Re: [Orgmode] Re: How do you use org for other formats
Bernt Hansen be...@norang.ca wrote: zwz zhangwe...@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: be...@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? ___ 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
Re: [Orgmode] Re: How do you use org for other formats
Brian van den Broek van...@gmail.com writes: Bernt Hansen said unto the world at 30/07/09 01:13 PM: zwz zhangwe...@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: be...@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 ___ 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
Re: [Orgmode] Re: How do you use org for other formats
Nick Dokos nicholas.do...@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 ___ 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
Re: [Orgmode] Re: How do you use org for other formats
Nick Dokos nicholas.do...@hp.com writes: Bernt Hansen be...@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 ___ 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
[Orgmode] Re: How do you use org for other formats
Hi, Bernt Hansen be...@norang.ca writes: Nick Dokos nicholas.do...@hp.com writes: Bernt Hansen be...@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;headmeta http-equiv=Content-Type content=text/html; charset=UTF-8 /titlea/titlemeta name=generator content=DocBook XSL-NS Stylesheets V1.75.1 /link rel=home href=index.html title=a //headbodydiv class=navheadertable width=100% summary=Navigation headertrth colspan=3 align=centera/th/tr/tablehr //divdiv xml:lang=en class=article title=a lang=endiv class=titlepagedivdivh2 class=titlea id=id402943/aa/h2/divdivdiv class=authorh3 class=authorspan class=firstnameBaoqiu/span span class=othername/span span class=surnameCui/span/h3code class=emaillt;a class=email href=mailto:b...@yahoo-inc.com;b...@yahoo-inc.com/agt;/code/div/div/divhr //divdiv class=tocpbTable of Contents/b/pdldtspan class=sectiona href=index.html#sec-1Some math formulae: /a/span/dt/dl/divdiv class=section title=Some math formulae:div class=titlepagedivdivh2 class=title style=clear: botha id=sec-1/aSome math formulae: /h2/div/div/divp y = xsub1/subsup2/sup + xsub2/subsup2/sup /pp ysup2/sup = 2xsup2/sup + 1 /pp zsub2/sub = xsub1/sub + xsub2/sub + 2 (ysub1/sub + ysub2/sub + r)sup4/sup /p/div/divdiv class=navfooterhr //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 ___ 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