CLI spec for XSL-FO pdfs

17 views
Skip to first unread message

Oscar Levin

unread,
Jun 18, 2026, 6:04:34 PM (2 days ago) Jun 18
to PreTeXt development
I've been following with great interest the new PDF conversion that skips latex.  I want the CLI to be ready for this, which I assume will be pretty easy to implement.  Especially excited to get accessible pdfs without needing latex for pretext.plus.

However, I don't know how an author should tell the CLI that they want this sort of PDF instead of a latex-built PDF.  This would be specified in the project.ptx manifest.  Currently, to get a PDF with latex you would write something like,

<target name="print" format="pdf" latex-engine="pdflatex" latex-source="yes" />

where the latex-engine defaults to xelatex if not provided; latex-source controls whether you get a copy of the uncompiled latex in your output directory.

One option is, when it is time, to make the format="pdf" switch to the new latex-less pdf, and introduce a new format="latex-pdf".  Or we add an additional attribute @use-latex="yes" that defaults to "yes" for now which we could switch to defaulting to "no" when its time.

This would be easier if there was a good name for non-latex-build pdfs.    Suggestions welcome.

Jason Siefken

unread,
Jun 18, 2026, 6:25:02 PM (2 days ago) Jun 18
to prete...@googlegroups.com
What if `latex-engine` were renamed to `pdf-engine`? Then it could take all sorts of values!
--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/126d60cc-caf7-4465-8ba3-3a53c01cc1fen%40googlegroups.com.

Oscar Levin

unread,
Jun 18, 2026, 7:16:31 PM (2 days ago) Jun 18
to prete...@googlegroups.com
What would the non-latex engine be called?

Message has been deleted

Rob Beezer

unread,
Jun 18, 2026, 9:10:02 PM (2 days ago) Jun 18
to prete...@googlegroups.com
"fo" or "FO" or "Formatting Objects" (see XSL-FO, the key spec, or FOP, the key
engine).

On 6/18/26 16:16, Oscar Levin wrote:
> What would the non-latex engine be called?
>
> On Thu, Jun 18, 2026, 4:25 PM Jason Siefken <sief...@gmail.com
> <mailto:sief...@gmail.com>> wrote:
>
> __
>> email to pretext-dev...@googlegroups.com <mailto:pretext-
>> dev+uns...@googlegroups.com>.
>> To view this discussion visit https://groups.google.com/d/msgid/pretext-
>> dev/126d60cc-caf7-4465-8ba3-3a53c01cc1fen%40googlegroups.com <https://
>> groups.google.com/d/msgid/pretext-dev/126d60cc-
>> caf7-4465-8ba3-3a53c01cc1fen%40googlegroups.com?
>> utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> ab5a8cce-1226-47e9-803e-fc241642cc51%40gmail.com <https://groups.google.com/
> d/msgid/pretext-dev/ab5a8cce-1226-47e9-803e-fc241642cc51%40gmail.com?
> utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> CAOU9BaWhyXcS12ksFGs0sYFfpKnJjfKjx6ytihxnHURq7-jF%2Bw%40mail.gmail.com <https://
> groups.google.com/d/msgid/pretext-dev/
> CAOU9BaWhyXcS12ksFGs0sYFfpKnJjfKjx6ytihxnHURq7-jF%2Bw%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Jason Siefken

unread,
Jun 19, 2026, 11:43:17 AM (yesterday) Jun 19
to prete...@googlegroups.com
Maybe "apache-fo" if that is the renderer actually being used?

Oscar Levin

unread,
Jun 19, 2026, 12:16:23 PM (yesterday) Jun 19
to prete...@googlegroups.com
Maybe my concern is overblown, but I'm trying to make pretext more friendly for new users, shouldn't we try to make our configuration options more.... obvious?  If I was a new user and heard that pretext could build a PDF without latex, what would I expect that to be called?  I had not heard of FO prior to this.

To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/624c5999-538b-408d-950f-ef3bb9d5320c%40gmail.com.

Jason Siefken

unread,
Jun 19, 2026, 12:27:47 PM (yesterday) Jun 19
to prete...@googlegroups.com
At a certain point, one needs to stop abstracting :-)  (I also see a future world where there are multiple non-latex options, Typst for example). In an ideal world, there are PreTeXt users that have never heard of latex, in which case "xelatex" and "lualatex", etc., are strange incantations. If one knows latex and wants to not use it for PDF generation, one might need to read the relevant doc section (or ask the AI).

That said, if the vscode extension/pretext-plus listed the options available with a short description of what each option implied, that would make it easily searchable by a user.

Also, pdf-engine would have a sensible default, no? If the PreTeXt team decides the quality of xsl-fo books surpasses that of the latex books, the default should change, and only "advanced" users should fiddle with it at all.

Sean Fitzpatrick

