VS complaining about component in subtitle, but all works well

24 views
Skip to first unread message

Charles M

unread,
Jul 22, 2026, 11:13:13 PM (7 days ago) Jul 22
to PreTeXt support
To prevent myself releasing the wrong version to my students, I put the component "graded" in @subtitle in main.ptx.  VS complains that this is not allowed, but when I publish both to HTML and to PDF, all works exactly as I hope that it would.

Can you think of any reason that I shouldn't just ignore VS on this and continue using it as it is?

Thank you.

Charles

Rob Beezer

unread,
Jul 22, 2026, 11:32:35 PM (7 days ago) Jul 22
to pretext...@googlegroups.com
To be clear, you have

<subtitle component="graded">Some subtitle text here</subtitle> ?

Not VS Code's fault, likely an omission in the schema, which can be corrected.

Ignore complaints at your own peril. ;-)

Rob

Charles M

unread,
Jul 23, 2026, 12:26:20 AM (7 days ago) Jul 23
to PreTeXt support
Yes, you are correct.  

In fact, I just tried

<title>Blah blah</title>
<subtitle component="graded">Instructor Edition</subtitle>
<subtitle component="testing">Experiment</subtitle>

That, too, worked precisely as I would wish it to do.

Do you recommend an alternate conspicuous marker for versions in aid of prevention of publishing the wrong version to students?

Charles

PS Ignoring complaints at my peril is my preferred method for handling e-mails from the dean.

Rob Beezer

unread,
Jul 23, 2026, 10:27:21 AM (6 days ago) Jul 23
to pretext...@googlegroups.com
You really want:

Section 26.5: Watermarks
https://pretextbook.org/doc/guide/html/watermarks.html#watermarks

* I have not used this in a while, and in particular maybe CSS and HTML could
need attention. You can control it with versions as well. Please pass along
complaints - we want them all.

> my preferred method for handling e-mails from the dean

Well, that is a different matter entirely. ;-)

Rob
> --
> 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-
> support+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> support/4627112c-be2a-4cf4-94ce-f61e1afadff8n%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-support/4627112c-be2a-4cf4-94ce-
> f61e1afadff8n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Rob Beezer

unread,
Jul 27, 2026, 2:01:53 PM (2 days ago) Jul 27
to pretext...@googlegroups.com
Schema now allows @component on about 8 "title-like" elements, including the
offending #subtitle.

https://github.com/PreTeXtBook/pretext/pull/3079

Thanks very much, Charles, for reporting this. Any luck with watermarks?

Rob
Message has been deleted

Charles M

unread,
1:46 PM (2 hours ago) 1:46 PM
to PreTeXt support
Excellent!  Thank you, Rob!

I did try a watermark, and I decided against using them.  I have used them in the past in old-fashioned LaTeX, and my students did not like it.  They were sharing with each other how to use Adobe Acrobat to remove the watermark layer.

Instead, after your original reply, I began experimenting with using a second file publication-ins.ptx which I referenced in a target named 'instred' with PDF output main-instr.pdf.  Even though VS listed all the targets in the original project.ptx and in my publication-ins.ptx, I could only get it to build the targets in publication.ptx.  I probably wrote something poorly in my project.ptx file;  however, using @component in the title-like elements is easier, and it suits my needs perfectly.

Mille grazie!

Charles

PS Is there a trusted spell-check extension for VS (English)?
Reply all
Reply to author
Forward
0 new messages