Customizing line height, text font, and MathJax font

59 views
Skip to first unread message

Igor Erovenko

unread,
Jun 3, 2026, 4:17:00 PMJun 3
to PreTeXt support
I've spent weeks trying to figure out the following questions:
  • Is it possible to add custom CSS to change the default font size and/or line height in any given theme? The default settings fail the WCAG 2.1 Success Criterion 1.4.12, which specifies that the line height must be at least 1.5 times the font size.
  • Is it possible to specify an alternative default font (e.g., Fira Sans)?
  • Is it possible to use another math font supported by MathJax (e.g., Fira Sans Math)? I would like to match the text and math fonts; this is possible with Fira Sans.
I was not able to implement any of these features. I didn't find any relevant information in the manual, and none of the "vibe coding" suggestions worked.

I would like to ask the community these questions:
  1. Is it possible to implement what I mentioned above, or are these features hardcoded in the themes' CSS and cannot be customized?
  2. If yes, how can this be done?
  3. If not, would it be reasonable to request that these customization features be implemented in future releases?

David W. Farmer

unread,
Jun 3, 2026, 4:28:52 PMJun 3
to PreTeXt support

One of the main principles of PreTeXt is that users are not
supposed to micromanage the layout.

It is the opposite philosophy of LaTeX, where people are
encouraged to fiddle with the layout as much as they wish.

If you know enough to add your own custom CSS, then you
can do that, knowing that you are risking the possibility
that in a later version of PreTeXt it may break something.

We actively discourage users who know how to do that, from
helping others to do it. We take the principles of PreTeXt
seriously; see the list at the bottom of this page:

https://github.com/PreTeXtBook/pretext

The answer to your 3rd question is that yes it is reasonable
for you to ask for customization features. And your question
will be answered promptly. The answer is: no, we will not
implement those features because that violates the PreTeXt
Principles. Specifically, Principles 4 and 7.

This also explains why you could not find this in the manuals.

However, we do want to incorporate readability features into
PreTeXt. Font size and line height are two of the many parameters
which should be adjustable. We welcome development which will
help with that. But note that since those are readability
features, it is the reader, not the publisher, who is given
that flexibility.

Regards,

David

ps. Maybe this needs to be in the FAQ.



On Wed, 3 Jun 2026, Igor Erovenko wrote:

> I've spent weeks trying to figure out the following questions:
> * Is it possible to add custom CSS to change the default font size and/or line height in any given theme? The default settings fail the WCAG 2.1
> Success Criterion 1.4.12, which specifies that the line height must be at least 1.5 times the font size.
> * Is it possible to specify an alternative default font (e.g., Fira Sans)?
> * Is it possible to use another math font supported by MathJax (e.g., Fira Sans Math)? I would like to match the text and math fonts; this is possible
> with Fira Sans.
> I was not able to implement any of these features. I didn't find any relevant information in the manual, and none of the "vibe coding" suggestions
> worked.
>
> I would like to ask the community these questions:
> 1. Is it possible to implement what I mentioned above, or are these features hardcoded in the themes' CSS and cannot be customized?
> 2. If yes, how can this be done?
> 3. If not, would it be reasonable to request that these customization features be implemented in future releases?
>
> --
> You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-support/7ed2546e-29af-4ead-a7bd-3acd432fb11bn%40googlegroups.com.
>
>

Mitch Keller

unread,
Jun 3, 2026, 5:01:55 PMJun 3
to pretext...@googlegroups.com
I do think it’s important to take a look at the point in Igor’s first bullet, where he cites WCAG 2.1 Success Criterion 1.4.12. I do not agree with the conclusion that “[t]he default settings fail”, however. The success criterion, under Author Responsibility, says 

"This SC does not dictate that authors must set all their content to the specified metrics, or provide a mechanism to do so. Rather, it specifies that an author's content has the ability to be set to those metrics without loss of content or functionality.” 

I don’t see any loss of content or functionality when I go into the inspector and change the line height to 1.5, so current PreTeXt does satisfy this success criterion, as best as I can tell. As David notes, it would be great if someone with the skills could contribute mechanisms for readers to adjust the font, font size, line height, etc.

Rob Beezer

unread,
Jun 3, 2026, 5:09:24 PMJun 3
to pretext...@googlegroups.com
> As David notes, it would be great if someone with the skills could contribute
mechanisms for readers to adjust the font, font size, line height, etc.

Right. We keep talking about this. Somebody besides Oscar and Andrew (who I am
sure both would be happy to *help*). A good side-effect is we would have
another developer with familarity with the CSS and JS for the HTML builds. And
David Farmer has already experimented with just this (there's a commit where a
lot of his work was deleted, and that could be a good starting point).

