That looks workable - nothing grabs me as a big improvement on that approach.
Relying on "tcb@cnt@block" is a tad dangerous, but perhaps unavoidable.
Mitch's suggestion is a good one, since a solutions manual as a PDF is
supported. And care has been taken with numbering. "xsl:apply-imports" can be
a good way to define a new templarte with just a bit of code before the "base"
version and a bit of code just after, such as a page break after each activity.
There is a variable for *internal use only* that hardcodes LaTeX numbers with
the same ones as the HTML (etc) and kills LaTeX's auto-numbering. That's how
the solutions manual does it.
Find "b-latex-hardcode-numbers" in the LaTeX conversion and in the solutions
manual conversion.
Part of having "worksheet" was to be able to make a "workbook", but there was
always some disagreement on what that all meant. Presumably we could have
"activity" as an option for teh contents of a "workbook".
Rob
>> <mailto:
steven...@gmail.com>> wrote:
>>
>> I think I know how Active Calculus has this working: the default behavior
>> of PreTeXt (unfortunately) numbers Activities separately from other
>> comparable blocks. We use a stringparam to provide the more natural
>> behavior of numbering activites along with every other element, so
>> Activity 1.2.3 appears between Definition 1.2.2 and Lemma 1.2.4 in the
>> full book. But it does mean that AC can just toss out the non-activities
>> without affecting numbering.
>>
>> As I mentioned in Zoom today, I have code at
>>
https://github.com/TeamBasedInquiryLearning/linear-algebra/blob/775ba1c889b6ca6c4a0fd37af4164f8dea4abef2/xsl/extract-slideshow.xsl#L43 <
https://github.com/TeamBasedInquiryLearning/linear-algebra/blob/775ba1c889b6ca6c4a0fd37af4164f8dea4abef2/xsl/extract-slideshow.xsl#L43>that uses
>>
>> <xsl:apply-templates select="." mode="number"/>
>>
>> to extract a number manually (before dropping/skipping other blocks),
>> which could possibly be used to this end.
>>
>> On Wednesday, November 1, 2023 at 1:49:01 PM UTC-5
drew....@gmail.com
>> <
http://gmail.com/>wrote:
>>
>> Hi folks,
>> We had a request to build a "worksheet" version of our book, by which
>> they mean a PDF version containing only the <activity>s they can hand
>> to students (and omitting <fact>s, <definition>s, etc.). I got this
>> working by adapting some xsl from Active Calculus (thanks Mitch!),
>> however the numbering does not match the numbering in the HTML
>> version; for example, Section 4.4 in the HTML has an Activity 4.4.1,
>> Fact 4.4.2, and Activity 4.4.3, but the "worksheet" PDF has Activity
>> 4.4.1 and Activity 4.4.2.
>>
>> My question: What is the right way to make the numbering align so that
>> the "worksheet" PDF has Activity 4.4.1 and then Activity 4.4.3?
>>
>> The XSL I have for now is at
>>
https://github.com/TeamBasedInquiryLearning/linear-algebra/blob/francesca-worksheet/xsl/worksheet.xsl <
https://github.com/TeamBasedInquiryLearning/linear-algebra/blob/francesca-worksheet/xsl/worksheet.xsl>
>>
>> Thanks,
>> Drew Lewis
>>
>>
>> --
>> 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
topretext-supp...@googlegroups.com
>> <mailto:
pretext-suppo...@googlegroups.com>.
>> To view this discussion on the web
>> visithttps://
groups.google.com/d/msgid/pretext-support/f9803541-ee29-4328-9bc2-2b0bc7a3d2aan%40googlegroups.com <
https://groups.google.com/d/msgid/pretext-support/f9803541-ee29-4328-9bc2-2b0bc7a3d2aan%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> Mitch Keller
>
mi...@rellek.net <mailto:
mi...@rellek.net>
>
>
http://www.rellek.net/ <
http://www.rellek.net/>
> <
https://groups.google.com/d/topic/pretext-support/kosEJK6mVZw/unsubscribe>.
> <mailto:
pretext-suppo...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/pretext-support/A50B62F2-1765-475A-A8C7-ECE9634DB9AB%40rellek.net <
https://groups.google.com/d/msgid/pretext-support/A50B62F2-1765-475A-A8C7-ECE9634DB9AB%40rellek.net?utm_medium=email&utm_source=footer>.
>
> --
> 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-suppo...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/pretext-support/CAD_ZjhnAM8dgfxh%3DCJSjtnyFXsTmjBTOQpUQgBJF5XeQnV022w%40mail.gmail.com <
https://groups.google.com/d/msgid/pretext-support/CAD_ZjhnAM8dgfxh%3DCJSjtnyFXsTmjBTOQpUQgBJF5XeQnV022w%40mail.gmail.com?utm_medium=email&utm_source=footer>.