PreTeXtBook / pretext-cli

Command line interface for quickly creating, authoring, and building PreTeXt documents.
https://pretextbook.org
GNU General Public License v3.0
17 stars 18 forks source link

Signature changes for PDF, HTML, LaTeX conversions in core #160

Closed rbeezer closed 3 years ago

rbeezer commented 3 years ago

The pdf(), latex(), and html() routines now have a new fourth argument, which is a stylesheet that will be used instead of the default versions.

You can pass None in this parameter until you want to support it. To use, it should receive a full filename (complete path).

It is the author's responsibility to ensure it behaves! Which could suggest a reason for pretext/pretext to have this support, and the CLI not to?

See https://github.com/rbeezer/mathbook/commit/5f6cdebcf0377835aec7e503010e4ea3ee0cd40a

oscarlevin commented 3 years ago

I was just thinking about implementing something like this just for the CLI this morning. It is the only thing stopping me from using the CLI in my own projects. With this change to the core, I think we can tackle issue #23 and do so easily. I'll post an idea there for at least a temporary way to make this work and try to implement it today. If I can finish it by Friday, maybe we release 0.5 and really feel like everything is done.

StevenClontz commented 3 years ago

N.B. we should take advantage of our support for converting <xsl:import pretext-href="pretext-common.xsl"/> written in an author's source to <xsl:import href="/path/to/pretext-cli/xsl/pretext-common.xsl"/>, so you can extend CLI-managed XSL without worrying about where it actually lives on your disk.

rbeezer commented 3 years ago

Cool! I'm trying to get AATA cutover to pretext/pretext to the point where the current makefile is trivially stupid. ;-) Almost "inside baseball": might work on "versions" next.

Holler if new code misbehaves. Announcement on -dev in a bit, with documentaion with some gotchas.

rbeezer commented 3 years ago

our support

Oh, good. Only documented gotchas with my hacky setup for that.