Tag Info

New answers tagged

1

tex4ht doesn't change font used in html file, so your browser's default font is used. You can easily change that using few lines of configurations. Easiest way to include web fonts is to use some font hosting service, such as Google Fonts. In usage instructions is stated that you should put line <link ...


4

The colon is a syntax character in TikZ, if the category code is changed, then the TikZ parser for polar coordinates will not see the colon anymore. Maybe it helps to restore the category code inside tikzpicture via \catcode`\:=12, before the statement with the polar coordinate. Example: \documentclass[12pt]{article} \ifdefined\HCode ...


0

Lu Wang and I wrote an article Online publishing via pdf2htmlEX on TUGboat, which answers your question exactly. Please check the Figure 3. HTML / PDF


1

You can redefine \href command in the custom config file to include that attribute. Create file hello.cfg: \Preamble{xhtml} \begin{document} \makeatletter \renewcommand{\href}[2]{\bgroup\let~\H@tilde% \Link[#1 target="_blank"]{}{}% {#2}\egroup\EndLink}% \makeatother \EndPreamble this definition is modified macro from tex4ht sources. \let~\H@tilde is ...


3

You can use just \unskip to remove that unwanted space before &nbsp;: \documentclass{article} \usepackage[frenchb]{babel} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \begin{document} some text \og and more text \fg\ and again some text \end{document} you can redefine \og and \fg either in the custom config file or in frenchb.4ht: ...


5

This is interesting. When you look at produced dvi codes for your example: xxx: 't4ht=<!--l. 9--><p class="noindent" >' set: 'Nomal' w: 2.500000pt set: 'te' right: -0.149902pt set: 'xt' w0: fnt: pcrr7t at 10pt set: 'In' w: 6pt set: 'the' w0: set: 'Name' w: 2.500000pt set: 'of' w0: set: 'God' you can see that ...


0

Newlines are often inserted directly by tex4ht configurations, probably because it needs to prevent possible hyphenation. You can use tidy command to cleanup the html. Because you haven't provided an example, there is small file sample.tex: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \begin{document} Helo \textit{world}, ...


1

First, I added a caption to the original example: \begin{figure}[h] \begin{tikzpicture} \draw[thick] (0,0) -- ++(4,0); \end{tikzpicture} \caption{Try \textbf{bold} here.} \end{figure} Looking at the generated HTML, the font styling changes from span to tspan immediately after the svg dance: <!--l. 5--><p class="noindent" ...


4

If you want to convert math to mathml with tex4ht, you only need to provide mathml option: htlatex filename "xhtml,mathml" for your example, the result is following: <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" ><mfrac><mrow ><mi mathvariant="normal">d</mi><mi >x</mi></mrow> ...



Top 50 recent answers are included