I'm writting a pandoc template inspired on iv054-homework-template.
I want something like this:
The code I use is:
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{titlesec}
\titleformat
{\section} % command
[display] % shape
{\normalfont\bfseries} % format
{}{\vspace{1ex}}
{Question \thesection : \ } % before-code
[\vspace{-0.5ex} \rule{\textwidth}{0.3pt}] % after-code
\begin{document}
\thispagestyle{plain}
\begin{center}
{\Large $title$ } \\
$author$ \\
\today
\end{center}
$body$
\end{document}
but I get this error:
Error producing PDF.
! Undefined control sequence.
l.22 \hypertarget
what happend?
Best Answer
You just need do add the
hyperref
package in the preambule.Here is the complete answer:
I created a file
test.tex
with the following content:and a markdown file
test.md
with the content:Then I compiled with
and the result was