Many different people want to set many different variables in a
buffer-local way for export. This cannot be done with file variables,
because the Org buffer is not current while the exporter is running.
Lots of variables can be set with the #+OPTIONS lines, but finding
abbreviations goes only so far.
Therefore we have now a general mechanism that can be used to bind
variables during export operations.
a line like: #+BIND: variable value
will bind the variable to value. For example,
the line
>> #+OPTIONS: toc:nil
can now equivalently be written as
>> #+BIND: org-export-with-toc nil
Some propel process LaTeX filed not directly to pdf, but go
through dvi and then to ps or pdf. In that case, allowed images
are ps and eps files, not pdf and jpg.
This commit adds the two extensions, so that export using that
alternative path can be supported better. However, it is up to the
user to make sure that the images are actually compatible with the
backend.
All export commands now push the result to the kill ring by default.
This is subject to the variable `org-export-push-to-kill-ring'.
Also, this commit adds a new variable
`org-export-show-temporary-export-buffer' which can be used to turn
off the display of the temporary buffer containing the exported text.
Since this stuff is now automatically pushed onto the kill ring, some
people might prefer not to see this buffer.
Jason Riedy writes:
> I'm trying to change org-export-latex-image-default-option
> to "width=.7\\linewidth" in a file local variable. It's set
> correctly as a buffer local variable, and it's having no
> effect on the export. My guess is that the buffer-local
> property is stopping it as soon as org-export-as-latex runs
> set-buffer.
>
> I can smuggle the value in by adding an entry to org-export-plist-vars
> referring to org-export-latex-image-default-option and pulling the value
> from the plist, but that feels incorrect.
It is actually the correct way to do this, and I have
implemented this change.
Matt Lundin writes:
> When I select a region and invoke
> org-replace-region-by-latex, the region is removed, but no
> latex output is put in its place. In other words, the region
> is simply deleted.
>
> Strangely, if I select multiple headlines, they are
> converted to latex. But if I select only text underneath a
> headline, it is not replaced.
This is hopefully fixed now.
Chris Gray had the idea to have arbitrary blocks turned in LaTeX
environments and HTML divs. These three new hooks allow
implementation has an add-on rather than a patch.
Scot Becker writes:
> Prompted by Chris Gray's request for org markup in Latex
> environment, I thought I'd submit a note (for his sake and
> others') about a few quirks of org-latex-export's handling
> of embedded Latex markup in org documents. I have been
> puzzling with these for a while but only discovered the
> problem triggers (and workarounds) this morning just before
> Chris' mail arrived. These are both about inline Latex
> commands:
>
> I use a few custom commands \mycommand{like this}, and
> occasionally have to invoke the odd bit of standard LaTeX
> markup, for example /when \textbf{embedding bold text}
> inside italics/. For the most part, these work fine, but
> I've discovered the following two 'gotchas' that happen when
> exporting to LaTeX.
>
> 1. Inline Latex commands get their final curly brace
> escaped with a slash (and therefore don't work) if they
> spill over into another line, i.e. if they contain one or
> more newlines. This is true also for standard LaTeX
> commands like \textbf{} and \emph{}.
>
> ----------------SAMPLE------------------------
> \mycommand{So, for example this
> wrapped setence gets a slash added just after the
> final period and before the curly brace.} Org is quite
> helpfully escaping the slash for LaTeX, apparently.
>
> \mycommand{no trouble if it's all on one line}
> ------------------END-------------------------
>
> The workaround of putting all such commands on one line is
> no hardship for me, since I use visual-line-mode in Emacs 23
> and keep my paragraphs as single logical lines. It might be
> harder for those accustomed to hard-wrapping their
> paragraphs.
>
>
> 2. If you have two inline Latex commands on the same
> logical line, org's latex export doesn't treat the text
> between them in its usual manner. Italics get processed,
> but not the latexification of quotes. ("this" --> ``this'')
> For example:
>
> ----------------SAMPLE------------------------
> I have a short custom command to tell Latex to invoke a
> Hebrew-language right-to-left environment when I want to refer to a
> Hebrew phrase like this: \heb{phrase here}. But then if I "quote
> something," and follow that by another \heb{phrase}, the inner
> quotation marks don't get processed. Oddly enough, this problem is
> only triggered when there is an inline Latex command both before and
> after the quoted material on the same logical line.
>
> Now if you put a footnote in between those two inline Latex commands,
> the output is really nutty:
>
> And \heb{phrase here} with a footnote[fn:: Footnote here.] I'm not
> sure what funky org commands get invoked, but again, only when
> bookended by an inline Latex command like \heb{phrase here}.
> ------------------END-------------------------
>
> The nutty output is a number in square brackets like
> this[1], with the following at the bottom of the document:
>
> \$\^{}{1}\$ Footnote here.
>
> This has a the opposite work-around: break the lines so
> those elements are not all on the same logical line. Put in
> a few newlines. Latex, of course doesn't care. Do take
> care not to start a newline with the org-footnote, like this
> [fn:: Org doesn't parse a footnote command which starts on
> its own line.]
>
> This is just "for what it's worth" to those who use org-mode
> as a front-end to writing for LaTeX.
These problems were caused by a regular expression for
matching latex macros with arguments, that did not allow any
newlines. Now we have a much better regexp, that even
allows for three levels of nested braces.
Time stamps in LaTeX export now also honor custom time stamp formats.
Furthermore, the new option `org-export-latex-timestamp-markup' can
specify special markup for time stamps.