TransWikia.com

tex to xml conversion through xslt

TeX - LaTeX Asked on January 24, 2021

I know latex, but new in xslt (learning now), I need to convert the tex to xml file through XSLT (one of my friend suggest, but i failed to convert). Please suggest or give example to convert the files (below is the MWE),

documentclass{book}
begin{document}
chapter{Sample}

section{Section Head}

Sample Para text

subsection{Section Head 2}
Sample Para text

section{Section Head}
subsection{Section Head 2}

Sample Para text

end{document}

One Answer

I think there is no options to convert latex to xml using xslt and follow the below steps to get html output and then use xslt to convert html to xml.

  1. Add tex4ht style file in your preamble as given below. documentclass{book} usepackage{tex4ht}

  2. Compile your tex file in command prompt

htlatex yourfile.tex and then you will get the yourfile.html

Thanks Bala S

Answered by Bala S on January 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP