From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: New LaTeX exporter and source code blocks Date: Sat, 05 May 2012 11:32:13 -1000 Message-ID: References: <87lil6e45e.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQmaZ-0001Jq-HH for emacs-orgmode@gnu.org; Sat, 05 May 2012 17:32:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQmaX-0003Vf-DW for emacs-orgmode@gnu.org; Sat, 05 May 2012 17:32:27 -0400 Received: from oproxy6-pub.bluehost.com ([67.222.54.6]:52058) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SQmaX-0003VW-46 for emacs-orgmode@gnu.org; Sat, 05 May 2012 17:32:25 -0400 In-Reply-To: <87lil6e45e.fsf@gmail.com> (Nicolas Goaziou's message of "Sat, 05 May 2012 22:58:37 +0200") 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: Nicolas Goaziou Cc: Org-mode Nicolas Goaziou writes: > tsd@tsdye.com (Thomas S. Dye) writes: > >> The new LaTeX exporter doesn't properly handle source code blocks with >> :exports results. The following snippet exports correctly with the old >> exporter. >> >> ---- Org-mode source ---- >> #+name: ACM-categories >> #+header: :var c=categories >> #+header: :results latex >> #+header: :exports results >> #+BEGIN_SRC emacs-lisp >> (defun category-record (r) >> (format "\\category{%s}{%s}{%s}[%s]" >> (first r) (second r) (third r) (fourth r))) >> (let ( (i (mapcar (lambda (row) >> (category-record row)) >> (cdr (cdr c))))) >> (mapconcat 'identity i "\n") >> ) >> #+END_SRC >> #+RESULTS: ACM-categories >> #+BEGIN_LaTeX >> \category{H.4}{Information Systems Applications}{Miscellaneous}[] >> \category{D.2.8}{Software Engineering}{Metrics}[complexity measures, performance measures] >> #+END_LaTeX >> ------------------------- >> >> ---- LaTeX output ---- >> \#+name: ACM-categories >> \#+header: :var c=categories >> \#+header: :results latex >> \#+header: :exports results >> ---------------------- > > This is a known bug: affiliated keywords are left over if the block > disappears. It will be solved once org-element.el is merged into master > (see commit dec32064a72be7a20bbddcc1f8544a604619ad7b). > Great. Looking forward to the merge. >> Also, the new exporter seems to skip over #+BEGIN_LaTeX ... #+END_LaTeX >> blocks. > > This is now fixed. Thank you. Yes, LaTeX blocks are now exported. Thanks. Here is a problem with CAPTION and ATTR_LaTeX lines. Note that the \table{} environment wasn't established. ---- Org-mode ---- #+CAPTION: Frequency of Special Characters #+ATTR_LaTeX: align=|c|c|l| |---------------------+-------------+-------------------| | Non-English or Math | Frequency | Comments | |---------------------+-------------+-------------------| | \O | 1 in 1,000 | For Swedish names | |---------------------+-------------+-------------------| | $\pi$ | 1 in 5 | Common in math | |---------------------+-------------+-------------------| | \$ | 4 in 5 | Used in business | |---------------------+-------------+-------------------| | $\Psi^2_1$ | 1 in 40,000 | Unexplained usage | |---------------------+-------------+-------------------| ------------------ ---- LaTeX export ---- \#+CAPTION: Some Typical Commands \#+ATTR$_{\mathrm{\LaTeX{}}}$: table* align=|c|c|l| \begin{center} \begin{tabular}{} \hline Command & A Number & Comments\\ \hline \texttt{\textbackslash{}alignauthor} & 100 & Author alignment\\ \hline \texttt{\textbackslash{}numberofauthors} & 200 & Author enumeration\\ \hline \texttt{\textbackslash{}table} & 300 & For tables\\ \hline \texttt{\textbackslash{}table*} & 400 & For wider tables\\ \hline \end{tabular} \end{center} ---------------------- When #+CAPTION: is used with figures the \figure{} environment isn't established. ---- Org-mode ---- #+CAPTION: A sample black and white graphic (.eps format). [[file:fly.eps]] ------------------ ---- LaTeX export ---- \#+CAPTION: A sample black and white graphic (.eps format). \includegraphics[width=.9\linewidth]{fly.eps} ---------------------- All the best, Tom -- T.S. Dye & Colleagues, Archaeologists 735 Bishop St, Suite 315, Honolulu, HI 96813 Tel: 808-529-0866, Fax: 808-529-0884 http://www.tsdye.com