all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* LaTeX src block export
@ 2022-12-10 11:37 Pedro Andres Aranda Gutierrez
  2022-12-10 11:53 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2022-12-10 11:37 UTC (permalink / raw)
  To: Org Mode List

[-- Attachment #1: Type: text/plain, Size: 1222 bytes --]

Hi

I was wondering if there is a way to control which parameters are exported
when translating a src block to LaTeX in a document-wide fashion. I.e. with
a directive at the beginning of the .org file.

The background:

I have 'listings' to export src and example blocks and use
```
#+LATEX_HEADER: \\usepackage{upquote}
#+LATEX_HEADER: \\RequirePackage{fancyvrb}
#+LATEX_HEADER:
\\DefineVerbatimEnvironment{verbatim}{Verbatim}{fontsize=\footnotesize}
#+LATEX_HEADER:
\\DefineVerbatimEnvironment{lstlisting}{Verbatim}{fontsize=\scriptsize}
```
because this greatly improves the copy-and-paste behaviour of my PDFs. Now,
when exporting to laTeX, there are some extra parameters included, which
are not supported by fancyvrb. namely
`language=`
and
`caption.*= (take .* as a regexp)`

I have included a filter to get rid of the offending parameters in my
.emacs.d org configuration, but this is difficult to port to other emacs
setups (e.g. other co-workers).

Thanks, /PA
-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #2: Type: text/html, Size: 1737 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: LaTeX src block export
  2022-12-10 11:37 LaTeX src block export Pedro Andres Aranda Gutierrez
@ 2022-12-10 11:53 ` Ihor Radchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2022-12-10 11:53 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: Org Mode List

Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:

> ... because this greatly improves the copy-and-paste behaviour of my PDFs. Now,
> when exporting to laTeX, there are some extra parameters included, which
> are not supported by fancyvrb. namely
> `language=`
> and
> `caption.*= (take .* as a regexp)`
>
> I have included a filter to get rid of the offending parameters in my
> .emacs.d org configuration, but this is difficult to port to other emacs
> setups (e.g. other co-workers).

I suggest writing a derived backend that will use a custom src block
transcoder. You can put the backend into setupfile and then ask your
co-workers to use that custom backend.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-10 11:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-10 11:37 LaTeX src block export Pedro Andres Aranda Gutierrez
2022-12-10 11:53 ` Ihor Radchenko

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.