Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm converting a document to html (or possibly xhtml) using htlatex. I find that the output is ok, but the equations are too small. I have tried making them bigger by adding the following to my configuration file:

\DeclareMathSizes{10}{24.88}{20.74}{17.28}

This successfully makes math bigger, but for both equaton environments and inline math expressions, which therefore no longer look good with the text. How can I make only non-inline math bigger in the output from htlatex?

I also prefer this to be done using a method easily portable and not requiring local configuration changes to my tex installation, as I move from computer to computer and also expect multiple people to work on the document.

share|improve this question
    
I think you are going about this the wrong way. A much better way to do all of this, is to use mathml and not default images for math, and then use mathjax to render the math. See this mathjax.org/demos/scaling-math about how mathjax scales math. What this means is that you do not need to use \DeclareMathSize at all. Just configure tex4ht to use mathml and mathjax will be a better solution than having to deal with sizing math images. –  Nasser Feb 1 at 7:46
    
@Nasser, thanks, i will give this a go. –  crobar Feb 3 at 11:31
add comment

1 Answer 1

up vote 1 down vote accepted

This approach does not give arbitrary control over the size of display math, but allows it to be set larger, based on the built-in LaTeX size macros, such as \Huge. The good news is that it should be portable.

\documentclass{article}
\let\svequation\equation
\def\equation{\Huge\svequation}
\let\svdisplaystyle\[
\let\svenddisplaystyle\]
\def\[{\Huge\svdisplaystyle}
\def\]{\svenddisplaystyle\normalsize}
\begin{document}
This is a $w = xyz_1$ inline test
\begin{equation}
w = xyz_1
\end{equation}
and now without the equation environment
\[
w = xyz_1
\]
xyz
\end{document}

enter image description here

share|improve this answer
    
This worked thanks, for others info, I put it in my tex4ht configuration file between \Preamble{xhtml} and \begin{document} –  crobar Feb 10 at 10:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.