0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-24 21:02:51 +00:00
Commit graph

300 commits

Author SHA1 Message Date
Nicolas Goaziou da656ba48d Table caption produces trailing "nil" in pdf export
Hello,

>>>>> John Hendy writes:

> Suddenly I'm getting a line with nothing but "nil" between the caption and
> the table when exporting from org-mode to LaTeX. I swear this not happening.
> I believe I did a git pull on Friday or some time last week. The only reason
> I noticed is that I just set up emacs, org, and LaTeX on a new computer and
> tested an old file to make sure the export was working. I then checked my
> other computer with what I thought was a fine install and it's doing it now,
> too. I originally thought I missed something on the new computer, but now
> I'm wondering if it's from the fresh pull.

This patch (needed by my own mistake) should correct the problem.

Regards,

-- Nicolas
>From 38a3ae8cf8716af0db87a47a421b6d5af654d045 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Tue, 10 Aug 2010 22:43:35 +0200
Subject: [PATCH] Fix empty label bug

* org-latex.el (org-export-latex-tables): Return "" instead of nil
  when no label is attached.
2010-08-11 09:50:04 +02:00
Nicolas Goaziou caa5da1efd bug in org-mode-export-as-latex
Hello,

>>>>> Neil Hepburn writes:
> The latest version (7.01g) seems to have a bug when exporting to PDF
> (and LaTeX) with tables with labels.  The export does not label the
> table in the LaTeX file although it is labeled in the .org file.

Curiously, it looks like \label code was removed at some time.

This quick fix should put labels back.

Regards,

-- Nicolas
>From 64855c52b20766db9898ce82316fac11d51de72d Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Wed, 28 Jul 2010 20:54:40 +0200
Subject: [PATCH] Add labels to tables.

* org-latex.el (org-export-latex-tables): add label if any
* org-latex.el (org-export-latex-convert-table.el-table): fix little
  mistake when inserting label
2010-07-31 18:59:18 +02:00
Nick Dokos e555514feb Placement=[H] not exporting to LaTeX anymore?
Nick Dokos <nicholas.dokos@hp.com> wrote:

> John Hendy <jw.hendy@gmail.com> wrote:
>
> > Just to be sure I created an blank org file with only this:
> >
> > * test
> >
> > #+CAPTION: test table
> > #+ATTR_LaTeX: placement=[H]
> > | 1    | 2    | 3    | 4    |
> > |------+------+------+------|
> > | test | test | test | test |
> > | test | test | test | test |
> >
> > It gets exported to this:
> >
> > \begin{table}[htb]
> > \caption{test table}
> > \begin{center}
> > \begin{tabular}{llll}
> >
> > Did something change between 6.35 and 7.01 or in the LaTeX table options?
> >
>
> I think that placement works fine for figures, but not for tables. In
> fact, I cannot find the code that's supposed to do this for tables: I
> suspect that it never existed. So unless I'm mistaken, it seems that
> tables never got the placement treatment that figures did.
>

Try the following patch (might be wrong in detail, and its scope might
be too limited, but I hope it's not too far off: at least it seems to
work on your simple table.) It may also be white-space damaged, so some
reformatting may be needed after applying it.

Nick

>From 4c8cdde9f3d80edc882efe83562a934fd9a6a8c8 Mon Sep 17 00:00:00 2001
From: Nick Dokos <nicholas.dokos@hp.com>
Date: Fri, 23 Jul 2010 17:54:06 -0400
Subject: [PATCH] Process latex placement attribute for tables.

Figures got placement attributes previously, but tables never did.
2010-07-31 11:16:20 +02:00
Eric Schulte 717c73cc7a improve latex listings code block name export
* lisp/org-exp.el (org-export-format-source-code-or-example): escape
  underscores in code block names on latex listings export

* lisp/org-latex.el (org-export-latex-listings-w-names): make export
  of code block names to latex optional
2010-07-21 10:39:53 -07:00
Carsten Dominik 6268cceec3 Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
Carsten Dominik cdf08f347a LaTeX/pdf processing: Quote file argument for the shell
* lisp/org-latex.el (org-export-as-pdf): Quote file argument for the shell.

Patch by Gregory Grubbs.
2010-07-18 07:50:43 +02:00
Philip Rooke ef07f2afc2 Correct some docstrings [part 3]
This is the third patch in a series that makes some straightforward
corrections to a number of docstrings.  Each change is normally to:

- correct a typo, or
- fix up hyperlinks to function or variable names, or
- ensure slightly better conformance with the documentation guidelines
  and tips given in the Elisp manual

No attempt is made to provide missing docstrings or document arguments.

Cheers,

