public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Porting this code as raw latex to a pandoc.markdown environment
@ 2020-08-15 18:50 Charles Richer Saint-Faure
       [not found] ` <2d70da44-8dec-4029-b1f6-14cc2fe689e7o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Charles Richer Saint-Faure @ 2020-08-15 18:50 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 3288 bytes --]

I have this code that works fine in pure latex/xelatex:

\documentclass[11pt]{article}

\usepackage[most]{tcolorbox}

\newtcolorbox{tcbdoublebox}[1][]{%
  enhanced jigsaw,
  sharp corners,
  colback=white,
  borderline={1pt}{-2pt}{black},
  fontupper={\setlength{\parindent}{20pt}},
  #1
}
\begin{document}

\begin{tcbdoublebox}
\begin{tabular}{llll}
praesentium & facilis       & assumenda    & mollitia \\
sit         & consequuntur  & omnis        & facere 
\end{tabular}
\end{tcbdoublebox}

\end{document}


I tried to add the \\usepackage{tcolorbox} statement and the 
\\newtcolorbox{...} definition to a yaml block that lives in front of the 
input to pandoc like so:



---
indent: true
subparagraph: yes
header-includes: |
  \usepackage{ragged2e}
  \usepackage{epigraph}
  \renewcommand{\textflush}{flushepinormal}
 
  \usepackage{indentfirst}
  \usepackage{relsize}
 
  \usepackage{fancyhdr}
  \pagestyle{fancy}
  \fancyhf{}
  \fancyhead[R]{\thepage}
  \renewcommand{\headrulewidth}{0pt}
  \usepackage{quoting}

  \newlength\mylen
  \settowidth\mylen{...................}

  \newcommand{\pro}{\addfontfeature{Numbers=Proportional}}  
  \newcommand{\mon}{\addfontfeature{Numbers=Monospaced}}   
  \newcommand{\lin}{\addfontfeature{Numbers=Lining}}       
  \newcommand{\old}{\addfontfeature{Numbers=OldStyle}}       

  \usepackage{adjustbox}
  \usepackage{multirow}

  \usepackage{array}
  \newcolumntype{P}[1]{>{\RaggedRight\hspace{0pt}}p{#1}}

  \usepackage{blkarray}
  \usepackage{booktabs}
  \usepackage[usestackEOL]{stackengine}

  \usepackage[normalem]{ulem}
  \usepackage{setspace}

  \usepackage{graphicx}
  \def\asterism{\par\vspace{1em}{\centering\scalebox{.9}{%
    \stackon[-0.6pt]{\bfseries*~*}{\bfseries*}}\par}\vspace{.8em}\par}

  \newfontfamily\ff{Symbola}

  \usepackage[most]{tcolorbox}
  \newtcolorbox{tcbdoublebox}[1][]{%
    enhanced jigsaw,
    sharp corners,
    colback=white,
    borderline={1pt}{-2pt}{black},
    fontupper={\setlength{\parindent}{20pt}},
    #1
  }
 
  ```{=latex}
  \usepackage{titlesec}
  \titleformat{\chapter}[display]
    {\normalfont\bfseries\filcenter}{}{0pt}{\Large}
  \titleformat{\section}[display]
    {\normalfont\bfseries\filcenter}{}{0pt}{\Large}
  \titleformat{\subsection}[display]
    {\normalfont\bfseries\filcenter}{}{0pt}{\Large}

   ```
  \setcounter{secnumdepth}{1}
---

Unfortunately upon running pandoc to create a .pdf I get a latex compiling 
error telling me that it can't find the \\begin{document} statement… a sure 
sign that there is a syntax error in my latex preamble.

I suspect the problem may have something to do with the multi-line syntax 
of the box's definition (newtcolorbox{...})

What is the correct way to integrate this to my otherwise OK yaml 
block/preamble? 

-- 
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/2d70da44-8dec-4029-b1f6-14cc2fe689e7o%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 30234 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-16 20:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-15 18:50 Porting this code as raw latex to a pandoc.markdown environment Charles Richer Saint-Faure
     [not found] ` <2d70da44-8dec-4029-b1f6-14cc2fe689e7o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-08-16  0:40   ` John MacFarlane
2020-08-16 20:33   ` Charles Richer Saint-Faure

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).