Rob

On 6/3/26 14:01, Mitch Keller wrote:
> I do think it’s important to take a look at the point in Igor’s first bullet,
> where he cites WCAG 2.1 Success Criterion 1.4.12 <https://www.w3.org/WAI/WCAG21/
> Understanding/text-spacing.html>. I do not agree with the conclusion that “[t]he
>> support/5c9e4935-b9e-ed12-11f9-50737521505c%40aimath.org.
>
> --
> Mitch Keller
> mi...@rellek.net
>
> http://www.rellek.net/
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-suppo...@googlegroups.com <mailto:pretext-
> support+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> support/1B754570-2837-4B2C-B3BE-E8116D9F0C40%40rellek.net <https://
> groups.google.com/d/msgid/pretext-support/1B754570-2837-4B2C-B3BE-
> E8116D9F0C40%40rellek.net?utm_medium=email&utm_source=footer>.

David W. Farmer

unread,
Jun 3, 2026, 5:28:54 PMJun 3
to 'Rob Beezer' via PreTeXt support

If our current default settings (or setting for a particular style)
are not in compliance, that should be addressed.
> https://groups.google.com/d/msgid/pretext-support/MTAwMDAyMy5iZWV6ZXI.1780520961%40pnsh.
>

Igor Erovenko

unread,
Jun 3, 2026, 10:40:02 PMJun 3
to PreTeXt support
Thank you all for the responses. David, should I interpret your answer as that end-users cannot make any adjustments to the themes? While I sympathize with the principle of not letting the users screw up predefined designs, why not let those who understand typography principles and best practices make their own decisions?

My personal typographic design bias aside, the fact that the current theme settings violate the "minimum 1.5 line height" guideline still remains. PreTeXt uses 1.4 line height according to my estimates. If PreTeXt wants to position itself as a premiere solution for accessible mathematics (and I believe it is the frontrunner for this title), then it should carefully examine all accessibility expectations.

David W. Farmer

unread,
Jun 3, 2026, 10:57:46 PMJun 3
to PreTeXt support

Dear Igor,

I agree that the "minimum 1.5 line height" requirement is an issue
that needs to be addressed. That is a separate issue than making
individual adjustments to the output.

I don't know anything about you, so this is not meant to be personal.
But most people have little knowledge of typography or design,
and also poor taste. It is a service to them that they have to
just choose one of the available themes.

But more importantly, PreTeXt can continue to offer high-quality
output in many formats because following the principles helps
avoid some of the difficulties which continually plague LaTeX.

We welcome additional themes, so if that is your interest, we can
help. That is a good way for people with design sense to contribute.
Whether your workflow is to start with an existing theme and
start tweaking it, or just start over from scratch, is not a concern.

It definitely was not my intention to discourage the creation of a
new theme which would then be available to other publishers.

As a separate issue, I think it would be a good drop-in discussion to
address failures to meet accessibility guidelines.

Regards,

David
> To view this discussion visit https://groups.google.com/d/msgid/pretext-support/884c65b1-e3d4-4dd9-af99-6d6ebaff0a71n%40googlegroups.com.
>
>

Igor Erovenko

unread,
Jun 3, 2026, 11:09:45 PMJun 3
to PreTeXt support
Thank you, David. I agree that the vast majority of users don't understand typography, and restricting their choices is an optimal approach.

I have studied typography, and I would like to discuss the possibility of creation of a new theme that implements a better synergy of the text and math fonts. I do not possess the requisite technical knowledge necessary to do this by myself, but if this is something of potential interest to PreTeXt creators, then we can continue this conversation elsewhere (e.g., email).

Mitch Keller

unread,
Jun 3, 2026, 11:11:43 PMJun 3
to pretext...@googlegroups.com
I’ll reiterate what I said before: PreTeXt does not violate this accessibility standard, as it does not require that 1.5 line height be specified.

The success criterion, under Author Responsibility, says 

"This SC does not dictate that authors must set all their content to the specified metrics, or provide a mechanism to do so. Rather, it specifies that an author's content has the ability to be set to those metrics without loss of content or functionality.” 

I don’t see any loss of content or functionality when I go into the inspector and change the line height to 1.5, so current PreTeXt does satisfy this success criterion, as best as I can tell. Readers can use tools that allow them to adjust line height without loss of content or functionality, unless someone can demonstrate a situation where adjusting the line height results in a loss of content or functionality. 