Phil
2010-07-16 20:55:38 +02:00
Carsten Dominik 065468451e LaTeX export: Make sure \nbsp{} does not create additional space
* lisp/org-latex.el (org-export-latex-preprocess): Make a special case for \nbsp.
(org-latex-entities): Remove the entry for \nbsp.
(org-latex-entities-exceptions): Variable removed.
2010-07-14 10:54:39 +02:00
Eric Schulte ef839e1080 added (sqlite "SQL") to org-export-latex-listings-langs
* lisp/org-latex.el (org-export-latex-listings-langs): added (sqlite "SQL")
2010-07-09 17:40:58 -07:00
Carsten Dominik d4781b9d88 Keep BABEL meta lines in tact
* lisp/org-latex.el (org-export-latex-first-lines): Do not mark
meta lines for removal. Do not remove BABEL config lines during export
2010-07-09 20:33:14 +02:00
Carsten Dominik 2cc4c0d564 BEAMER: Standardize the header cookie for the beamer extra stuff
* lisp/org-beamer.el (org-beamer-amend-header): Standardize the
header cookie for the beamer extra stuff.
2010-07-06 15:04:00 +02:00
Carsten Dominik e1262e57d2 LaTeX export: Allow to customize the tabular environment
* lisp/org-latex.el (org-export-latex-tabular-environment): New option.
(org-export-latex-tables): Use `org-export-latex-tabular-environment'.
2010-07-06 10:39:35 +02:00
Eric Schulte 4406aa5a34 org-latex: fixed last remaining elisp compilation warning
* lisp/org-latex.el (org-export-latex-tables): format string now
  matches options
2010-07-05 13:29:33 -07:00
Eric Schulte 6d4cf4db84 org-latex: org-export-latex-format-image now accepts optional shortname
* lisp/org-latex.el (org-export-latex-format-image): updated number of
  arguments to allow for an optional short-name
2010-07-05 09:56:20 -07:00
Eric Schulte 5edefbba26 a better way with babel
Of course, an updated patch is attached.

Best -- Eric
Carsten Dominik <carsten.dominik@gmail.com> writes:

> Hi Eric,
>
> I tried to apply the patch, but it does not apply cleanly, maybe due
> to other changes.  Can I ask you to update and resubmit?
>
> Thanks!
>
> - Carsten
>
> On Jun 21, 2010, at 6:37 PM, Eric Schulte wrote:
>
>> Hi Robert,
>>
>> Thanks for the thoughtful message.
>>
>> I present a couple of solutions below.
>>
>> Robert Cunningham <robut@iinet.net.au> writes:
>>
>>> G'day All,
>>>
>>> I wonder if I've missed something and there is a better way.
>>>
>>> Essentially I'm trying to use org babel with R and LaTeX to create
>>> figures
>>> with both long and short captions (for contents)
>>>
>>> I'd started with:
>>>
>>> #+CAPTION: Nice data (filled points indicate less nice data)
>>> #+LABEL:   fig:nicedata
>>> #+ATTR_LaTeX: width=0.98\textwidth
>>> #+begin_src R :file ndata.pdf :width 1000 :height 617 :exports
>>> results
>>>  dotchart(data$ndata)
>>> #+end_src
>>>
>>> which pointed to the need for long/short captions...
>>>
>>> feeling hopeful I tried:
>>>
>>> #+CAPTION: Nice data [Nice data (filled points indicate less nice
>>> data)]
>>> #+LABEL:   fig:nicedata
>>> #+ATTR_LaTeX: width=0.98\textwidth
>>> #+begin_src R :file ndata.pdf :width 1000 :height 617 :exports
>>> results
>>>  dotchart(data$ndata)
>>> #+end_src
>>>
>>
>> I'm attaching a patch [1] which adds shortname support for captions.
>> Once
>> applied, the following syntax will result in a caption with a
>> shortname
>> and a longname.
>>
>> --8<---------------cut here---------------start------------->8---
>> some pre-table text
>>
>> #+source: g-nicedata
>> #+begin_src gnuplot :file graph.png :exports results
>>  plot sin(x)
>> #+end_src
>>
>> #+Caption: [nice data]{a longer description of the niceness of the
>> data}
>> #+results: g-nicedata
>> [[file:graph.png]]
>>
>> some post-table text
>> --8<---------------cut here---------------end--------------->8---
>>
>> however, while this patch is still pending there is an Org-babel
>> solution below which should work immediately.
>>
>>>
>>>
>>> but no luck there.
>>>
>>> Next effort was to try to use R and LaTex more directly with
>>> noweb. I tried
>>> this:
>>>
>>>
>>>
>>> #+srcname: r-nicedata
>>> #+begin_src R :session :file ndata.pdf :results output :exports
>>> results
>>>  dotchart(data$ndata)
>>> #+end_src
>>>
>>>
>>> #+begin_src latex :noweb yes
>>>  \begin{figure}[htb!]
>>>    \centering
>>>    \includegraphics[width=0.98\textwidth]{<<r-nicedata()>>}
>>>    \caption[Nice data]{Nice data (filled points indicate less nice
>>> data)}
>>>    \label{fig:nicedata}
>>>  \end{figure}
>>> #+end_src
>>>
>>>
>>>
>>> This does produce the figure and long/short contents BUT ALSO
>>> produces this:
>>>
>>> #+results: r-nicedata
>>> [[file:ndata.pdf]]
>>>
>>> which upon export results in a link and consequently the plot
>>> appearing both
>>> in the figure and elsewhere. This second plot is unwelcome.
>>>
>>> I've tried assorted :results and :output options but have not found
>>> how to
>>> suppress the #+results: but still obtain the figure. I've always used
>>> the :session option.
>>>
>>> I've also tried twigging an org-export option to suppress pdf
>>> export but the
>>> link is still exported so that is not a solution.
>>>
>>> The current "working" solution is to use the noweb approach and
>>> then use sed
>>> to clean out the links to the second image-ugly to say the least!
>>>
>>
>> You were very close with the noweb approach.  The following
>> combination
>> should work -- notice the ":results silent" header argument to the
>> source block.
>>
>> --8<---------------cut here---------------start------------->8---
>> some pre-table text
>>
>> #+source: g-nicedata
>> #+begin_src gnuplot :file graph.png :results silent :exports none
>>  plot sin(x)
>> #+end_src
>>
>> #+begin_src latex :noweb yes
>>  \begin{figure}[htb!]
>>    \centering
>>    \includegraphics[width=0.98\textwidth]{<<g-nicedata()>>}
>>    \caption[Nice data]{some nice data -- filled points indicate less
>> nice data}
>>    \label{fig:nicedata}
>>  \end{figure}
>> #+end_src
>>
>> some post-table text
>> --8<---------------cut here---------------end--------------->8---
>>
>> is exported to the following latex,
>>
>> --8<---------------cut here---------------start------------->8---
>> some pre-table text
>>
>>
>>
>> \begin{figure}[htb!]
>>  \centering
>>  \includegraphics[width=0.98\textwidth]{graph.png}
>>  \caption[Nice data]{some nice data -- filled points indicate less
>> nice data}
>>  \label{fig:nicedata}
>> \end{figure}
>>
>> some post-table text
>> --8<---------------cut here---------------end--------------->8---
>>
>> Hope this helps,
>>
>> Best -- Eric
>>
>>>
>>>
>>>
>>> All this with org version 6.36c
>>>
>>>
>>> What have I missed? What is the best way to do this?
>>>
>>>
>>> Cheers,
>>>
>>> Robert Cunningham
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Please use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>> Footnotes:
>> [1]  From 6a55dcab99bbd7840117b8390ab5db347d2573ef Mon Sep 17
>> 00:00:00 2001
>> From: Eric Schulte <schulte.eric@gmail.com>
>> Date: Mon, 21 Jun 2010 09:02:37 -0700
>> Subject: [PATCH] add short-names to #+captions with support for
>> latex export
>>
>>  captions specified with the following syntax
>>    #+CAPTION: [shortname]{longname}
>>  will have their short and longnames handled appropriately.
>>
>>  Thanks to Robert Cunningham for suggesting this feature.
>>
>> * lisp/org-exp.el (org-export-attach-captions-and-attributes): adding
>>  a shortname attribute to caption strings under the symbol name
>>  org-caption-shortn.
>>
>> * lisp/org-latex.el (org-export-latex-tables): handling caption short
>>  names on table export
>>
>>  (org-export-latex-convert-table.el-table): handling caption short
>>  names on table.el type table export
>>
>>  (org-export-latex-links): handling caption short names on link/image
>>  export
>>
>>  (org-export-latex-format-image): now takes an optional argument
>>  specifying a caption short name
>> ---
>> lisp/org-exp.el   |   14 +++++++++-----
>> lisp/org-latex.el |   21 ++++++++++++++-------
>> 2 files changed, 23 insertions(+), 12 deletions(-)
>>
>> diff --git a/lisp/org-exp.el b/lisp/org-exp.el
>> index 029e4d7..466d7da 100644
>> --- a/lisp/org-exp.el
>> +++ b/lisp/org-exp.el
>> @@ -1256,7 +1256,7 @@ the current file."
>>   (goto-char (point-min))
>>   (while (re-search-forward org-bracket-link-regexp nil t)
>>     (org-if-unprotected-at (1+ (match-beginning 0))
>> -     (let* ((md (match-data))
>> +      (let* ((md (match-data))
>> 	    (desc (match-end 2))
>> 	    (link (org-link-unescape (match-string 1)))
>> 	    (slink (org-solidify-link-text link))
>> @@ -1381,8 +1381,8 @@ removed as well."
>> 					   select-tags "\\|")
>> 			 "\\):"))
>> 	 (re-excl (concat ":\\(" (mapconcat 'regexp-quote
>> -					   exclude-tags "\\|")
>> -			"\\):"))
>> +					    exclude-tags "\\|")
>> +			  "\\):"))
>> 	 beg end cont)
>>     (goto-char (point-min))
>>     (when (and select-tags
>> @@ -1593,11 +1593,14 @@ table line.  If it is a link, add it to the
>> line containing the link."
>> 		    "^[ \t]*\\(|[^-]\\)"
>> 		    "\\|"
>> 		    "^[ \t]*\\[\\[.*\\]\\][ \t]*$"))
>> -	cap attr label end)
>> +	cap shortn attr label end)
>>     (while (re-search-forward re nil t)
>>       (cond
>>        ((match-end 1)
>> -	(setq cap (concat cap (if cap " " "") (org-trim (match-string 1)))))
>> +	(setq cap (concat cap (if cap " " "") (org-trim (match-string 1))))
>> +	(when (string-match "\\[\\(.*\\)\\]{\\(.*\\)}" cap)
>> +	  (setq shortn (match-string 1 cap)
>> +		cap (match-string 2 cap))))
>>        ((match-end 2)
>> 	(setq attr (concat attr (if attr " " "") (org-trim
>> (match-string 2)))))
>>        ((match-end 3)
>> @@ -1609,6 +1612,7 @@ table line.  If it is a link, add it to the
>> line containing the link."
>> 		    (point-at-eol)))
>> 	(add-text-properties (point-at-bol) end
>> 			     (list 'org-caption cap
>> +				   'org-caption-shortn shortn
>> 				   'org-attributes attr
>> 				   'org-label label))
>> 	(if label (push (cons label label) target-alist))
>> diff --git a/lisp/org-latex.el b/lisp/org-latex.el
>> index 01a4b05..6c2aab2 100644
>> --- a/lisp/org-latex.el
>> +++ b/lisp/org-latex.el
>> @@ -1576,7 +1576,7 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>>              (org-table-last-column-widths (copy-sequence
>>                                             org-table-last-column-
>> widths))
>>              fnum fields line lines olines gr colgropen line-fmt align
>> -             caption label attr floatp longtblp)
>> +             caption shortn label attr floatp longtblp)
>>         (if org-export-latex-tables-verbatim
>>             (let* ((tbl (concat "\\begin{verbatim}\n" raw-table
>>                                 "\\end{verbatim}\n")))
>> @@ -1585,6 +1585,8 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>>           (progn
>>             (setq caption (org-find-text-property-in-string
>>                            'org-caption raw-table)
>> +		  shortn (org-find-text-property-in-string
>> +			  'org-caption-shortn raw-table)
>>                   attr (org-find-text-property-in-string
>>                         'org-attributes raw-table)
>>                   label (org-find-text-property-in-string
>> @@ -1652,7 +1654,8 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>>                           (if floatp "\\begin{table}[htb]\n"))
>>                         (if floatp
>>                             (format
>> -                             "\\caption{%s%s}"
>> +                             "\\caption%s{%s%s}"
>> +			     (if shortn (concat "[" shortn "]") "")
>>                              (if label (concat "\\\label{" label
>> "}") "")
>>                              (or caption "")))
>>                         (if (and longtblp caption) "\\\\\n" "\n")
>> @@ -1680,10 +1683,11 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>>
>> (defun org-export-latex-convert-table.el-table ()
>>   "Replace table.el table at point with LaTeX code."
>> -  (let (tbl caption label line floatp attr align rmlines)
>> +  (let (tbl caption shortn label line floatp attr align rmlines)
>>     (setq line (buffer-substring (point-at-bol) (point-at-eol))
>> 	  label (org-get-text-property-any 0 'org-label line)
>> 	  caption (org-get-text-property-any 0 'org-caption line)
>> +	  shortn (org-get-text-property-any 0 'org-caption-shortn line)
>> 	  attr (org-get-text-property-any 0 'org-attributes line)
>> 	  align (and attr (stringp attr)
>> 		     (string-match "\\<align=\\([^ \t\n\r,]+\\)" attr)
>> @@ -1721,7 +1725,8 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>>       (setq tbl (concat "\\begin{center}\n" tbl "\\end{center}")))
>>     (when floatp
>>       (setq tbl (concat "\\begin{table}\n"
>> -			(format "\\caption{%s%s}\n"
>> +			(format "\\caption%s{%s%s}\n"
>> +				(if shortn (format "[%s]" shortn) "")
>> 				(if label (format "\\label{%s}" label) "")
>> 				(or caption ""))
>> 			tbl
>> @@ -1822,6 +1827,7 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>> 			  "file")))
>> 	    (coderefp (equal type "coderef"))
>> 	    (caption (org-find-text-property-in-string 'org-caption
>> raw-
>> path))
>> +	    (shortn (org-find-text-property-in-string
>> org-caption-shortn raw-path))
>> 	    (attr (or (org-find-text-property-in-string
>> org-attributes raw-
>> path)
>> 		      (plist-get org-export-latex-options-plist
>> :latex-image-
>> options)))
>> 	    (label (org-find-text-property-in-string 'org-label raw-path))
>> @@ -1859,7 +1865,7 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>> 		   (plist-get org-export-latex-options-plist :inline-images))
>> 	      ;; OK, we need to inline an image
>> 	      (insert
>> -	       (org-export-latex-format-image raw-path caption label attr)))
>> +	       (org-export-latex-format-image raw-path caption label
>> attr shortn)))
>> 	     (coderefp
>> 	      (insert (format
>> 		       (org-export-get-coderef-format path desc)
>> @@ -1889,7 +1895,7 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>> 	     (t (insert "\\texttt{" desc "}")))))))
>>
>>
>> -(defun org-export-latex-format-image (path caption label attr)
>> +(defun org-export-latex-format-image (path caption label attr
>> &optional shortn)
>>   "Format the image element, depending on user settings."
>>   (let (ind floatp wrapp multicolumnp placement figenv)
>>     (setq floatp (or caption label))
>> @@ -1932,7 +1938,7 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>> 	   (floatp "\\begin{figure}%placement
>> \\centering
>> \\includegraphics[%attr]{%path}
>> -\\caption{%labelcmd%caption}
>> +\\caption%shortn{%labelcmd%caption}
>> \\end{figure}")
>> 	   (t "\\includegraphics[%attr]{%path}")))
>>
>> @@ -1953,6 +1959,7 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>> 			 (expand-file-name path)
>> 		       path))
>> 	       (cons "attr" attr)
>> +	       (cons "shortn" (if shortn (format "[%s]" shortn) ""))
>> 	       (cons "labelcmd" (if label (format "\\label{%s}"
>> 						  label)""))
>> 	       (cons "caption" (or caption ""))
>> --
>> 1.7.0.4
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> - Carsten

>From 5cbb38e25a2d2eae7c3c688d347f80619ecb8463 Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Thu, 1 Jul 2010 08:07:17 -0700
Subject: [PATCH] add short-names to #+captions with support for latex export

  captions specified with the following syntax
    #+CAPTION: [shortname]{longname}
  will have their short and longnames handled appropriately.

  Thanks to Robert Cunningham for suggesting this feature.

* lisp/org-exp.el (org-export-attach-captions-and-attributes): adding
  a shortname attribute to caption strings under the symbol name
  org-caption-shortn.

* lisp/org-latex.el (org-export-latex-tables): handling caption short
  names on table export

  (org-export-latex-convert-table.el-table): handling caption short
  names on table.el type table export

  (org-export-latex-links): handling caption short names on link/image
  export

  (org-export-latex-format-image): now takes an optional argument
  specifying a caption short name
2010-07-02 10:14:12 +02:00
Eric Schulte b9548e92ab org-latex: now checking org-example rather than org-protected on verbatim export
* lisp/org-latex.el (org-export-latex-fixed-width): now checking
  org-example rather than org-protected on verbatim export, because by
  default all ": " prefixed lines are marked protected
2010-06-28 14:15:23 -07:00
Eric Schulte da8fffa5a4 org-latex: check for protection before wrapping ": " lines as verbatim
* lisp/org-latex.el (org-export-latex-fixed-width): check for
  protection before wrapping ": " lines as verbatim
2010-06-28 11:40:47 -07:00
Bastien Guerry 47996c02cb Fix and improve list exporting to latex.
* lisp/org-latex.el: items are no longer skipped when their first line
  ends on a protected element.
* lisp/org-list.el: protected environments looking like lists are not
  exported anymore.

Thanks to Nicolas Goaziou <n.goaziou@gmail.com> for this patch.
2010-06-16 21:26:49 +02:00
Nicolas Goaziou 33445118cf org-latex.el : do not protect environments already protected.
Environments coming from latex backend specific instructions (#+LaTeX)
are already protected and won't be treated as normal environments.

* lisp/org-latex.el (org-export-latex-preprocess): Environments coming
  from latex backend specific instructions (#+LaTeX) are already
  protected and won't be treated as normal environments.
2010-06-13 09:20:09 -07:00
Carsten Dominik b27c1c5113 Fix whitespace problems 2010-06-07 08:35:10 +02:00
Carsten Dominik bc53b3da3b Minor fixes
* lisp/org-latex.el (org-export-latex-fontify): Avoid fontifying
several stars in a row.
* lisp/org.el (org-emphasis-alist): Mention
`org-export-docbook-emphasis-alist' in the docstring.
2010-06-01 09:43:03 +02:00
Carsten Dominik 2d3817d51a LaTeX export: Implement table* environment for wide tables
Patch by Chris Gray.
2010-05-15 14:26:38 +02:00
Carsten Dominik 9a1612410f LaTeX Export: Fix problem with alignment specs that contain a comma 2010-05-14 14:27:35 +02:00
Carsten Dominik be232c4c21 LaTeX export: Fix TODO keyword export 2010-05-13 08:47:26 +02:00
Carsten Dominik 8a671f8d4d LaTeX export: Use special formatting by link type interface
Patch by Christian Moe, who writes:

