Checkpoints and Knowl

113 views
Skip to first unread message

Roohollah Ebrahimian

unread,
May 27, 2021, 9:13:29 AM5/27/21
to PreTeXt support
Hi,

I have just started writing a book with pretext and have faced several issues that I cannot seem to find the answer to. Here are my initial questions:
  1. Exercises show as "Checkpoint"s. I followed the instructions and added  <rename element="exercise">Exercise</rename> inside the <docinfo> but nothing changed. I must be doing something wrong. Any ideas?
  2. I would like to change the default knowl option for examples and want my examples to be unhidden. I added <knowl example="no"/> to my <docinfo>, but I think that is the wrong place? I keep reading that I need to place it in my "publisher" file but I am not sure where that is?
  3. When typing math for pretext, what do people usually use? Using notepad seems to be cumbersome. Is there something like overleaf that would make it easier to type the latex codes?
I use Windows 10 and chrome if that matters.

Thank you so much,
Roohollah

Sean Fitzpatrick

unread,
May 27, 2021, 10:49:26 AM5/27/21
to pretext...@googlegroups.com
For 1, replace "exercise" with "inlineexercise" (this is what I have in my source).
For 2, move that line from docinfo to the publisher file.
For 3: I use Atom, with the language-pretext package provided by Oscar. Similar packages exist for Sublime Text and VSCode.
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/606e26c7-a73f-4c3a-abc2-e349e1abecf3n%40googlegroups.com.

Alex Jordan

unread,
May 27, 2021, 11:57:03 AM5/27/21
to pretext...@googlegroups.com
Here is information about the publisher file:
https://pretextbook.org/doc/guide/html/publisher-file.html
And more details here:
https://pretextbook.org/doc/guide/html/publisher-file-reference.html

And you will find that many or most of the example documents have a
publication.xml file that you can use as an example. For example,
there is one at:
mathbook/examples/sample-article/publication.xml

If you process your source files using the PreTeXt script, you can
invoke the publication file like:
pretext/pretext -p <put your path to the publication file here> <put
the rest of your arguments here>

See if the above documentation helps, and please let us know where it
is unhelpful. We would like to make documentation more helpful.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/71fa0979-1883-172c-beac-2c8533f34cc6%40gmail.com.

Roohollah Ebrahimian

unread,
May 27, 2021, 3:21:52 PM5/27/21
to pretext...@googlegroups.com
Thank you very much. The inlineexercise is what I needed.

For the publisher file, I read those but I am still unclear why it does not work for me. (Spent a couple hours trying to get it to work but had no success!) I tried creating a publisher file as instructed

<?xml version="1.0" encoding="UTF-8" ?>
<publication>
<knowl example="no"/>
</publication>

 and then entered the following:

xsltproc -stringparam publisher <path to publisher file.xml>

But nothing happens.  

Does that somehow need to be combined with the following? I tried many combination but nothing worked:

xsltproc -xinclude <path to  the file pretext-html.xsl> <path to the file index.ptx>

I use Git Bash on Windows 10 if that matters.

Thank you,
Roohollah

David Farmer

unread,
May 27, 2021, 3:38:03 PM5/27/21
to pretext...@googlegroups.com

Are you using a relative or absolute path for your

<path to publisher file.xml>
> > To view this discussion on the web visithttps://groups.google.com/d/msgid/pretext-support/71fa0979-1883-172c-beac-2c8533f34cc6%40gmai
> l.com.
>
> --
> 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.
> To view this discussion on the web visithttps://groups.google.com/d/msgid/pretext-support/CA%2BR-jrcpT7gPSnkKocqwivuXhWwQje%2BUrvQqqw
> a_0YswdX%3D5VQ%40mail.gmail.com.
>
> --
> 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.
> To view this discussion on the web visithttps://groups.google.com/d/msgid/pretext-support/CAM2PC%2BO2GNH57iunYLLR4yqczYRiMp9MAkDzxasS
> btSPyxBWBA%40mail.gmail.com.
>
>

Roohollah Ebrahimian

unread,
May 27, 2021, 3:53:20 PM5/27/21
to pretext...@googlegroups.com
I tried both. The publisher file is in the same folder as the index file. So, I basically typed in its name and nothing happened. Then I entered /c/Test/publisher.xml (which is the path) and nothing happened.

You received this message because you are subscribed to a topic in the Google Groups "PreTeXt support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pretext-support/s5ZMQajeIQ4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pretext-suppo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/alpine.LRH.2.21.2105271537360.15758%40li375-150.members.linode.com.

Alex Jordan

unread,
May 27, 2021, 4:02:06 PM5/27/21
to pretext...@googlegroups.com
If you want to build HTML, you might use the following, except of
course you need to change the paths:

xsltproc --xinclude --stringparam publisher /path/to/publication.xml
~/mathbook/xsl/pretext-html.xsl /path/to/project/root/file

The above has 3 paths that you should verify and/or adjust.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/CAM2PC%2BMxFDPjw0-tMRweDm%2B-0JU9Xb4vLC1RFznivzsdaVfcvw%40mail.gmail.com.

Sean Fitzpatrick

unread,
May 27, 2021, 4:06:54 PM5/27/21
to pretext...@googlegroups.com
I think you're missing a tag level: inside <publication> I believe you need <html>, and then the knowl tag.

Roohollah Ebrahimian

unread,
May 27, 2021, 4:16:12 PM5/27/21
to pretext...@googlegroups.com
Thank you, Alex and Sean. That worked out well!! Appreciate your patience.

Best,
Roohollah

Reply all
Reply to author
Forward
0 new messages