I want the titles of some of the headers in my Latex document (specifically part and chapter) to be uppercase like they are in classicthesis. I also want to avoid changes to the Table of Contents. I am generating my document using Pandoc so I want to avoid having to manually add code to the document other than the style file I am inserting at the beginning. I am using KOMA Script scrbook and LuaLatex.

This is what I have tried so far:

  1. titlesec package does not work with KOMA script so I am using the \setkomafont commands.
  2. \setkomafont do not work with \MakeUppercase or \uppercase because those commands take arguments.
  3. It is recommended to use a font to make the text uppercase, however setting Letters=Uppercase in \newfontfamily using fontspec for EB Garamond does not work.
  4. Using \renewcommand for \part and \chapter works for parts but not for chapters and it also changes the table of contents.
  5. Using smallcaps at a larger font size like this thesis gives the wrong optical sizing.
  6. My last option is to use this LuaTex script but it is missing some ligatures like tt which I will now have to manually add to the script.

Am I missing something? There must be a simpler way to get upper case text?

1 Answer 1


You can use a pandoc Lua filter to do this:

-- file: uppercase-headings.lua
local text = require 'text'
function Header (h)
  return pandoc.walk_block(h,
    {Str = function (s) return pandoc.Str(text.upper(s.text)) end}

Use by passing it to pandoc via the --lua-filter option.

You must log in to answer this question.