> It looks like support for formatting custom link types in LaTeX export
> is broken?
>
> I was trying to implement a custom link type with its own formatting
> function for HTML and LaTeX export, following the steps in
> org-bbdb.el.
>
> I've found that org-bbdb-export does not italicize bbdb links in
> LaTeX, nor does my own org-cite-export turn my custom =cite:= links
> into LaTeX =\cite{}= citations. Everything works fine in HTML export,
> but in LaTeX all custom link types get formatted as =\texttt{descr}=.
>
> I see that org-export-as-html and org-export-as-docbook look up
> org-link-protocols to get the function for formatting the link, but it
> seems that org-export-as-latex doesn't.
>
>
2010-05-12 15:14:17 +02:00
Carsten Dominik 95c725ae38 Fix typo 2010-05-09 23:01:56 +02:00
Carsten Dominik c86a3fc4aa Push version number to 6.36trans 2010-05-09 06:24:20 +02:00
Carsten Dominik 88100d1580 Release 6.36a 2010-05-09 06:13:54 +02:00
Carsten Dominik 9fdff15758 LaTeX export: Fix bug with export of x^{(0)}
Report by Dan Davison
2010-04-28 17:21:41 +02:00
Carsten Dominik 91749e6594 Make the inclusion of packages for snippet creation optional 2010-04-27 07:44:14 +02:00
Carsten Dominik b82652d90c Implement offsets for ordered lists
1. [@start:12] will star a lit a number 12
2010-04-26 14:29:17 +02:00
Carsten Dominik 18c5609ea0 Make sure result buffer of LaTeX export is in LaTeX mode
Report and patch from Dan Davison
2010-04-25 09:13:42 +02:00
Carsten Dominik ff38550278 Allow a dash in the name of a latex document class setup.
A line like    #+LATEX_CLASS: auto-report
will now work.

