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

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 ...


4

I am no expert at this, but I guess github uses its own CSS, and ultimately renders html. So I guess there has to be some kind of export involved. I know about two easy options, of which I would recommend grip-mode (requires the python grip package). The other option gfm-mode (appears to rely on deprecated packages Docter or Marked 2). Looking back at this ...


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

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

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

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 ...


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

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

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

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

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

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

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

Try the :caption attribute in #+ATTR_LATEX: instead: #+NAME: thelabel #+ATTR_LATEX: :width \textwidth :caption \caption{The caption.}\source{the Source} [[figure.pdf]] The LaTeX file I get reads in part: \begin{figure}[htbp] \centering \includegraphics[width=\textwidth]{/path/to/figure.jpg} \caption{The caption.}\source{The Source} \end{figure} which ...


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 ...


2

You can use a zero width space for this (https://orgmode.org/manual/Escape-Character.html). This will allow the code markup to work, but will not be visible in the export, or in the org file. That char acts like a space, but it has zero width. If you need this a lot there is a convenient function and key binding to insert a zero width space at https://...


2

Try the following functions. Below it's your function adapted to split top level headlines into different Org files. (defun my-org-export-each-level-1-headline-to-org (&optional scope) (interactive) (org-map-entries (lambda () (let* ((title (car (last (org-get-outline-path t)))) (dir (file-name-directory buffer-file-name)) ...


1

Based on Joe Corneli's answer here, you can create an outline manually as a list of your frames. Create a file named list-of-frames.tex and edit your org file as follows: list-of-frames.tex: \makeatletter \newcommand\listofframes{\@starttoc{lbf}} \makeatother \addtobeamertemplate{frametitle}{}{% \addcontentsline{lbf}{section}{\protect\makebox[2em][l]{% ...


1

The best way is to define your own cite export function like this and then set it on the cite link. (defun my-html-cite-export (keys desc format) (mapconcat (lambda (key) (format "<a class='org-ref-reference' href=\"#%s\" title=\"%s\">%s</a>" key (org-ref-format-entry key) ...


1

I am not sure if it still helps and if it is exactly what you need... I am using something like within spacemacs: ;;----------------------------------------------------------------------- (message "--- START : filemanage ----") (let ((srcuf (concat dotspacemacs-directory "user_filemanage.org")) (uf (concat dotspacemacs-...


1

Check the comment from @NickD, regex: :base-extension "css\\|js\\|php\\|jpg\\|png\\" is indeed wrong if we follow the tutorial exactly. I removed the last \\. Still, as I said, this was working before. The actual error was that a package named cl is not supported by Emacs anymore. For that, I had to see which packages are depending on it and I ...


1

I found the way to do it from here. #+OPTIONS: d:(not "CITED")


1

There is no way to do this portably in Org mode AFAIK. This is only for LaTeX - if I figure out the HTML export, I'll edit, but at this point that's unlikely. ox-bibtex translates bibliography specs like this #+BIBLIOGRAPHY: path/to/acm-comp-surveys.bib plain to the following LaTeX code: \bibliographystyle{plain} \bibliography{/path/to/acm-comp-surveys.bib} ...


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| \)


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