unread,
Jun 19, 2026, 1:08:30 PM (23 hours ago) Jun 19
to PreTeXt development
I'm not sure I have strong opinions on this, but I might point out that if I'm using XSL-FO because I want *accessible* PDF, then my build target is not "print". 

Once printed, any accessibility features are moot.

I would imagine that if I'm building a small document, like a syllabus, then I want accessible PDF, because I'm going to post it on my LMS. (I'm sure as heck not printing out 300 copies to distribute on the first day of class!)
Judging by the examples Rob shared, the XSL-FO PDF already looks better than what I get when I produce a syllabus via LaTeX. (I do not spend any time modifying the default style for a syllabus.)

But if I'm publishing a book, I'm going to direct online users to HTML, not accessible PDF. And for my print edition, I'm going to want all the layout and styling control that LaTeX provides. 
(I didn't ask Rob, but I'm guessing that XSL-FO does not provide the same level of control over page format.)

Charilaos Skiadas

unread,
Jun 19, 2026, 1:36:52 PM (23 hours ago) Jun 19
to prete...@googlegroups.com
My 2c:

1. The format should be called pdf, regardless of how it was produced. It makes no sense to me to have format="pdf" for non-latex and format="latex-pdf" for latex. To an end-user, they are producing a PDF output and that is the resulting "format". The particular engine/compiler used should be a separate attribute with sensible default. But perhaps to Sean's point, I could see a sense in having two formats: "online-pdf" and "print-pdf". The former prioritizes accessibility and maybe defaults to xsl-fo, the latter prioritizes print fidelity and maybe defaults to latex. Perhaps it is time to consider online pdf and print pdf as two different mediums.
2. Having an attribute called "latex-engine" also feels wrong at this point in time, as it assumes a "the only way to get pdf is via latex" viewpoint. It would make more sense to me for it to be simply called "engine". Then we simply have new possible values for the xsl-fo renderers. 
3. In my view a new user shouldn't even be in a situation where they contemplate that they can generate a PDF without latex. They are simply asking to generate a PDF. They should have to do no more than saying format="pdf". Maybe that uses latex right now and xsl-fo down the line based on defaults we set. A new user shouldn't even have to think about that.
4. I think an intermediate state is one where we deprecate the latex-engine attribute and introduce an engine attribute, which eventually would default to xsl-fo once that is deemed mature enough (or different defaults if we follow the "two pdf formats" route. Any existing projects would simply respect the latex-engine attribute and go the latex route no matter what.

Charilaos Skiadas
Department of Mathematics
Hanover College


Rob Beezer

unread,
Jun 19, 2026, 3:35:40 PM (21 hours ago) Jun 19
to prete...@googlegroups.com
I might as well join the fun. The pretext/pretext script uses -f for "format". Then it has -m for "method".

A good example is choosing to make asymptote images in format SVG, but your method can be a local executable or the canonical server at U Alberta.

Format is "pdf" and we have a variety of methods?

Note that pretext/pretext is not finalized for the FO route by any stretch of the imagination.

Rob

PS Enjoying the enthusiasm for this one!

On June 19, 2026 1:36:36 PM EDT, Charilaos Skiadas <cski...@gmail.com> wrote:
>My 2c:
>
>1. The format should be called pdf, regardless of how it was produced. It makes no sense to me to have format="pdf" for non-latex and format="latex-pdf" for latex. To an end-user, they are producing a PDF output and that is the resulting "format". The particular engine/compiler used should be a separate attribute with sensible default. But perhaps to Sean's point, I could see a sense in having two formats: "online-pdf" and "print-pdf". The former prioritizes accessibility and maybe defaults to xsl-fo, the latter prioritizes print fidelity and maybe defaults to latex. Perhaps it is time to consider online pdf and print pdf as two different mediums.
>2. Having an attribute called "latex-engine" also feels wrong at this point in time, as it assumes a "the only way to get pdf is via latex" viewpoint. It would make more sense to me for it to be simply called "engine". Then we simply have new possible values for the xsl-fo renderers.
>3. In my view a new user shouldn't even be in a situation where they contemplate that they can generate a PDF without latex. They are simply asking to generate a PDF. They should have to do no more than saying format="pdf". Maybe that uses latex right now and xsl-fo down the line based on defaults we set. A new user shouldn't even have to think about that.
>4. I think an intermediate state is one where we deprecate the latex-engine attribute and introduce an engine attribute, which eventually would default to xsl-fo once that is deemed mature enough (or different defaults if we follow the "two pdf formats" route. Any existing projects would simply respect the latex-engine attribute and go the latex route no matter what.
>
>Charilaos Skiadas
>Department of Mathematics
>Hanover College
>
>
>> On Jun 19, 2026, at 1:08 PM, Sean Fitzpatrick <dsfitz...@gmail.com> wrote:
>>
>> I'm not sure I have strong opinions on this, but I might point out that if I'm using XSL-FO because I want *accessible* PDF, then my build target is not "print".
>>
>> Once printed, any accessibility features are moot.
>>
>> I would imagine that if I'm building a small document, like a syllabus, then I want accessible PDF, because I'm going to post it on my LMS. (I'm sure as heck not printing out 300 copies to distribute on the first day of class!)
>> Judging by the examples Rob shared, the XSL-FO PDF already looks better than what I get when I produce a syllabus via LaTeX. (I do not spend any time modifying the default style for a syllabus.)
>>
>> But if I'm publishing a book, I'm going to direct online users to HTML, not accessible PDF. And for my print edition, I'm going to want all the layout and styling control that LaTeX provides.
>> (I didn't ask Rob, but I'm guessing that XSL-FO does not provide the same level of control over page format.)
>>
>>>>>>>> email to pretext-dev...@googlegroups.com <mailto:pretext-dev...@googlegroups.com> <mailto:pretext-
>>>>>>>> dev+uns...@googlegroups.com <mailto:dev+uns...@googlegroups.com>>.
>>>>>>>> To view this discussion visit https://groups.google.com/d/msgid/pretext-
>>>>>>>> dev/126d60cc-caf7-4465-8ba3-3a53c01cc1fen%40googlegroups.com <http://40googlegroups.com/> <https://
>>>>>>>> groups.google.com/d/msgid/pretext-dev/126d60cc- <http://groups.google.com/d/msgid/pretext-dev/126d60cc->
>>>>>>>> caf7-4465-8ba3-3a53c01cc1fen%40googlegroups.com <http://40googlegroups.com/>?
>>>>>>>> utm_medium=email&utm_source=footer>.
>>>>>>>
>>>>>>> -- You received this message because you are subscribed to the Google Groups
>>>>>>> "PreTeXt development" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it, send an
>>>>>>> email to pretext-dev...@googlegroups.com <mailto:pretext-dev...@googlegroups.com> <mailto:pretext-
>>>>>>> dev+uns...@googlegroups.com <mailto:dev+uns...@googlegroups.com>>.
>>>>>>> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
>>>>>>> ab5a8cce-1226-47e9-803e-fc241642cc51%40gmail.com <http://40gmail.com/> <https://groups.google.com/
>>>>>>> d/msgid/pretext-dev/ab5a8cce-1226-47e9-803e-fc241642cc51%40gmail.com <http://40gmail.com/>?
>>>>>>> utm_medium=email&utm_source=footer>.
>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com <mailto:pretext-dev...@googlegroups.com> <mailto:pretext- dev+uns...@googlegroups.com> <mailto:pretext-dev...@googlegroups.com>.
>>>>>>> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/ CAOU9BaWhyXcS12ksFGs0sYFfpKnJjfKjx6ytihxnHURq7-jF%2Bw%40mail.gmail.com <http://40mail.gmail.com/> <https:// groups.google.com/d/msgid/pretext-dev/ CAOU9BaWhyXcS12ksFGs0sYFfpKnJjfKjx6ytihxnHURq7-jF%2Bw%40mail.gmail.com? utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/pretext-dev/CAOU9BaWhyXcS12ksFGs0sYFfpKnJjfKjx6ytihxnHURq7-jF%2Bw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>>>>>>
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com <mailto:pretext-dev...@googlegroups.com>.
>>>>> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/624c5999-538b-408d-950f-ef3bb9d5320c%40gmail.com <https://groups.google.com/d/msgid/pretext-dev/624c5999-538b-408d-950f-ef3bb9d5320c%40gmail.com?utm_medium=email&utm_source=footer>.
>>>> --
>>>> You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com <mailto:pretext-dev...@googlegroups.com>.
>>>> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/CAOU9BaW_%3DG%2BFFLiOkJ%3DzFoMo8_OGZ45O5PuJKzBsjcePSxQ0wQ%40mail.gmail.com <https://groups.google.com/d/msgid/pretext-dev/CAOU9BaW_%3DG%2BFFLiOkJ%3DzFoMo8_OGZ45O5PuJKzBsjcePSxQ0wQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com <mailto:pretext-dev...@googlegroups.com>.
>>> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/586f71c5-0191-4e3a-922a-ab6d7f905f4a%40gmail.com <https://groups.google.com/d/msgid/pretext-dev/586f71c5-0191-4e3a-922a-ab6d7f905f4a%40gmail.com?utm_medium=email&utm_source=footer>.
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com <mailto:pretext-dev...@googlegroups.com>.
>> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/CAH%2BNcPZxpN%3D1UMdD0GasbMqLmcaNAz33N-Kg%2Bpb2%3DSQMQ-syHw%40mail.gmail.com <https://groups.google.com/d/msgid/pretext-dev/CAH%2BNcPZxpN%3D1UMdD0GasbMqLmcaNAz33N-Kg%2Bpb2%3DSQMQ-syHw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
Reply all
Reply to author
Forward
0 new messages