Report by Nicolas Girad.
2010-04-23 20:57:47 +02:00
Carsten Dominik 43bf1bbbd7 Push version number to 6.35trans 2010-04-15 12:24:55 +02:00
Eric Schulte e26deb647f fixes BUG in `org-export-as-latex' -- was only exporting the body
This bug was introduced in commit

    1b40601ebd

  which sets the body-only option to true when called with a simple
  prefix argument, however it does not check that the prefix argument
  is non-null.

  Thanks to Valentin Wüstholz for reporting this bug
2010-04-11 10:14:21 -06:00
Eric Schulte 1b40601ebd `org-export-as-latex' set the body-only option when called with a simple prefix arg
This can be useful for exporting a small active region (often a
  table) to latex for pasting into an existing latex buffer.
2010-04-09 09:11:43 -06:00
Carsten Dominik 6f3026edf1 Release 6.35g 2010-04-08 20:15:15 +02:00
Carsten Dominik a589c7a22e Release 6.35f 2010-04-08 10:36:32 +02:00
Carsten Dominik 50e5924d8a Release 6.35e 2010-04-07 16:33:52 +02:00
Carsten Dominik f722763f8a Release 6.35d 2010-04-07 16:26:42 +02:00
Carsten Dominik d65ed03be6 Update copyright notices and fix wrong version tags 2010-04-07 16:26:10 +02:00
Carsten Dominik f3a25f4d34 Fix caption processing in LaTeX export 2010-04-07 16:10:28 +02:00
Carsten Dominik 007c7bc64b Allow entities to be terminated by {} 2010-04-07 15:32:31 +02:00
Carsten Dominik cafbe1d038 Release 6.35c 2010-04-07 08:58:25 +02:00
Carsten Dominik b213c0f31e Release 6.35b 2010-04-07 07:54:14 +02:00
Carsten Dominik 08d0d2fa20 Release 6.35 2010-04-06 09:16:36 +02:00
Carsten Dominik fea1742762 Fix typo 2010-04-06 09:15:16 +02:00
Carsten Dominik f2b8c25e7a More details about LaTeX setup 2010-04-05 15:10:22 +02:00
Carsten Dominik 00afe22952 Specify the position where the packages are inserted in the LaTeX header. 2010-04-04 08:37:03 +02:00
Carsten Dominik 8fdf80bb5b Fix whitespace and compiler wanings 2010-04-01 13:11:54 +02:00
Carsten Dominik f813b09747 Add the ChangeLog entries 2010-04-01 12:56:23 +02:00
Carsten Dominik a6544ef711 Collect packages to a variable 2010-04-01 12:44:02 +02:00
Carsten Dominik cc2d79d5ac More bug fixes 2010-04-01 12:44:02 +02:00
Carsten Dominik aa220a1e6a More fixes 2010-04-01 12:44:02 +02:00
Carsten Dominik da556cee82 Implement new and better support for entities 2010-04-01 12:44:01 +02:00
Carsten Dominik 313f01d297 Do some formatting of table and figure captions
Table and figure captions are not fully processed.  Now we at least do
basic formatting, but links and footnotes still do not work.
2010-03-29 07:30:00 +02:00
Carsten Dominik 4892c8899e Implement index generation during export
This new code will search #+INDEX lines in the buffer.  For LaTeX, it
will simple convert these into LaTeX \index{} commands.  For other
backends, it will copy thee entries to a new file, with extension
orgx.  These files can then later be post-processed to create the index.
2010-03-28 09:27:33 +02:00
Carsten Dominik 1d4ee49c91 LaTeX export: Do not mistake table.el borders for strike-through emphasis. 2010-03-24 18:44:25 +01:00
Carsten Dominik 15ec1c56ad LaTeX export: Allow parenthesis before exponent of subscript
Keith writes:

