# Tag Info

46

The simplest way to tweak the formatting of a LaTeX export is by using the geometry package. Try something like this: #+LATEX_HEADER: \usepackage[margin=0.5in]{geometry}

38

Org mode 8 no longer accepts LaTeX characters like that. The correct way to do it is embed export snippets in the title: #+TITLE: Foo @@latex:\\@@ Bar I assume therefore that if you want to export newlines in both LaTeX and HTML, the code might have to look like this: #+TITLE: Foo @@latex:\\@@ @@html:<br>@@ Bar Source: https://lists.gnu.org/archive/...

31

This may be a preferred way (due to its simplicity) of accomplishing your goal -- it seems to have gotten buried in the comments of another answer: Add the following to your .emacs file: (require 'ox-extra) (ox-extras-activate '(ignore-headlines)) Use the ignore tag on headlines you'd like to have ignored (while not ignoring their content) NOTE: if you ...

30

The following command lets you choose a back-end and then exports each top-level subtree to a separate file: (defun org-export-all (backend) "Export all subtrees that are *not* tagged with :noexport: to separate files. Note that subtrees must have the :EXPORT_FILE_NAME: property set to a unique value for this to work properly." (interactive "sEnter ...

25

The full sequence of steps that worked for me: From the command line: Run emacs without loading the init file: emacs -q In emacs: run C-u M-x org-reload Use package-list-packages to uninstall org: select it then d x Use package-list-packages to reinstall org: select it then i x After restarting emacs, everything worked.

25

is #+OPTIONS: \n:t what you want (see org-export-preserve-breaks)? place this line anywhere in your org-file to preserve line breaks. ref: The Org Manual/Exporting/Export settings

24

Add the following at the beginning of your file. #+OPTIONS: ^:nil It should do the trick. If it doesn't, I'd check org-symbols: http://orgmode.org/worg/org-symbols.html

21

This page has a nice description on how to extend org-mode links. It doesn’t address your specific concern, but it explains the basic principle. Let’s say we want your links to be defined like this, anywhere in the buffer, #+LINK-ID: wiki http://www.emacswiki.org and invoked like this [[lid:wiki][You should check out the wiki]] First, you need to tell ...

20

20

org-mode exports _ as subscripts and ^ as superscripts The default export behavior can be customized using the menus Org -> Customize -> Browse Org Group. To update the default behavior for subscripts & superscripts, choose: [-]-\ Group Org Export [-]-\ Group Org Export General — Option Org Export With Sub Superscripts Org Export With ...

17

If you want to construct examples yourself (that's what I'm getting from your question, but correct me if I'm wrong), use an EXAMPLE block instead of a SRC block: #+BEGIN_EXAMPLE $ls dir1 dir2 file1 file2 ... #+END_EXAMPLE When exporting to HTML, this block becomes: <pre class="example">$ ls dir1 dir2 file1 file2 ... </pre> As you can see, ...

17

Hyperlinks in pdfs exported from org documents are generated by the LaTeX hyperref package. This package is included by default, and options can be set in the customize interface for org-latex-default-packages-alist. For example, adding the option colorlinks=true to the entry for hyperref will switch from boxed links to coloured links. There are quite a few ...

16

Another way to achieve the same effect more permanently is to modify org-latex-packages-alist to add the geometry package, as follows: (setq org-latex-packages-alist '(("margin=2cm" "geometry" nil)))

15

According to the cited manual page, EXPORT_FILE_NAME applies only for subtree export. Whole file export will take its name from the buffer file name. If you only have 1 level-1 headline, you may add this property to a drawer inside the first heading, and always export as subtree from inside this top-level heading to get your desired file name.

15

15

From a LaTeX point of view, these are different cases. In the first case, LaTeX isn't going to wrap -- and it shouldn't! A "verbatim" environment, which is what source-code is set in, respects lines precisely and doesn't break paragraphs, because LaTeX simply can't know where to break them. If you want to wrap the lines, you have to wrap them in the source-...

14

Also, it is good to know that the dollar syntax $...$ is not always recommended in LaTeX (and the double dollar syntax, $$...$$, for displayed equations, in strongly discouraged). For further info see this and this question on TeX.SE. Needless to say, Org-mode supports both $$...$$ and $...$. Try exporting this to LaTeX: * Dollars hello $E=mc^2$ * ...

14

A possible solution is to write a file with the LaTeX preamble, like %% This is the file MyTeXHeader.tex \usepackage[main=british,polutonikogreek]{babel} \usepackage{fontspec} \usepackage{hanging} \setmainfont{ebgaramond}[Contextuals=Alternate] \newcount\instr \instr=1 % hide/show instructions \babelhyphenation[british]{philo-sophy} and then use a single ...

13

First, I believe org can use htmlize to automatically color your source code blocks according to your theme. Alternatively. Check out http://definitelyaplug.b0.cx/post/custom-inlined-css-in-org-mode-html-export/. It has a great example of how to use the org-export-before-processing-hook to throw custom css onto an org document before an html export. Here'...

13

Org uses org-export-collect-headlines to collect headlines that should be in the TOC. This function already includes two criteria for excluding headlines: the headline depth and whether it is a "footnote section" (*), so it is easy to add another one. See the modified version of org-export-collect-headlines below. This version makes it possible to prevent a ...

13

For others who stumble upon this question, the following is available. As hinted to by yantar92, this is included in ox-extra which is included in the org-plus-contrib elpa package. Headers can take an :ignore: tag, which excludes the heading upon export while still including its contents. To make it work, add the following to your emacs setup (having ...

12

You can add advice to org-latex--inline-image: (advice-add 'org-latex--inline-image :around (lambda (orig link info) (concat "\\begin{center}" (funcall orig link info) "\\end{center}"))) Note that this puts every inline image in \begin{center} ... \end{center}, even ones that are ...

12

It seems you can use #+OPTIONS: prop:t instead. From 12.3 Export settings: prop: Toggle inclusion of property drawers, or list properties to include (org-export-with-properties).

12

A solution that doesn't depend on org-export-filter-src-block-functions and gives you more flexibility is using the :exports header argument (see (info "(org) Exporting code blocks")). Setting the argument to :exports none results in neither the code block nor its results being exported. If you prefer a backend specific rule, you may use a conditional as ...

12

You need the latex file to use \usepackage[utf8x]{inputenc} rather than the default \usepackage[utf8]{inputenc}. This works with standard (pdf)latex. For org export to generate this you have to set the variable org-latex-inputenc-alist accordingly. For example: (setq org-latex-inputenc-alist '(("utf8" . "utf8x"))) For the variable to be defined, you may ...

12

org-confirm-babel-evaluate can be set to nil to disable confirmation. From the documentation: Source code blocks Source code blocks can be evaluated during export, or when pressing ‘C-c C-c’ in the block. The most important thing to realize here is that Org mode files which contain code snippets are, in a certain sense, like ...

12

You may try something like this: #+ATTR_LATEX: :environment longtable :align |l|p{10cm}|l| | | <30> | | | Column | Wide Column | Column | |------------+----------------------------------------------------+--------| | Some stuff | Lots and lots of ...

12

It's worth mentioning that Org 9.0 is out and the #+BEGIN_HTML syntax you used is replaced with #+BEGIN_EXPORT language for export blocks. There are different ways to achieve what you want, I'm using Org-babel's noweb references here. The syntax <<inline-js>> inserts the literal javascript block before the elisp code block is evaluated: #+name: ...

12