I am using Pandoc to convert a .tex document to html/epub. In my text I make frequent use of a custom command,
\subchpbreak with the following definition:
\newcommand{\subchpbreak}{\fancybreak{\rotatebox[origin=c]{90}{\S}}}
I am wondering if there is an easy way to have the custom command (i.e. the string \subchpbreak be interpreted by the converted or regex replaced by something I can style with css, e.g.
<div class='subchpbreak'>&167;</div>
I know that I can do string replacement in my tex file, but I would rather not.
Maybe what I should do is write a bash script to do the string replacement and then run Pandoc? Or is there a better way?
A solution from the comments
In the comments, it was suggested that I use htlatex instead of pandoc. This does solve the custom command issue nicely. However, I am having an issue with `` and '' being lost.
The culprit seems to be \usepackage{paratype}. The below example works as expected without the font package, but ignores the quotes with it.
\documentclass[12pt, oneside]{memoir}
\usepackage[utf8]{ inputenc }
\usepackage{ graphicx }
\usepackage{lipsum}
% \usepackage{paratype}
\usepackage{xcolor,fix-cm}
\definecolor{numbercolor}{gray}{0.7}
\newcommand{\subchpbreak}{\fancybreak{\rotatebox[origin=c]{90}{\S}}}
\begin{document}
\chapter{A chapter}
\lipsum[1]
``Alas, this is a quote,'' said the idiot.
\lipsum[2]
\subchpbreak
\lipsum[3]
\end{document}
Thanks for any response!

tex4ht. if you want to create epub, see tex4ebook, which is also based ontex4ht– michal.h21 May 30 '15 at 18:07E.g.
– Tyler Peckenpaugh PhD May 30 '15 at 18:32mwe? – michal.h21 May 30 '15 at 18:48\usepackage{paratype}-- does htlatex not permit font packages? See edited OP for MWE. – Tyler Peckenpaugh PhD May 30 '15 at 20:10