emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* spot the LaTeX error
@ 2012-03-02  4:26 Peter Salazar
  2012-03-02  4:34 ` Peter Salazar
  2012-03-02  9:33 ` Peter Salazar
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Salazar @ 2012-03-02  4:26 UTC (permalink / raw)
  To: emacs-orgmode

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

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

[-- Attachment #2: Type: text/html, Size: 4513 bytes --]

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

* Re: spot the LaTeX error
  2012-03-02  4:26 spot the LaTeX error Peter Salazar
@ 2012-03-02  4:34 ` Peter Salazar
  2012-03-02  9:33 ` Peter Salazar
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Salazar @ 2012-03-02  4:34 UTC (permalink / raw)
  To: emacs-orgmode

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

Correction: The setup below is no longer crashing my Emacs, but it does
produce a PDF with the following errors:

1. There's stray text at the top of the title page:
",23titletitle,,23authorauthor,"

2. In the top right header, the document title doesn't show up as I hoped
it would. Instead it shows the text: "title : 3"  --- and it's in in a
different font.

Any help appreciated. Thank you.



On Thu, Mar 1, 2012 at 11:26 PM, Peter Salazar <cycleofsong@gmail.com>wrote:

> 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
>
>

[-- Attachment #2: Type: text/html, Size: 5445 bytes --]

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

* Re: spot the LaTeX error
  2012-03-02  4:26 spot the LaTeX error Peter Salazar
  2012-03-02  4:34 ` Peter Salazar
@ 2012-03-02  9:33 ` Peter Salazar
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Salazar @ 2012-03-02  9:33 UTC (permalink / raw)
  To: emacs-orgmode

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

With some help I was able to fix the problem. If anyone is interested in
the template, let me know and I can supply the corrected code.


On Thu, Mar 1, 2012 at 11:26 PM, Peter Salazar <cycleofsong@gmail.com>wrote:

> 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
>
>

[-- Attachment #2: Type: text/html, Size: 5056 bytes --]

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

end of thread, other threads:[~2012-03-02  9:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-02  4:26 spot the LaTeX error Peter Salazar
2012-03-02  4:34 ` Peter Salazar
2012-03-02  9:33 ` Peter Salazar

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).