apex.ptx and apex-print.ptx

6 views
Skip to first unread message

Alex Jordan

unread,
Dec 24, 2020, 12:28:34 AM12/24/20
to apexactive-calcul...@googlegroups.com
There is apex.ptx and apex-print.ptx. Judging by a file diff, the
important things are some asymptote settings. The problem with doing
this separation this way is if I have to make an adjustment (right
now, to the latex macros) I have to remember to do it in each file. I
can think of at least one way to do it differently, where the two hub
files each insert content they have in common from a common file. But
before doing that, I wanted to check in about that asymptote stuff. Is
there a short explanation for why the differences? I'm wondering if
there might be an approach that doesn't need the file branching.

Sean Fitzpatrick

unread,
Dec 24, 2020, 12:54:27 AM12/24/20
to APEX/Active Calculus MBX conversion
The differences are the colour definitions in both the latex-image-preamble and asymptote-preamble. In the print version, these are grey scale.

I know you've mentioned in the past that there's a way to rewrite those definitions in the LaTeX output after the fact, rather than getting them right at the outset.

For Asymptote I'm less sure how to do this. The Asymptote code doesn't make it into the LaTeX file. Instead, we run the pretext script to generate pdf images for each figure.
That script inserts all the LaTeX macros, as well as the asymptote-preamble, into each asy file.

I don't know a better way to do this. And changes to the top level file are so infrequent that this was the cheapest option from my point of view.


--

Rob Beezer

unread,
Dec 24, 2020, 1:03:45 AM12/24/20
to Sean Fitzpatrick, APEX/Active Calculus MBX conversion
Any single element located in a single file can be "xi:include"-ed into multiple files. I'm doing this right now at the "theorem" and "example" level.

I can't see exactly what you are discussing, so can't tell if that option is useful.

Alex Jordan

unread,
Dec 24, 2020, 1:29:44 AM12/24/20
to apexactive-calcul...@googlegroups.com, Sean Fitzpatrick
> Any single element located in a single file can be "xi:include"-ed into multiple files. I'm doing this right now at the "theorem" and "example" level.'

Yes, this is what I meant with "I can think of at least one way to do
it differently..."

Sean, are the grayscale colors set with intent? As in, it's not as
good to let the colors be colorful, and fall to whatever grayscale
value they normally fall to?
> --
> You received this message because you are subscribed to the Google Groups "APEX/Active Calculus MBX conversion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to apexactive-calculus-mbx...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/apexactive-calculus-mbx-conversion/MTAwMDAzNC5iZWV6ZXI.1608789822%40quikprotect.

Sean Fitzpatrick

unread,
Jul 14, 2021, 4:24:25 PM7/14/21
to APEX/Active Calculus MBX conversion
Apparently I didn't answer Alex. Getting to it, 7 months late.
The grayscale settings are taken from APEX (LaTeX), and done with intent.

The red and blue colours used throughout print to the same shade of grey on a BW printer.
They are replaced with different shades to ensure readability.

Now that the docinfo is in a separate file, I have made a docinfo-print that has the other colour settings.
Can I use customization to choose between them in the publisher file? (I guess I can try and find out.)
If so we can drop apex-print. I'll report back in a bit.

Sean Fitzpatrick

unread,
Jul 14, 2021, 4:55:12 PM7/14/21
to APEX/Active Calculus MBX conversion
OK, so (1) the schema doesn't allow <custom> as a child of <pretext> (no surprise there), and (2) I can't figure out a way to get xi:include to work.
(I get a namespace error no matter where I put the xmlns:xi in the customization and publisher files.)

Is there a better way to toggle between the two docinfo files?
Right now, the only difference between apex.ptx and apex-print.ptx is that the first line after the <pretext> tag is <xi:include href="./docinfo.ptx"/> in one,
and <xi:include href="./docinfo-print.ptx"/> in the other.

Reply all
Reply to author
Forward
0 new messages