public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: <denis.maier-FfwAq0itz3ofv37vnLkPlQ@public.gmane.org>
To: <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: AW: How to add a `\usepackage` in a Lua filter meant to support LaTeX?
Date: Thu, 19 Nov 2020 19:50:42 +0000	[thread overview]
Message-ID: <e6b951c36db0463983df5a4c381693ea@ub.unibe.ch> (raw)
In-Reply-To: <2e27c210-a276-4319-abd7-c81d5db7f7d7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

I don't know how that would work with a filter, but wouldn't a custom template be an easier solution? Or what speaks against this?

Best,
Denis


________________________________________
Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> im Auftrag von Norman Ramsey <fellswalker-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Gesendet: Donnerstag, 19. November 2020 20:27:18
An: pandoc-discuss
Betreff: How to add a `\usepackage` in a Lua filter meant to support LaTeX?

I've got a Lua filter that is meant to render certain document elements in a `boxedminipage` environment.  To accomplish this feat, I give the element in a suitable `div`, and a Lua filter inserts the LaTeX environment.  The document itself remains universal, but the Lua filter is resolutely intended for LaTeX.

The filter adds a raw `\usepackage{boxedminipage2e}` to the `header-includes` of the metadata, but unfortunately when `-V header-includes=...` appears on the command line, it takes precedence and the document metadata is ignored.

I thought of trying to use `-M header-includes=...` instead of `-V header-includes=...`, but that comes with its own problems: using the `-M` option, the argument on the command line is escaped.  It is not clear to me if there is a mechanism I can use to put raw LaTeX in that spot.

The issue of the command line overriding metadata has been discussed at some length on the issue tracker (https://github.com/jgm/pandoc/issues/3139) and in pandoc-discuss, where a related issue is laid out in the last post (https://groups.google.com/g/pandoc-discuss/c/N6WhlmSPXbY/m/UYJJBdZwAAAJ).
The discussion thread in pandoc-discuss is now two and a half years old, and it seemed to be in favor of a change. But as of pandoc version 2.11.1.1, no change appears to have been made, and issue #3139 remains open.

Is there a workaround I can add to my Lua filter that will make it work in a self-contained way even in the presence of assignments to the `header-includes` variable on the command line?  And is there any thought of #3139 being resolved one way or the other?

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/2e27c210-a276-4319-abd7-c81d5db7f7d7n%40googlegroups.com<https://groups.google.com/d/msgid/pandoc-discuss/2e27c210-a276-4319-abd7-c81d5db7f7d7n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e6b951c36db0463983df5a4c381693ea%40ub.unibe.ch.


  parent reply	other threads:[~2020-11-19 19:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AQHWvqoEJV35v23+VkitO4uJW9kmTKnP3L8H>
2020-11-19 19:27 ` Norman Ramsey
     [not found]   ` <2e27c210-a276-4319-abd7-c81d5db7f7d7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-19 19:50     ` denis.maier-FfwAq0itz3ofv37vnLkPlQ [this message]
     [not found]       ` <e6b951c36db0463983df5a4c381693ea-FfwAq0itz3ofv37vnLkPlQ@public.gmane.org>
2020-11-19 21:08         ` Norman Ramsey
     [not found]           ` <6f859587-fd58-46b5-b94b-a21bebe3e6fcn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-20 10:22             ` krulis....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2020-11-19 20:10     ` John MacFarlane
2020-11-20 15:54     ` BPJ
2020-11-20 19:43     ` John MacFarlane
     [not found]       ` <m21rgnhkzz.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-11-20 21:04         ` Norman Ramsey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e6b951c36db0463983df5a4c381693ea@ub.unibe.ch \
    --to=denis.maier-ffwaq0itz3ofv37vnlkplq@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).