0

I need to use \usepackage[T2A]{fontenc}. Pandoc default is \usepackage[T1]{fontenc}

My YAML header in md file is

---
title: My tytle
author: Me
header-includes:
  - \usepackage[T2A]{fontenc}
---

When I compile md file, I have both T1 and T2A packages. Is it possible to exclude T1 package, please?

I try

---
title: My tytle
author: Me
header-includes:
  - \usepackage[T2A]{fontenc}
header-excludes:
  - \usepackage[T1]{fontenc}
---

but it not working

1 Answer 1

1

Pandoc defines a variable for fontenc in the default template, that means that you can specify the encoding in the YAML-header directly:

---
title: My tytle
author: Me
fontenc: T2A
---
3
  • 1
    Btw. you can use pandoc -D latex to print the default latex template to check what pandoc is actually doing, instead of guessing...
    – DG'
    Oct 7, 2020 at 9:35
  • Thank you. It works for T2A. But I still need to remove \usepackage{lmodern} (I use Cyrillic fonts). I can comment it in tex file, but it will be nice if I can remove it from YAML header in md file.
    – Alan Ford
    Oct 7, 2020 at 10:46
  • This site works on a one question at a time basis, so please mark my answer as accepted. How to change fonts has already been answered here: tex.stackexchange.com/a/234796/29873 and it is well documented in the user's guide: pandoc.org/MANUAL.html#variables-for-latex
    – DG'
    Oct 7, 2020 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.