4

You can use tags to differentiate the sections: * Section one This section will be exported always. * Section two :export_latex: This section should only be exported with the LaTeX/PDF exporter. * Section three :export_odt: This section should only be exported with the ODT exporter. The trick is to then define the appropriate set of noexport tags: ...


4

I'm using self-compiled emacs 27.0.9x on Linux and macOS. To generate my presentations, I use org-mode. emacs -Q \ --batch "(require 'ox-beamer)" \ <input>.org -f org-beamer-export-to-pdf works for me.


4

The problem with your code is that you are applying different replacement functions to the same original text. The result is, the value returned is just the result of the final replacement applied to the original text. You need to accumulate changes. One way to do this is: (defun my-latex-filter-highlightNotes (text backend info) "Highligh custom ...


3

Found a possible solution by using https://alhassy.github.io/org-special-block-extras/#Folded-Details #+begin_details "Click to see dummy code" #+begin_src elisp (message "Dummy code") #+end_src #+end_details


3

A long time ago, I had worked on a hack to deal with this peculiarity of revtex and reconstructed it for this answer (with some differences to accommodate things that have changed in Org mode, in particular the handling of titles). The main problem as you note is that revtex wants the title, author and date in the body, not in the preamble where just about ...


3

It does not work because macro expansion happens after include processing: by the time the macro is expanded and you have #+INCLUDE: in the output, it is too late. The code is in the function org-export-as in file ox.el, ll.2948-2953: ... (org-export-with-buffer-copy ;; Run first hook with current back-end's name as argument. (run-hook-with-args '...


3

The standard HTML table is not interactive, you need JavaScript to add these interactive features. The following uses the DataTables JS library to add search and filter. Save it to an org file then C-c C-e h o to view the HTML in browser. #+HTML_HEAD: <link rel="stylesheet" href="https://cdn.datatables.net/1.10.22/css/jquery.dataTables.min....


3

As mentioned in the comments above, the latex commands need to be escaped. so this should work as expected.... (add-to-list 'org-latex-classes '("koma-article" "\\documentclass[french, 11pt]{scrartcl} \\usepackage[utf8]{inputenc} \\usepackage[T1]{fontenc} \\usepackage{babel} ...


2

Any lines that could be confused as Org mode markup (e.g. both of the lines in your example block) can be quoted by preceding them with a ,: #+BEGIN_SRC ,* User-defined Markers ,** MARKER_1 #+END_SRC See Literal Examples in the manual. As @Tobias and @Hubisan point out in the comments, it's a very good idea to mark the source block as an org source block: ...


2

The correct option to exclude task keywords is the following: #+OPTIONS: todo:nil See all export options here: https://orgmode.org/manual/Export-Settings.html


2

If you don't want to permanently change the value of org-latex-toc-command (as per @NickD answer), you can also include a latex export block before the first section #+begin_export latex \clearpage \tableofcontents \clearpage #+end_export * Fist section Remember to include #+OPTIONS: toc:nil in the preamble to avoid a double TOC


2

If you are using org-tempo you should first indent the line before inserting the template shortcut <q for the quote-block. That means if you have the input 1. First question | where the bar | stands for the cursor position, type TAB to arrive at the indented position as shown in the following code: 1. First question | then input the structure ...


2

That's either a bug or a feature in the ox-gfm package. Basically, the ox-gfm package defines an exporter that derives from the ox-md exporter, which derives from the ox-html exporter. The html exporter states that all timestamps need to be run through the org-html-timestamp function, which is what prints out the span you see. Neither the md or gfm exporter ...


2

Adding :exports none should take care of that: #+BEGIN_SRC bash :exports none pandoc --bibliography=biblidatabase.bib --filter pandoc-citeproc \ latexfile.tex -o outputfile.odt #+END_SRC See Exporting Code Blocks in the manual.


2

I would continue using the macro. You can use markup inside the macro that expands differently for HTML export than it does for PDF export. For example, as a first approximation, this will allow you to get the dates in the HTML output, although they are not nicely formatted - but it's a beginning: #+MACRO: date @@latex: \hfill\normalfont{\small $1} @@ @@...


2

EDIT/ The #+BIND: keyword needs to be turned on as well: (setq org-export-allow-bind-keywords t) I had set that variable and forgotten about it, but the default is nil I think (primarily to protect you from yourself I guess). The doc string for the variable says: Non-nil means BIND keywords can define local variable values. This is a potential ...


2

As @rpluim mentions in a comment, setting org-export-with-sub-superscripts to nil would disable the special handling of ^ and _ for subscripts and superscripts. There is one more variable that is relevant (when org-export-with-sub-superscripts is t) and that is org-use-sub-superscripts which can be set to t or nil - or it can be set to the value {}. I find ...


2

In version 9.3 org-bibtex has been renamed ol-bibtex with all the link-related libraries, see this commit in the source code repository. You have to make the same change in your .emacs, if you want to support different org versions you have to check the value of the variable org-version.


2

A solution kindly given by a member of org-mode mailing list: simply add (push '("\\.pdf\\'" . emacs) org-file-apps) in the .emacs file. This works for me.


2

I know this is old and the existing answers are already great. But in case anyone is searching for this and needed a bit more control, here's how to change the hyperref template. (customize-set-value 'org-latex-hyperref-template " \\hypersetup{\n pdfauthor={%a},\n pdftitle={%t},\n pdfkeywords={%k}, pdfsubject={%d},\n pdfcreator={%c},\n pdflang={%L},\n ...


2

EDIT 2021-04-05): there is a better solution, based on an idea of Juan Manuel Macías on the Org mode mailing list. It is based on macro expansion and the fact that you can evaluate arbitrary Lisp code in the macro definition. The details are presented in this Emacs SE question: Can org options be applied to specific export modes only?. Here is one possible ...


2

First, two remarks: your example is not perfectly reproducible (you do not import the convenient R library for the %>% operator, and there is a typo in the header of your second src block). I don't know whether this explains everything, but this might explain a part of your problem. Not sure of why you need an external R package for such a simple example. ...


2

I don't know how to do this without changing the code (it might be possible with org-babel-pre-tangle-hook but it did not seem at all simple, so I didn't try that). But as soon as you accept code changes, it does not seem too bad. The simplest possible way I could think of was to emulate in org-babel-tangle what org-export-as is doing WRT included files. A ...


2

Method 1 Manual method using default org-mode keybindings Setup Add Org to Org Babel Load Languages configuration and then apply and save new configuration. Add #+EXPORT_FILE_NAME: keyword near top of config.org. e.g. #+EXPORT_FILE_NAME: temp.org Add #+PROPERTY: header-args:org :results drawer replace keyword near top of config.org. e.g. #+PROPERTY: ...


2

The process is called tangling. All you have to do is provide a header arg to specify that, e.g.: #+PROPERTY: header-args:python :tangle pdguide.py After you add the line to your buffer, don't forget to refresh it by typing C-c C-c on the property line. Then you can tangle the code into the file with C-c C-v C-t. EDIT: you can include headlines as comments (...


2

There is nothing like that: Org babel evaluates the source block by storing all the commands in a temp file, runs the file using the appropriate language interpreter, collects the output, does minor munging to it and writes it out as the results block. What you are asking for (a header argument that modifies this work flow) is fundamentally incompatible with ...


2

Your main problem seems to be that exporting does not honour your line breaks. There are two simple options to get around that. Do global replace linefeed to two linefeeds, \n to \n\n, before exporting. Every line will be treated as a paragraph. Added whitespace will be ignored in more structured regions of your file like in headers. On the other hand, the ...


1

So, this is not a bug: nested \begin{...} should not start the line and therefore is not seen as starting a new LaTeX block: Inline-math: \( \left|\begin{matrix} a_1 & b_1\\ a_2 & b_2 \end{matrix}\right| \)


1

AFAIK, AUTO is only used in two cases: for the package inputenc where it is replaced by the appropriate coding system, and for the package babel (or polyglossia) where it is replaced by the appropriate language. It is not a general method of "automaticaly determining options" to an arbitrary package. Try replacing it with the empty string (or the ...


1

I don't see an easy way to do this other than by copying the org-html-link function from ox-html.el. :-( Find the text What description to use?. That's where you want to change the logic: ;; What description to use? (desc ;; Case 1: Headline is numbered and LINK has no ;; description. Display section number. (if (and (org-export-...


Only top voted, non community-wiki answers of a minimum length are eligible