QED not here

21 views
Skip to first unread message

Rob Beezer

unread,
Apr 16, 2025, 1:04:34 PM4/16/25
to prete...@googlegroups.com
LaTeX (or perhaps more properly the amsthm package?) has a \qedhere macro to
handle odd situations for an end-of-proof marker.

Once upon a time we looked to see if your proof ended with multi-line
display-math and we popped a \qedhere macro into the last line, so it would not
consume an entire new line all of its own.

1. Years ago we moved on from the amsthm package to tcolorbox for proofs.

2. About 9 months ago it was noted that this device wasn't working anymore.

3. I just discovered that the very intricate template for this was using huge
amounts of processing time, apparently to no effect.

If your project is proof-heavy, perhaps with lots of proofs ending with
multi-line display-math, you should notice a huge speed-up in creating your
LaTeX source. Perhaps 3x faster (AATA) or 4x faster (FCLA).

And entirely for Oscar: we had been providing a null-ish definition for \qedhere
in the preamble, I guess in case derived stylesheets wanted to override it, or
something. But it appears that we have stopped placing \qedhere anywhere
previously, and we certainly are not now. So maybe this has an implication for
your "classic" conversions.

I believe this makes no change in your output (tested on the sample article and
AATA). The device can come back, but the template needs to be more economical
than before.

Rob

PS: I may have a further universal 3x speedup for LaTeX in my sights, but it is
not as easy as ripping out worthless code.

Rob Beezer

unread,
Apr 16, 2025, 6:53:09 PM4/16/25
to prete...@googlegroups.com
On 4/16/25 10:04, 'Rob Beezer' via PreTeXt development wrote:
> PS: I may have a further universal 3x speedup for LaTeX in my sights, but it is
> not as easy as ripping out worthless code.

That's in place now. Large projects may see pretty substantial improvement in
the time to form a LaTeX file. (I'm looking at you, Alex and Sean. And David A
is going to miss his coffee time.) Not much to be done about the
LaTeX-compilation time, which now seems to dwarf the PreTeXt time substantially.

Times for the two speedups together, just making LaTeX:

AATA: 90s down to 7.7s

FCLA: 240s down to 16s

Sample article: 7s down to 3.5s

Reports of speed-ups for other large projects are always welcome!

Rob

@Oscar - second set of changes is in the "font-support" template. Should be a
no-change refactor, so should not affect "classic" conversions at all. BTW -
modularizing the preamble formation played a role in tracking these down.
Thanks for those improvements.

Sean Fitzpatrick

unread,
May 9, 2025, 12:07:35 PM5/9/25
to PreTeXt development
Building the .tex file for APEX took 40 minutes using CLI 2.17.1, and 2 minutes, 48 seconds using CLI 2.18.0.
Nice.

Rob Beezer

unread,
May 9, 2025, 2:21:51 PM5/9/25
to prete...@googlegroups.com
Excellent! Thanks for the report!
Reply all
Reply to author
Forward
0 new messages