emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org-mode version 6.31trans; Exporting src blocks to LaTeX produces .tex file that fails to compile
@ 2009-10-01 16:18 cgray
  2009-10-01 19:49 ` Eric Schulte
  0 siblings, 1 reply; 8+ messages in thread
From: cgray @ 2009-10-01 16:18 UTC (permalink / raw)
  To: emacs-orgmode


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.
------------------------------------------------------------------------

Hi,

I am writing a small program using org-babel as a literate programming
tool.  When I exported the file to LaTeX, it could not compile.  The
problem is that the code blocks are surrounded by \begin{\LaTeX{}} and
\end{\LaTeX{}}, which is an unknown environment to LaTeX.  A small
example follows.

The org file contains:

#+srcname: determine the neighbors of the segments that the bisector hits
#+begin_src lua :tangle no :exports code
  local s1, s2 = intersecting_segs[1], intersecting_segs[2]
  local n1 = table_find_segment(cell.neighbors, s1)
  local n2 = table_find_segment(cell.neighbors, s2)
#+end_src

and the output .tex file contains:

\begin{\LaTeX{}}
\begin{verbatim}
local s1, s2 = intersecting_segs[1], intersecting_segs[2]
local n1 = table_find_segment(cell.neighbors, s1)
local n2 = table_find_segment(cell.neighbors, s2)
\end{verbatim}
\end{\LaTeX{}}

I haven't tried this without using org-babel, so I can't say whether
the problem is with org-babel or just with the LaTeX exporter.

Cheers,
Chris

Emacs  : GNU Emacs 23.0.91.1 (i486-pc-linux-gnu, GTK+ Version 2.16.0)
 of 2009-04-05 on palmer, modified by Debian
Package: Org-mode version 6.31trans

current state:
==============
(setq
 org-log-done 'time
 org-clock-in-switch-to-state "STARTED"
 org-export-with-LaTeX-fragments t
 org-todo-keyword-faces '(("TODO" :foreground "red" :weight bold)
			  ("STARTED" :foreground "blue" :weight bold)
			  ("DONE" :foreground "forest green" :weight bold)
			  ("WAITING" :foreground "orange" :weight bold)
			  ("SOMEDAY" :foreground "magenta" :weight bold)
			  ("CANCELLED" :foreground "forest green" :weight bold)
			  ("QUOTATION" :foreground "red" :weight bold)
			  ("QUOTED" :foreground "magenta" :weight bold)
			  ("APPROVED" :foreground "forest green" :weight bold)
			  ("EXPIRED" :foreground "forest green" :weight bold)
			  ("REJECTED" :foreground "forest green" :weight bold)
			  ("PROJECT" :foreground "red" :weight bold)
			  ("PROJDONE" :foreground "forest green" :weight bold))
 org-agenda-clockreport-parameter-plist '(:link nil :maxlevel 2)
 org-agenda-custom-commands '(("w" "Work tasks" tags-todo "work")
			      ("h" "Home tasks" tags-todo "home")
			      ("r" "Refile New Notes and Tasks" tags "refile"
			       ((org-agenda-todo-ignore-with-date nil)))
			      )
 org-agenda-files '("~/research/code/voronoi-diagram-ipelet/voronoi.org"
		    "~/todo/work.org" "~/todo/personal.org" "~/todo/todo.org")
 org-agenda-include-diary t
 org-hide-leading-stars t
 org-completion-use-ido t
 org-export-preprocess-after-blockquote-hook '(org-special-blocks-make-special-cookies)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-combined-agenda-icalendar-file "~/public_html/org.ics"
 org-clock-history-length 35
 org-babel-interpreters '("lua" "sh")
 org-todo-state-tags-triggers '(("CANCELLED" ("CANCELLED" . t))
				("WAITING" ("WAITING" . t) ("NEXT"))
				("SOMEDAY" ("WAITING" . t))
				(done ("NEXT") ("WAITING"))
				("TODO" ("WAITING") ("CANCELLED"))
				("STARTED" ("WAITING"))
				("PROJECT" ("CANCELLED") ("PROJECT" . t)))
 org-remember-clock-out-on-exit nil
 org-agenda-sorting-strategy '((agenda time-up priority-down)
			       (todo category-keep priority-down)
			       (tags category-keep priority-down))
 org-export-html-after-blockquotes-hook '(org-special-blocks-convert-html-special-cookies)
 org-export-latex-after-blockquotes-hook '(org-special-blocks-convert-latex-special-cookies)
 org-clock-in-resume t
 org-export-preprocess-hook '(org-export-blocks-preprocess
			      org-export-bibtex-preprocess)
 org-tab-first-hook '(yas/org-very-safe-expand org-hide-block-toggle-maybe)
 org-src-mode-hook '(org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-clock-persist t
 org-format-latex-header "\\documentclass{article}\n\\usepackage{fullpage}         % do not remove\n\\usepackage{amssymb}\n\\usepackage[usenames]{color}\n\\usepackage{amsmath}\n\\usepackage{latexsym}\n\\usepackage[mathscr]{eucal}\n\\pagestyle{empty}             % do not remove"
 org-highlight-latex-fragments-and-specials t
 org-todo-keywords '((sequence "TODO(t)" "STARTED(s!)" "|" "DONE(d!/!)")
		     (sequence "WAITING(w@/!)" "SOMEDAY(S!)" "|" "CANCELLED(c@/!)")
		     (sequence "QUOTATION(q!)" "QUOTED(Q!)" "|" "APPROVED(A@)"
		      "EXPIRED(E@)" "REJECTED(R@)")
		     (sequence "PROJECT(P@)" "|" "PROJDONE(D@)"))
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-default-notes-file "~/todo/todo.org"
 org-directory "~/todo/"
 org-blank-before-new-entry nil
 org-read-date-popup-calendar nil
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
		  org-cycle-show-empty-lines
		  org-optimize-window-after-visibility-change)
 org-export-latex-classes '(("article"
			     "\\documentclass[11pt,a4paper]{article}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\\usepackage{longtable}\n\\usepackage{amsthm}\n\\usepackage{amsmath}\n\\usepackage{hyperref}\n\\usepackage{xspace}\n\\newtheorem{lemma}{Lemma}\n\\newtheorem{theorem}{Theorem}\n\\DeclareMathOperator{\\per}{per}\n"
			     ("\\section{%s}" . "\\section*{%s}")
			     ("\\subsection{%s}" . "\\subsection*{%s}")
			     ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
			     ("\\paragraph{%s}" . "\\paragraph*{%s}")
			     ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
			    ("report"
			     "\\documentclass[11pt,a4paper]{report}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\\usepackage{longtable}\n\\usepackage{hyperref}"
			     ("\\part{%s}" . "\\part*{%s}")
			     ("\\chapter{%s}" . "\\chapter*{%s}")
			     ("\\section{%s}" . "\\section*{%s}")
			     ("\\subsection{%s}" . "\\subsection*{%s}")
			     ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
			    ("book"
			     "\\documentclass[11pt,a4paper]{book}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\\usepackage{longtable}\n\\usepackage{hyperref}"
			     ("\\part{%s}" . "\\part*{%s}")
			     ("\\chapter{%s}" . "\\chapter*{%s}")
			     ("\\section{%s}" . "\\section*{%s}")
			     ("\\subsection{%s}" . "\\subsection*{%s}")
			     ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
			    ("beamer"
			     "\\documentclass[11pt]{beamer}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage{hyperref}\n\\usepackage{verbatim}\n%\\usetheme{Singapore}\n%\\usecolortheme{dove}"
			     ("\\begin{frame}{%s}" "\\end{frame}" "\\begin{frame}{%s}"
			      "\\end{frame}")
			     )
			    )
 org-mode-hook '((lambda nil (local-set-key (kbd "RET") (quote org-return-indent)))
		 (lambda nil (abbrev-mode 1))
		 #[nil "\300\301\302\303\304$\207"
		   [org-add-hook change-major-mode-hook org-show-block-all append
		    local]
		   5]
		 (lambda nil (make-variable-buffer-local (quote yas/trigger-key))
		  (setq yas/trigger-key [tab])
		  (add-to-list (quote org-tab-first-hook)
		   (quote yas/org-very-safe-expand))
		  (define-key yas/keymap [tab] (quote yas/next-field)))
		 )
 org-clock-out-remove-zero-time-clocks t
 org-agenda-ndays 1
 org-export-latex-image-default-option ""
 org-refile-targets '((org-agenda-files :maxlevel . 5) (nil :maxlevel . 5))
 org-ctrl-c-ctrl-c-hook '(org-babel-execute-src-block-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-refile-use-outline-path 'file
 org-log-into-drawer t
 org-agenda-mode-hook '((lambda nil (hl-line-mode 1)))
 org-agenda-start-on-weekday nil
 org-agenda-skip-deadline-if-done t
 org-occur-hook '(org-first-headline-recenter)
 org-agenda-log-mode-items '(clock)
 org-remember-templates '(("TODO" 116 "* TODO %?\n %a\n %u" "~/todo/todo.org" "Tasks")
			  ("Notes" 110 "* %u %?\n %a" "~/todo/notes.org" "Notes")
			  ("Food" 102 "* %U %?" "~/todo/health.org" "Food")
			  ("Exercise" 101 "* %U %?" "~/todo/health.org" "Exercise"))
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 )

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

end of thread, other threads:[~2009-10-02 15:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-01 16:18 Org-mode version 6.31trans; Exporting src blocks to LaTeX produces .tex file that fails to compile cgray
2009-10-01 19:49 ` Eric Schulte
2009-10-02  8:30   ` Chris Gray
2009-10-02  9:36     ` Chris Gray
2009-10-02 10:04       ` Carsten Dominik
2009-10-02 10:45         ` Chris Gray
2009-10-02 11:12           ` Carsten Dominik
2009-10-02 15:11     ` Eric Schulte

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