-- 
Mitch Keller

On Jun 3, 2026, at 21:57, David W. Farmer <far...@aimath.org> wrote:



Igor Erovenko

unread,
Jun 3, 2026, 11:20:12 PMJun 3
to PreTeXt support
Mitch, to give you a perspective from someone who has minimal understanding of the accessibility guidelines, which probably represents a typical user of the PreTeXt-generated content, here is my predicament. When I open a webpage with PreTeXt content, I have zero clue how to increase the line height from 1.4 to 1.5. Is this something that is well-known how to do? If yes, I would appreciate a reference to the instructions.

Mitch Keller

unread,
Jun 3, 2026, 11:28:44 PMJun 3
to pretext...@googlegroups.com
The standard clearly says that authors do not have to provide a mechanism to do so. Someone who needs this will use a browser add-on that makes this easy to do. 

I tested by opening the web inspector, clicking in a paragraph, and finding the CSS line height. I changed it from 1.35 to 1.5 with no loss of content or functionality. Thus, compliant because authors do not have to set to this metric or provide a mechanism for readers to do so. 
-- 
Mitch Keller

On Jun 3, 2026, at 22:20, Igor Erovenko <igor.e...@gmail.com> wrote:

Mitch, to give you a perspective from someone who has minimal understanding of the accessibility guidelines, which probably represents a typical user of the PreTeXt-generated content, here is my predicament. When I open a webpage with PreTeXt content, I have zero clue how to increase the line height from 1.4 to 1.5. Is this something that is well-known how to do? If yes, I would appreciate a reference to the instructions.

Igor Erovenko

unread,
Jun 3, 2026, 11:36:30 PMJun 3
to PreTeXt support
Mitch, how do you open a web inspector on a mobile device?

I don't intend to criticize the creator's design decisions, but I think hard-coding a 1.5 line height in all themes is a simple enough solution to "check the box" and make the output more accessible without any additional end-user intervention.

Alex Jordan

unread,
Jun 3, 2026, 11:43:52 PMJun 3
to pretext...@googlegroups.com
The purpose of the SC here is that *if* a user would benefit from 1.5 line height, and if they adjust their browser settings to do that, there should be no loss of content or functionality. Good for them to go ahead and make that change with their own assistive technology.

Forcing *all* readers to use 1.5 line height is not the right thing to do. For many readers, that will make readability worse.  WCAG agrees, and is *not* asking you to do that.

David W. Farmer

unread,
Jun 4, 2026, 6:58:46 AMJun 4
to pretext...@googlegroups.com

Intentionally not including the previous content of this thread. :)

1) Yes, people are available to help with making a new theme.
Whether or not that ends up being sufficient help, will not be
known until the process is underway.

That discussion would take place on pretext-dev, not in email.
(This is longstanding PreTeXt practice: we do everything in public.
Most of the core developer will ignore or give a terse snippy
response if you email them directly.)

Participating in pretext-dev requires approval, which I and
others can do.

2) Just like typography should be left to the experts, so should
issues about accessibility and compliance. I am close to but not
as expert as some others on this list, but I'll note that it is
not our job to help people master the tools they use. If you
use a screen reader, it is our job to structure the page so that it
works well. It is not our job to tell you how to use that tool.

When Alex Jordan says:
"Forcing *all* readers to use 1.5 line height is not the right
thing to do. For many readers, that will make readability worse.
WCAG agrees, and is *not* asking you to do that."
Alex's statement needs to be taken seriously.

As I suggested, one of the drop-ins would be a good place to discuss
this further. Not every drop-in has people fully versed in
accessibility, so it might help to mention that here.

However, every drop-in has people familiar with the development
workflow, which could be helpful for starting the discussion
about making a new theme.

Regards,

David

Sean Fitzpatrick

unread,
Jun 4, 2026, 8:54:18 AMJun 4
to pretext...@googlegroups.com
I think one of the topics that bubbles up here from time to time is the creation of an accessibility toolbar. If such a thing existed, line height could be a parameter it adjusts.

But the toolbar is non-trivial (or it would already exist), and in a project run by volunteers with many priorities and little time, it seems there has not been enough demand to push it to the top of someone's list.

--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.

Igor Erovenko

unread,
Jun 4, 2026, 12:27:55 PMJun 4
to PreTeXt support
David, is this https://groups.google.com/g/pretext-dev the group you mentioned?

Sean Fitzpatrick

unread,
Jun 5, 2026, 12:53:56 PM (13 days ago) Jun 5
to pretext...@googlegroups.com

That's the right one.

--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages