Skip to content

Using heading attributes in Pandoc's Markdown in custom LaTeX templates #9530

Answered by SinTrans
SinTrans asked this question in Q&A
Discussion options

You must be logged in to vote

I modified the Lua filter to check for the memoir documentclass so you don't need to specify chapter as top_level_division in the command line. Thank you for pointing me towards using a filter!

Using the above markdown source, this can now be run with:

$ pandoc -o mwe.pdf --lua-filter memoir-short-titles.lua mwe.md

memoir-short-titles.lua

--[[
      memoir-short-titles.lua

      Pandoc Lua filter to handle headings with toc-title and head-title
      key/value attributes when using the memoir class.

      Memoir's starred heading commands have the form:
	\chapter*[<toc-title>][<head-title>]{<title>}

      toc-title and head-title can be specified when using Pandoc's markdown
      hea…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@jgm
Comment options

jgm Mar 1, 2024
Maintainer

@SinTrans
Comment options

@SinTrans
Comment options

@SinTrans
Comment options

Answer selected by SinTrans
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants