Re: [O] OrgMode - Export Simple Chinese text to Latex/PDF
Hi, On Thu, Feb 9, 2012 at 04:12, Haisheng Wu fre...@gmail.com wrote: As you would see, the `CJK` is nested in the `document`, therefore, title which is in Chinese as well can not display correctly. Any ideas? Well, when it comes to utf8 export, I always recommend xelatex or lualatex. :) Recently there was a thread on devanagari (for Sanskrit and its derivatives like Hindi) which proved useful to the OP. http://thread.gmane.org/gmane.emacs.orgmode/51914 Hope this helps. -- Suvayu Open source is the future. It sets us free.
Re: [O] OrgMode - Export Simple Chinese text to Latex/PDF
On Thu, Feb 09 2012, suvayu ali wrote: Hi, On Thu, Feb 9, 2012 at 04:12, Haisheng Wu fre...@gmail.com wrote: As you would see, the `CJK` is nested in the `document`, therefore, title which is in Chinese as well can not display correctly. Any ideas? Well, when it comes to utf8 export, I always recommend xelatex or lualatex. :) Recently there was a thread on devanagari (for Sanskrit and its derivatives like Hindi) which proved useful to the OP. I do a lot of org to latex export with Chinese in it, and would absolutely second using Xelatex, it just makes so many things simpler. Use these headers, and compile with xelatex, you might need a pretty recent texlive installation. \usepackage{fontspec} \usepackage{xunicode} \usepackage{xltxtra} \usepackage{xeCJK} \setmainfont{Janson Text LT Pro} % or whatever \setCJKmainfont{文泉驿正黑} % or whatever -- GNU Emacs 24.0.93.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-02-07 on pellet Org-mode version 7.8.03 (release_7.8.03.324.gc4b233)
[O] OrgMode - Export Simple Chinese text to Latex/PDF
Hi guys, What I'd like to do is exporting a Chinese file into latex then convert to a pdf file. It failed to display Chinese characters then I search google for help and finding I need CJK package according to this post. http://www.math.nus.edu.sg/aslaksen/cs/cjk.html Unfortunately it is not that simple to make a UTF8 encoding file which I have. Then I found another way is like this: \documentclass{article} \usepackage{CJK} \begin{document} \begin{CJK}{UTF8}{gbsn} 非常感 test \end{CJK} (this is a test) \end{document} Therefore I add those two lines into the org file: #+LaTeX_HEADER: \usepackage{CJK} #+LaTeX_HEADER: \begin{CJK}{UTF8}{gbsn} it WORKS. However, you might already notice, the `\begin` command is not closed when I check with the generated tex file. Any hints / suggestions on this case? Thanks a lot. -Simon
Re: [O] OrgMode - Export Simple Chinese text to Latex/PDF
Hi, On Wed, Feb 8, 2012 at 10:07, Haisheng Wu fre...@gmail.com wrote: #+LaTeX_HEADER: \usepackage{CJK} #+LaTeX_HEADER: \begin{CJK}{UTF8}{gbsn} Have you tried the following instead? #+LaTeX_HEADER: \usepackage{CJK} #LaTeX: \begin{CJK}{UTF8}{gbsn} some text in chinese #LaTeX: \end{CJK}{test} GL -- Suvayu Open source is the future. It sets us free.
Re: [O] OrgMode - Export Simple Chinese text to Latex/PDF
suvayu ali fatkasuvayu+li...@gmail.com wrote: Hi, On Wed, Feb 8, 2012 at 10:07, Haisheng Wu fre...@gmail.com wrote: #+LaTeX_HEADER: \usepackage{CJK} #+LaTeX_HEADER: \begin{CJK}{UTF8}{gbsn} Have you tried the following instead? #+LaTeX_HEADER: \usepackage{CJK} #LaTeX: \begin{CJK}{UTF8}{gbsn} some text in chinese #LaTeX: \end{CJK}{test} The {test} should probably not be there: #LaTeX: \end{CJK} but the rest is all good, I think. Nick
Re: [O] OrgMode - Export Simple Chinese text to Latex/PDF
I think it is `#+Latex` rather than `#Latex`. The former one works for me. Thanks a lot! -Simon On Thu, Feb 9, 2012 at 10:04 AM, Nick Dokos nicholas.do...@hp.com wrote: suvayu ali fatkasuvayu+li...@gmail.com wrote: Hi, On Wed, Feb 8, 2012 at 10:07, Haisheng Wu fre...@gmail.com wrote: #+LaTeX_HEADER: \usepackage{CJK} #+LaTeX_HEADER: \begin{CJK}{UTF8}{gbsn} Have you tried the following instead? #+LaTeX_HEADER: \usepackage{CJK} #LaTeX: \begin{CJK}{UTF8}{gbsn} some text in chinese #LaTeX: \end{CJK}{test} The {test} should probably not be there: #LaTeX: \end{CJK} but the rest is all good, I think. Nick
Re: [O] OrgMode - Export Simple Chinese text to Latex/PDF
On Thu, Feb 9, 2012 at 03:21, Haisheng Wu fre...@gmail.com wrote: I think it is `#+Latex` rather than `#Latex`. The former one works for me. Yes, both you and Nick are correct. :) Sorry for the typo. -- Suvayu Open source is the future. It sets us free.
Re: [O] OrgMode - Export Simple Chinese text to Latex/PDF
suvayu ali fatkasuvayu+li...@gmail.com wrote: On Thu, Feb 9, 2012 at 03:21, Haisheng Wu fre...@gmail.com wrote: I think it is `#+Latex` rather than `#Latex`. The former one works for me. Yes, indeed. Yes, both you and Nick are correct. :) Sorry for the typo. Didn't catch the typo either. Nick
Re: [O] OrgMode - Export Simple Chinese text to Latex/PDF
aha...actually I just found one exception. By using the approach you suggested, the generated tex will be like: \title{吴海生} \begin{document} \maketitle \begin{CJK}{UTF8}{gbsn} ... ... As you would see, the `CJK` is nested in the `document`, therefore, title which is in Chinese as well can not display correctly. Any ideas? Thanks a lot. -Haisheng On Thu, Feb 9, 2012 at 10:56 AM, Nick Dokos nicholas.do...@hp.com wrote: suvayu ali fatkasuvayu+li...@gmail.com wrote: On Thu, Feb 9, 2012 at 03:21, Haisheng Wu fre...@gmail.com wrote: I think it is `#+Latex` rather than `#Latex`. The former one works for me. Yes, indeed. Yes, both you and Nick are correct. :) Sorry for the typo. Didn't catch the typo either. Nick