Tag Info

New answers tagged

1

Maybe the simplest is to load xcolor with option svgnames: the svg colour names are the html colours names. So you can write: \begin{mdframed}[linecolor=DarkSeaGreen] text \end{mdframed} To use the HTML hexacimal code, you first have to define your colour: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[svgnames]{xcolor} ...


4

This is clearly a bug in tex4ht support for listings. When you look at generated code, you can see: <!--l. 13--><pre class="listings"><span class="cmtt-10x-x-109"> </span><br /><span class="label"><a id="x1-2r1"></a></span><span class="cmtt-10x-x-109">$</span><span ...


2

I too think this is a great idea! As you suggested fetching the html tags and attributes from documentation, I went to the MDN page and found out they have all that info in a single html page. Based on another question by you, I've applied the same structure to all the tags, and it does work. Took me a while to realize that the order I was declaring each ...


10

For pdf output you can use the minted package. This produces a nicely formatted and coloured PDF file for you. As described in the minted package documentation, you have to install Pygments and run (pdf)latex with the -shell-escape option. To use this approach to produce html you also need to pass the -shell-scape option to htlatex. You can do this using ...


4

I made an initial comment that XSLT is well suited to this, but particularly easy here as there is already XSLT matching all the elements and generating HTML, so you just need to make a version that writes TeX instead. so for example http://www.sks.dk/red/kn1dok.xml looks like html as you view it but it is XML converted to XSLT (using the browser's built ...


3

You can use config file from the answer you linked to, \VerbMath command is defined here. This command defines environment to be verbatim, so LaTeX macros inside are not processed. Just add \VerbMath{align} before \EndPreamble: \usepackage{verbatim} \Preamble{xhtml} % Configure for mathjax \Configure{VERSION}{} \Configure{DOCTYPE}{\HCode{<!DOCTYPE ...



Top 50 recent answers are included