Hi Russ,

I hope you don't resent these thoughts since they do not solve your problem directly, but may I ask why you are trying to go from markdown to latex to pdf? 
Latex is compilable directly to pdf and almost certainly will generate better pdf than pandoc. 

Don't use markdown as your source document format. Latex's capabilities for generating rich output are far, far greater than markdown, which can't even generate numbered section headers. Latex also offers:

  1. Elegant mathematics
  2. An extensive bibliography/citation system
  3. The ability to natively generate graphics using Tikz/Pgm.
I've also found an excellent, free tool for converting latex docs to html: LaTeXML. It automagically handles citations. It is even capable of translating many tikz illustrations to html, e.g. several of the examples here.

So in general, choose a source document format that's the least "lossy" in terms of typographical capability, then translation to other formats incurs the least loss possible.

--Randy

On Friday, May 14, 2021 at 5:22:02 PM UTC-4 rurq...@d2iq.com wrote:
Hi all,

I found several items on the web about customizing my pdf output from Pandoc.

I am calling pandoc with the following parameters:

     pandoc *.md -H seccolor.tex -o test_doc.pdf --table-of-contents --number-sections --indented-code-classes=javascript --highlight-style=monochrome -V mainfont="Palatino" -V documentclass=report -V papersize=A5 -V geometry:margin=1in -V monofont="Courier" --pdf-engine=xelatex

The seccolor.tex file is:

    \usepackage{titlesec}
\definecolor{DPurple}{rgb}{.75,.52,.153}
\titleformat*{\section}{\color{DPurple}}
% \sectionfont{\color{DPurple}}

When i run the command i get:

Error producing PDF.
! LaTeX Error: File `titlesec.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: 
! Emergency stop.
<read *> 
         
l.98 \definecolor

Should i be using another style? I WAS able to generate a standard PDF, but just wanted to add a splash of color. From what I read, this snippet of TeX should work.

Can anyone suggest how I can fix this?

Thanks,

Russ

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/f025f0e7-98ff-4f50-9ba2-37687041fb3dn%40googlegroups.com.