> I noticed something strange and I think it's might be a bug converting
> to tex file. I've been trying to put a special symbol inside a
> bracket, e.g.
>
>  air temperature (degree Celsius)
>
> and the symbol should look like ^{\circ}C in org file. It works well
> if it is standalone. However, when I put the brackets out of it, say
> (^{\circ}C), the pdf output looks bizarre. I have checked the tex
> output and the converting results from orgmode file are
>
>  ^{\circ}C   -->   $^{\circ}$C
>  (^{\circ}C) -->   (^\{\circ}C)
2010-03-24 12:26:50 +01:00
Carsten Dominik 749fc76c2d No extra newline after time planning line 2010-03-19 19:51:58 +01:00
Carsten Dominik b68c61e829 Fix problem with a missing function in XEmacs
`latexenc-coding-system-to-inputenc' does not seem to be available in XEmacs.
2010-03-12 17:29:41 +01:00
Carsten Dominik 2b3cb66d54 LaTeX export: Fix another problem with #+AUTHOR export
Jambunathan K. writes:

> I would like to add the following observation as well -
>
> ---> org input <---
> #+AUTHOR: Jambunathan K\cr\href{mailto:{{{EMAIL}}}}{{{{EMAIL}}}}
>
> ---> actual tex output <---
> \author{Jambunathan K\cr\href{mailto:kjambunathan@gmail.com}\{kjambunathan@gmail.com\}}
>
> The above tex snippet has the effect of getting the "Url Box" wrong.
>
> I was hoping to produce the following line -
> \author{Jambunathan K\cr\href{mailto:kjambunathan@gmail.com}{kjambunathan@gmail.com}}
>
> Generally speaking, macro expansion in author string behaves strangely.
2010-03-12 15:21:41 +01:00
Carsten Dominik 1902dfacbe LaTeX export: Macro processing also in author field 2010-03-09 17:24:31 +01:00
Carsten Dominik 48d4ebeb80 LaTeX export: Add \usepackage{latexsym} to the default packages 2010-03-04 07:36:23 +01:00
Carsten Dominik 85df69a5c0 LaTeX export: Protect examples, even if they look like table.el tables
The recent patch to introduce table.el export in LaTeX forgot to check
protectedness.
2010-03-03 13:26:24 +01:00
Carsten Dominik 1c87de51fc LaTeX export: Fix export of &&
Lukasz Stelman writes:

I've create some presentation on programming (some more to do) and to my
surprise I've discovered that if org-mode escapes one "&" properly it
doesn't do its job in case of "&&" (and a single "^" too). I get "\&&"
in latex file which of course is wrong.
2010-03-03 12:59:26 +01:00
Carsten Dominik 6d1e30828b Re-install the support for table.el tables again.
This support was totally broken.  It works now again.  Unfortunately
it is not possible to edit the table directly in the org-mode buffer
anymore - to edit such a table, you have to use C-c '
2010-02-26 22:33:49 +01:00
Carsten Dominik 045676bcaa LaTeX export: Protect footnotes in headings 2010-02-26 21:02:25 +01:00
Carsten Dominik 26b0824f5a LaTeX export: Protect footnotes in headlines 2010-02-23 07:32:06 +01:00
Carsten Dominik d0b0f776d2 Export: Kill product buffer if it has been displayed directly
Request by Livin Stephen Sharma
2010-02-21 09:19:21 +01:00
Carsten Dominik d2f219fd41 LaTeX export: When exporting to a buffer only, do not require a file name 2010-02-12 08:34:00 +01:00
Carsten Dominik 6a15c45544 Use \providecommand to make sure \alert is defined 2010-02-03 16:13:49 +01:00
Carsten Dominik d7c63f6760 LaTeX export: Make inputenc coding system default to utf8 2010-02-02 06:31:21 +01:00
Carsten Dominik b66858acbb LaTeX export: Define the align macro 2010-02-01 17:15:54 +01:00
Carsten Dominik 04057e2195 LaTeX export: Protect <...> arguments for BEAMER export
Bill Jackson writes:

> When exporting to LaTeX, curly brackets in a command will be escaped
> if that command also contains angle brackets.  This can be a problem
> when using beamer.  An example input file:
>
> ------------------------------------------------------------------------
>
> #+LaTeX_CLASS: beamer
>
> * The One and Only Frame
>  When LaTeX \alert<2>{commands} contain angle brackets, the curly
>  brackets are erroneously escaped in the output.  \alert{Commands}
>  that do not contain angle brackets work properly.
>
> ------------------------------------------------------------------------
>
> Typing C-c C-e l will generate the output file:
>
> ------------------------------------------------------------------------
>
> % Created 2010-01-15 Fri 13:57
> \documentclass{beamer}
> \usepackage[latin1]{inputenc}
> \usepackage[T1]{fontenc}
> \usepackage{graphicx}
> \usepackage{longtable}
> \usepackage{float}
> \usepackage{wrapfig}
> \usepackage{soul}
> \usepackage{amssymb}
> \usepackage{hyperref}
>
>
> \title{escCurly}
> \author{}
> \date{15 January 2010}
>
> \begin{document}
>
> \maketitle
>
> \begin{frame}
> \frametitle{Outline}
> \setcounter{tocdepth}{3}
> \tableofcontents
> \end{frame}
>
> \begin{frame}
> \frametitle{The One and Only Frame}
> \label{sec-1}
>
>  When \LaTeX{} \alert<2>\{commands\} contain angle brackets, the curly
>  brackets are erroneously escaped in the output.  \alert{Commands}
>  that do not contain angle brackets work properly.
> \end{frame}
>
> \end{document}
2010-01-28 15:50:20 +01:00
Carsten Dominik 4ba2cb0860 Improve LaTeX export of the words LaTeX and TeX
Bill Jackson writes:

> When exporting to LaTeX, the commands \LaTeX and \TeX are not
> processed consistently.  In particular, the backslash for \LaTeX is
> escaped.  This might not be a bug, but it is a bit confusing.  An
> example input file:
>
> ------------------------------------------------------------------------
>
> * The One and Only Header
>  The command \LaTeX generates an escaped backslash, while \TeX and
>  \alpha do not.  Note that LaTeX is converted to a command, while TeX
>  is not.
>
> ------------------------------------------------------------------------
>
> Typing C-c C-e l will generate the output file:
>
> ------------------------------------------------------------------------
>
> % Created 2010-01-15 Fri 13:47
> \documentclass[11pt]{article}
> \usepackage[latin1]{inputenc}
> \usepackage[T1]{fontenc}
> \usepackage{graphicx}
> \usepackage{longtable}
> \usepackage{float}
> \usepackage{wrapfig}
> \usepackage{soul}
> \usepackage{amssymb}
> \usepackage{hyperref}
>
>
> \title{escLaTeX}
> \author{}
> \date{15 January 2010}
>
> \begin{document}
>
> \maketitle
>
> \setcounter{tocdepth}{3}
> \tableofcontents
> \vspace*{1cm}
> \section{The One and Only Header}
> \label{sec-1}
>
>  The command \\LaTeX{} generates an escaped backslash, while \TeX and
>  $\alpha$ do not.  Note that \LaTeX{} is converted to a command, while TeX
>  is not.
>
> \end{document}
2010-01-28 15:29:35 +01:00
Carsten Dominik 0618d821cf LaTeX export: Set coding system only if the class specifies AUTO for it
The coding system of the LaTeX class will now only be set to the value
corresponding to the buffer's file coding system if the class
specifies \usepackage[AUTO]{inputenc}.  Any other value for the coding
system will not be modified.
2010-01-24 18:09:33 +01:00
Carsten Dominik 2e53d9b137 Remove comma after means in many docstrings
Stephen Eglen says these commas should not be there.
2010-01-21 16:15:40 +01:00
Carsten Dominik cae0c63c48 Make hyperref macro customizable
This was a request by Martin G. Skjaeveland
2010-01-20 10:27:45 +01:00
Carsten Dominik 06e74afce3 Version number to 6.34trans 2010-01-20 10:13:21 +01:00
Carsten Dominik a1709ba641 Release 6.34c 2010-01-18 00:10:11 +01:00
Carsten Dominik 8fd14ae648 LaTeX export: Fix another protection bug, this time the char before a "\" 2010-01-15 08:05:22 +01:00
Carsten Dominik 2f2f9441d4 Release 6.34b 2010-01-14 23:06:55 +01:00
Carsten Dominik c077142241 Release 6.34a 2010-01-12 08:53:44 +01:00
Carsten Dominik a882a7031c Release 6.34 2010-01-10 11:00:18 +01:00
Carsten Dominik 288c724335 Release 6.34 2010-01-10 10:57:53 +01:00
Carsten Dominik 275b6627a6 Release 3.34 2010-01-10 10:54:52 +01:00
Carsten Dominik bb488fa3b1 Fix \usepackage{inputenc} in LaTeX export
The option will now reflect the coding system of the file that was
created by exporting the buffer.
2010-01-10 10:18:27 +01:00
Carsten Dominik 3332383db7 LaTeX export: New hook that runs after saving the buffer 2010-01-06 08:50:47 +01:00
Carsten Dominik 76b8cab651 Add support for BEAMER notes. 2010-01-05 17:33:59 +01:00
Carsten Dominik e1a18bdf27 Fix bug with #+BIND during LaTeX export
Christopher Suckling writes:

> Thank you, but not quite working yet:
>
> ,----
> | #+BIND: org-export-latex-title-command ""
> `----
>
> now appears to be having the *effect* of setting a global variable.
>
> I load Emacs then visit the below test org file. I then export the file.
>
> I get a \maketitle line.
>
> I then C-c C-c on the #+BIND: line and re-export.
>
> \maketitle is removed.
>
> I then export another org file without the #+BIND: line.
>
> There is no \maketitle, even though there should be.
>
> I add
>
> ,----
> | #+BIND: org-export-latex-title-command "\foobar"
> `----
>
> to the new org file, C-c C-c and export:
>
> \foobar is added to the exported file.
>
> Finally, I re-export the original test org file (without C-c C-c on the
> #+BIND: line):
>
> \foobar is added to the exported file.
>
> However,
>
> ,----
> | C-h v org-export-latex-title-command
> `----
>
> always returns the value "\\maketitle", no matter what the value of the
> #+BIND: line.
>
> Best, Christopher
2010-01-04 17:49:39 +01:00
Carsten Dominik aadd7399e1 The text of a radio target must sill be processed in LaTeX export 2009-12-24 09:29:59 +01:00
Carsten Dominik 7a346a16c5 Install BIND in buffer before LaTeX export. 2009-12-20 13:29:43 +01:00
Carsten Dominik 315c9fd1a1 Fix LaTeX export when there is no #+TEXT stuff 2009-12-18 16:00:46 +01:00
Carsten Dominik fc96f63056 LaTeX export: Preprocess TEXT properly 2009-12-18 09:06:34 +01:00
Carsten Dominik 30d179c85e LaTeX export: Fix line end after caption command for longtable environments 2009-12-17 10:57:42 +01:00
Carsten Dominik 567c753f8b LaTeX export: Only define a caption for longtable if there is one
Report by Ulf Stegemann.
2009-12-16 20:25:20 +01:00
Carsten Dominik 41d82c78f9 Fix bug with protecting LaTeX macros
The regular expression was not optimal, and if there was a horizontal
rule, search would not start from the beginning of the buffer but from
after the rule!
2009-12-16 19:54:54 +01:00
Carsten Dominik 093fe01017 Cleanup empty lines in itemize environments 2009-12-16 11:47:51 +01:00
Carsten Dominik a482182a73 Allow to export to LaTeX while in column view 2009-12-16 11:12:05 +01:00