When using off-the-shelf "\frac" to display a continued fraction,
such as in:
-a a_0+\frac{1}{a_1+\frac{1}{\ldots+\frac{1}{a_k}}}
things get unreadably small pretty quickly. I'd like to be able to
display them with all coefficients the same size as the leading
coefficient. An example of what I'm seeking is: <https://sites.millersville.edu/bikenaga/number-theory/finite-continued- fractions/finite-continued-fractions.html>
(This certainly looks as if it was generated by TeX/LaTeX.) Does
anybody here have an example of how to achieve this effect?
On 28/02/2026 15:00, Michael F. Stemper wrote:
When using off-the-shelf "\frac" to display a continued fraction,
such as in:
-a-a a_0+\frac{1}{a_1+\frac{1}{\ldots+\frac{1}{a_k}}}
things get unreadably small pretty quickly. I'd like to be able to
display them with all coefficients the same size as the leading
coefficient. An example of what I'm seeking is:
<https://sites.millersville.edu/bikenaga/number-theory/finite-continued- fractions/finite-continued-fractions.html>
(This certainly looks as if it was generated by TeX/LaTeX.) Does
anybody here have an example of how to achieve this effect?
The image alt text on the page you referenced contains LaTeX code, for example:
$$\dfrac{4}{\pi} = 1 + \dfrac{1^2}{2 + \dfrac{3^2}{2 + \dfrac{5^2}{2 + \cdots}}}.$$
\dfrac is provided by amsmath.
On 28/02/2026 09.14, Nicola Talbot wrote:
The image alt text on the page you referenced contains LaTeX code, for
example:
$$\dfrac{4}{\pi} = 1 + \dfrac{1^2}{2 + \dfrac{3^2}{2 + \dfrac{5^2}{2 +
\cdots}}}.$$
\dfrac is provided by amsmath.
That works great. Thanks!
Just out of curiousity, is it common to put TeX in as the alt attribute? Being lazy, I would have just put the whole pdf up. Screenshotting each equation or derivation and inserting them into an HTML replication of
the original text is something that I never would have thought of.
Just out of curiousity, is it common to put TeX in as the alt attribute? >Being lazy, I would have just put the whole pdf up. Screenshotting each >equation or derivation and inserting them into an HTML replication of
the original text is something that I never would have thought of.
On 28/02/2026 16:28, Michael F. Stemper wrote:
On 28/02/2026 09.14, Nicola Talbot wrote:
The image alt text on the page you referenced contains LaTeX code, for example:
$$\dfrac{4}{\pi} = 1 + \dfrac{1^2}{2 + \dfrac{3^2}{2 + \dfrac{5^2}{2 + \cdots}}}.$$
\dfrac is provided by amsmath.
That works great. Thanks!
Just out of curiousity, is it common to put TeX in as the alt attribute?
Being lazy, I would have just put the whole pdf up. Screenshotting each
equation or derivation and inserting them into an HTML replication of
the original text is something that I never would have thought of.
It's more likely that the HTML content was automatically created from TeX or LaTeX source. I think putting the source code in the alt text is fairly common with LaTeX to HTML generators. It's not particularly readable but it at least provides some information for users relying on screen readers or Braille displays.
"Michael F. Stemper" <michael.stemper@gmail.com> wrote or quoted:
Just out of curiousity, is it common to put TeX in as the alt attribute?
Being lazy, I would have just put the whole pdf up. Screenshotting each
equation or derivation and inserting them into an HTML replication of
the original text is something that I never would have thought of.
MathML is a W3C standard for native math in HTML5, convertible
from LaTeX via Pandoc's --mathml flag, producing semantic markup
like <math><mi>x</mi></math> for accessibility and screen readers.
Browsers like Firefox support it natively, while others use Math-
Jax as a polyfill to convert LaTeX to MathML on the fly. This combo
shines for EPUBs or standards-compliant sites but you need conver-
sion tools for full LaTeX input.
I first heard of MATHML about twenty years ago. I played around with it >briefly, but never got it to do anything. If it's an official part of
HTML5, I might give it another shot.
"Michael F. Stemper" <michael.stemper@gmail.com> wrote or quoted:
I first heard of MATHML about twenty years ago. I played around with it >>briefly, but never got it to do anything. If it's an official part of >>HTML5, I might give it another shot.
HTML5 does not strictly require MathML support (there is
a specification for MathML, but it's "optional"), but new
major browsers support it.
MathJax can render math in browsers that lack native MathML
support by using JavaScript to output math in formats that
those browsers can display, such as HTML/CSS or SVG.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 65 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 06:13:48 |
| Calls: | 862 |
| Files: | 1,311 |
| D/L today: |
921 files (14,318M bytes) |
| Messages: | 264,699 |