From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Salazar Subject: spot the LaTeX error Date: Thu, 1 Mar 2012 23:26:02 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d041826bc6fb23704ba3af990 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3K4F-0005XO-RS for emacs-orgmode@gnu.org; Thu, 01 Mar 2012 23:26:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S3K4D-0001oR-Dh for emacs-orgmode@gnu.org; Thu, 01 Mar 2012 23:26:07 -0500 Received: from mail-we0-f169.google.com ([74.125.82.169]:40374) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3K4D-0001oK-1j for emacs-orgmode@gnu.org; Thu, 01 Mar 2012 23:26:05 -0500 Received: by werj55 with SMTP id j55so1037437wer.0 for ; Thu, 01 Mar 2012 20:26:02 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --f46d041826bc6fb23704ba3af990 Content-Type: text/plain; charset=ISO-8859-1 Not sure if this is the right forum for this question, so feel free to direct me elsewhere... I'm trying to quit Markdown and switch to org-mode completely. To do that, I need to get my LaTeX template working with org-mode. I had a LaTeX template I cobbled together and successfully used with Pandoc for Markdown -> LaTeX -> PDF. I tried to convert my template to work with org-mode, but I haven't had any success. The .tex file it generates looks valid as far as I can tell, but when I do org-export to LaTeX and open resulting PDF, it crashes Emacs. Here's what I added to my .emacs file. Can anyone see what I've done wrong? As may be apparent, I don't really know what I'm doing. (add-to-list 'org-export-latex-classes '("salazar" "\\documentclass[12pt]{article} \\usepackage{float} \\usepackage{hyperref} \\usepackage{algorithm} \\usepackage{amsmath} \\usepackage{ifxetex} \\ifxetex \\usepackage{fontspec,xltxtra,xunicode} \\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} \\setromanfont{Adobe Garamond Pro} \\setsansfont{Arial} \\setmonofont{Courier} \\else \\usepackage[mathletters]{ucs} \\usepackage[utf8x]{inputenc} \\fi \\usepackage{microtype} \\usepackage{fancyhdr} \\pagestyle{fancy} \\pagenumbering{arabic} \\lhead{\\href{mailto:cycleofsong@gmail.com}{Peter Salazar}} \\chead{\itshape} \\rhead{\\itshape{\\nouppercase{\\@title}: {\\nouppercase\\leftmark}}} \\lfoot{} \\cfoot{\\thepage} \\rfoot{} \\usepackage{listings} \\lstnewenvironment{code}{\\lstset{language=Haskell,basicstyle=\\small\\ttfamily}}{} \\setlength{\\parindent}{0pt} \\setlength{\\parskip}{12pt plus 2pt minus 1pt} \\usepackage{fancyvrb} \\usepackage{enumerate} \\usepackage{ctable} \\setlength{\\paperwidth}{8.5in} \\setlength{\\paperheight}{11in} \\usepackage[margin=1.5in,hmargin=1.5in,vmargin=1.5in]{geometry} \\tolerance=1000 \\usepackage{tocloft} \\renewcommand{\\cftsecleader}{\\cftdotfill{\\cftdotsep}} \\usepackage[normalem]{ulem} \\newcommand{\\textsubscr}[1]{\\ensuremath{_{\\scriptsize\\textrm{#1}}}} \\usepackage[breaklinks=true,linktocpage,pdftitle={\\@title},pdfauthor={\\@author},xetex]{hyperref} \\usepackage{url} \\usepackage{graphicx} \\hypersetup{ colorlinks, citecolor=black,filecolor=black,linkcolor=black,urlcolor=blue} \\makeatletter \\def\\maketitle{ \\thispagestyle{empty} \\vfill \\begin{raggedright} \\leavevmode \\vskip 1cm \{\\fontsize{50}{60}\\selectfont \\@title\\par} \\vskip 1cm \\normalfont \{\\huge {\\@author\\par}} \\vfill \{\\Large Peter Salazar} \\newline \{\\Large \\href{mailto:cycleofsong@gmail.com}{ cycleofsong@gmail.com}} \\newline \{\\Large \\@date\\par} \\end{raggedright} \\null \\cleardoublepage \} [NO-DEFAULT-PACKAGES] [NO-PACKAGES]" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) (setq org-latex-to-pdf-process '("xelatex -interaction nonstopmode %f" "xelatex -interaction nonstopmode %f")) ;; for multiple passes --f46d041826bc6fb23704ba3af990 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Not sure if this is the right forum for this question, so feel free to= direct me elsewhere...=A0

I'm trying to quit = Markdown and switch to org-mode completely. To do that, I need to get my La= TeX template working with org-mode.=A0

I had a LaTeX template I cobbled together and successfu= lly used with Pandoc for Markdown -> LaTeX -> PDF.=A0

<= /div>
I tried to convert my template to work with org-mode, but I haven= 't had any success. The .tex file it generates looks valid as far as I = can tell, but when I do org-export to LaTeX and open resulting PDF, it cras= hes Emacs.=A0

Here's what I added to my .emacs file. Can anyone s= ee what I've done wrong? As may be apparent, I don't really know wh= at I'm doing.=A0


(add-to-list &= #39;org-export-latex-classes
=A0 '("salazar"
"\\documentclass[12pt]{ar= ticle}
\\usepackage{float}
\\usepackage{hyperref}
=
\\usepackage{algorithm}
\\usepackage{amsmath}
\\us= epackage{ifxetex}
\\ifxetex
=A0 \\usepackage{fontspec,xltxtra,xunicode}
<= div>=A0 \\defaultfontfeatures{Mapping=3Dtex-text,Scale=3DMatchLowercase}
=A0 \\setromanfont{Adobe Garamond Pro}
=A0 \\setsansfont{= Arial}
=A0 \\setmonofont{Courier}
\\else
=A0 \\usepackage= [mathletters]{ucs}
=A0 \\usepackage[utf8x]{inputenc}
\\= fi
\\usepackage{microtype}
\\usepackage{fancyhdr}
=
\\pagestyle{fancy}
\\pagenumbering{arabic}
\\lfoot{}
\\cfoot{\\thepage}
\\rfoot{}
\= \usepackage{listings}
\\lstnewenvironment{code}{\\lstset{language= =3DHaskell,basicstyle=3D\\small\\ttfamily}}{}
\\setlength{\\parin= dent}{0pt}
\\setlength{\\parskip}{12pt plus 2pt minus 1pt}
\\usepackage= {fancyvrb}
\\usepackage{enumerate}
\\usepackage{ctable}=
\\setlength{\\paperwidth}{8.5in}
\\setlength{\\paperhe= ight}{11in}
=A0\\usepackage[margin=3D1.5in,hmargin=3D1.5in,vmargin=3D1.5in]{geomet= ry}
=A0 \\tolerance=3D1000
\\usepackage{tocloft}
<= div>\\renewcommand{\\cftsecleader}{\\cftdotfill{\\cftdotsep}}
\\newcommand{\\textsubscr}[1]{\\ensuremath{_{\\scriptsize\\textrm{#1}}= }}

\\usepackage[breaklinks=3Dtrue,linktocpage,pdft= itle=3D{\\@title},pdfauthor=3D{\\@author},xetex]{hyperref}

\\usepackage{url}
\\usepackage{graphicx}
\\hyperse= tup{ colorlinks, citecolor=3Dblack,filecolor=3Dblack,linkcolor=3Dblack,urlc= olor=3Dblue}
\\makeatletter
\\def\\maketitle{
=A0 \\thispagestyle{empty}
=A0 =A0 \\vfill
=A0 \\begin{raggedright}
=A0 \\lea= vevmode
=A0 =A0 \\vskip 1cm
=A0 =A0 \{\\fontsize{50}{60= }\\selectfont \\@title\\par}
=A0 =A0 \\vskip 1cm
=A0 = =A0 \\normalfont
=A0 =A0 \{\\huge {\\@author\\par}}
=A0 \\vfill
=A0= =A0 =A0 =A0 \{\\Large Peter Salazar}
=A0 =A0 \\newline
=A0 =A0 =A0 =A0 =A0 \{\\Large \\href{mailto:
cycleofsong@gmail.com}{cycleofsong@gmail.com}}
=A0 =A0 =A0 =A0 \\newline
=A0 =A0 \{\\Large \\@date\\par}
=A0 =A0\\end{raggedright}
=A0 \\null
=A0 \\clea= rdoublepage
\}
=A0 =A0 =A0 [NO-DEFAULT-PACKAGES]
<= div>=A0 =A0 =A0 [NO-PACKAGES]"
=A0 =A0 =A0("\\section{%s}" . "\\section*{%s}")
=A0 =A0 =A0("\\subsection{%s}" . "\\subsection*{%s}&= quot;)
=A0 =A0 =A0("\\subsubsection{%s}" . "\\subs= ubsection*{%s}")
=A0 =A0 =A0("\\paragraph{%s}" . "\\paragraph*{%s}"= )
=A0 =A0 =A0("\\subparagraph{%s}" . "\\subparagra= ph*{%s}")))


(setq org-latex-to= -pdf-process=A0
=A0 '("xelatex -interaction nonstopmode %f"
= =A0 =A0 =A0"xelatex -interaction nonstopmode %f")) ;; for multipl= e passes

--f46d041826bc6fb23704ba3af990--