0

I use Pandoc and Latex for my adacemic writing with Typora as my markdown editor. If I need to strikethrough text Typora uses ~~ double tildes. But Latex didn't recognize it as text which should be hided in PDF outputs. If i use \iffalse text \fi in Typora everything works.

Is there a possibility to use renewcommand or newcommand so that Latex recognizes the tildes?

As a newbie I'm not able to it in the corresponding latex file.

Thanks Andreas

  • 4
    hm. calling pandoc panic is a nice error ;-) – Ulrike Fischer Mar 22 at 11:50
2

You can use the normal tildes in Markdown for strikethrough, and Pandoc will translate it into the LaTeX \sout command. For example:

strikeout test

pandoc -o test.pdf << EOT

~~test~~

EOT
  • 1
    Thanks for the "\sout" hint. That leads me to the solution. If I strike through text in my markdown editor and want the text not compiled within the PDF, my tex file needs this: "\renewcommand{\sout}[1]{\unskip}" – The OMH Mar 22 at 16:11

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.