0

I have given my tag below:

\documentclass{book}
\newcommand{\HalfTitle}[1]{\large#1}
\begin{document}
\HalfTitle{Half Title}
\end{document}

I need this in HTML output as:

<HalfTitle> Half Title </HalfTitle>

How can I achieve this? I am using the below tag for HTML conversion:

htlatex test "xhtml" " -cunihft" "-cvalidate -p"

please suggest...

1

--- file.tex

\documentclass{article}
\usepackage{mytag}
\begin{document}
\mytag{Test 123}
\end{document}

--- custom.cfg

\Preamble{xhtml}
\NoFonts
\Configure{mytag}{\HCode{<mytag>}}{\HCode{</mytag>}}
\begin{document}
\EndPreamble

--- mytag.sty

\ProvidesPackage{mytag} 
\newcommand\mytag[1]{\textbf{#1}}
\endinput

--- mytag.4ht

\NewConfigure{mytag}{2}
\let\tmp:mytag\mytag
\renewcommand\mytag[1]{\a:mytag\tmp:mytag#1\b:mytag} 

Run:

htlatex file.tex "custom,charset=utf-8" " -cunihft"
  • it works fine, much thanks for your help............... – MadyYuvi Jul 3 '17 at 5:12

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.