0

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}
  • 4
    your question isn't very clear xslt is an xml transformation language so it is quite good at converting xml to tex but no use at all in the other direction. You need to convert the tex to xml before you can process it with xslt., tex4ht, latexml and similar tools would need to be used for the conversion. – David Carlisle Mar 10 '17 at 10:29
  • @david Carlisle Is possible to convert xml to tex through xslt ? – vctu Mar 10 '17 at 11:07
  • 2
    @VenkatesanRamachandiran yes, it is possible to convert xml to tex through xslt. If you want the other way, from tex to xml, then you need to use latex to xml tool (such as tex4ht, which you already use, AFAIK). This generated xml can then be transformed to other xml formats through xslt. – michal.h21 Mar 10 '17 at 11:27
  • Note that questions that are mainly about xslt are better suited on Stack Overflow. – Martin Schröder Mar 15 '17 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.