From 33d2ca63e749da8f1faacb66ece636df66464416 Mon Sep 17 00:00:00 2001 From: "Pedro A. Aranda Gutierrez" Date: Tue, 13 Dec 2022 12:07:09 +0100 Subject: [PATCH 4/4] Add entries to ORG-NEWS for changes and org-latex-listings-src-omit-language --- etc/ORG-NEWS | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 5d5e726e0..7fa9122ee 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -432,6 +432,20 @@ following properties: ~:hook~, ~:prepare-finalize~, ~:before-finalize~, ~:after-finalize~. These nullary functions run prior to their global counterparts for the selected template. + +*** New =org-latex-listings-src-omit-language= variable for LaTeX export + +The =org-latex-listings-src-omit-language= customization variable +allows you to omit the =language= parameter in the exported +=lstlisting= environment. This is necessary when the =listings= backend +forwards the actual listing generation to another package like +=fancyvrb= using the following setup in the document header: +#+BEGIN_example +#+LATEX_HEADER: \\RequirePackage{fancyvrb} +#+LATEX_HEADER: \\DefineVerbatimEnvironment{verbatim}{Verbatim}{...whatever...} +#+LATEX_HEADER: \\DefineVerbatimEnvironment{lstlisting}{Verbatim}{...whatever...} +#+END_example + ** New options *** A new option for custom setting ~org-refile-use-outline-path~ to show document title in refile targets @@ -747,6 +761,18 @@ following snippet to allow multiple different ID formats in Org files. org-attach-id-uuid-folder-format org-attach-id-ts-folder-format)) #+end_src +*** The LaTeX export backend only emits =label= and =caption= when they are not empty + +When exporting a SRC block and using the listings backend , =label== +and =caption== parameters for the =lstlisting= environment will be +only generated when they are not empty. Things like + +#+BEGIN_src latex +\begin{lstlisting}[label= ,caption= ,captionpos=b] +\end{lstlisting} +#+END_src + +will no more appear. * Version 9.5 -- 2.25.1