[NEW] Quotation mark styles for different languages

39 views
Skip to first unread message

Rob Beezer

unread,
Feb 19, 2026, 11:36:15 AMFeb 19
to prete...@googlegroups.com
Elements related to quotations will now react to the language given by @xml:lang
attributes. More precisely, #q (primary quotation group) and #sq (secondary
quotation group), will use marks according to the closest enclosing element with
an @xml:lang attribute. The four rarely-used elements that produce right/left
single versions of the marks will also behave similarly.

See the sample article (especially in PDF form!) at the end of:

Subsection 9.2: Quotations
https://pretextbook.org/examples/sample-article/html/section-text-paragraphs.html#quotations

Notes:

* There is no publisher switch for this, no opt-in or opt-out. Changes will
just roll-out with updates.

* You can always put a @xml:lang attribute directly on a #q or #sq for a
one-off change.

* This affects outputs to HTML, EPUB, Jupyter, and LaTeX. Braille is
out-of-scope, too lazy to fixup the conversion to ASCII text right now, and
WeBWorK is not set-up to digest this.

Caveat: only implemented for en-US and fr-FR at the moment. Yes, I picked
up the thin space. fr-CA will be trivial to turn on next. I may post here as
new languages receive an implementation.

Feedback: I'd love to hear from authors of projects in French about how this is
working for them. Canadians can briefly turn on the French attribute for
testing? You'll need the CLI nightly, or the pretext/pretext script.

Plans: any scheme with marks in Unicode and as LaTeX macros is a candidate for
implementation. Like quote marks down at the baseline? Corner-brackets for CJK?

Language maintainers
~~~~~~~~~~~~~~~~~~~~

* Documentation is in the en-US file, as usual.

* This is accomplished with two mandatory attributes on the #locale element.
If a scheme/variant/style is available already that fits your language, it is a
simple edit. If we need a new style it is a bit more work, but easy for me to
do. For now, every file (other than fr-FR) has English quotes specified as a
default.

* More important is to help me understand what your language uses. Since we
are producing scholarly documents, more formal versions are preferred. (In
other words, maybe the custom is to use English marks online, but we would opt
instead for whatever a national style guide says, or whatever custom is used in
research papers and textbooks.)

* I'm putting a test of each new quotation style (not each new language) in the
sample article with some iconic quotes (link above). You can help with that, too.

* Chevrons/Angles, without a thin space, will be the easiest to do next.
Italian? Spanish (Spain/Mexico/LatAm?)?

* The pretext-dev group is a good place to start a discussion.

Rob

Rob Beezer

unread,
Feb 19, 2026, 11:58:23 AMFeb 19
to prete...@googlegroups.com
Ooooops, this was meant for pretext-announce, and I was going to briefly
comment on the -dev thread. Oh, well. Sorry for the noise. -Rob

valeriom...@gmail.com

unread,
Aug 31, 2026, 9:13:27 AMAug 31
to PreTeXt development

Hello everyone,

I'm bringing this message back up because I would like to localize the quotation mark style for Italian. I had some doubts because, unlike English with the CMOS, Italian does not have a widely accepted reference standard, and I did not want to rely solely on my personal conventions. However, after doing some research in various texts and linguistics websites, my ideas have become even more confused.

One possibility would be to leave everything as it is, following English conventions, which are generally acceptable in Italian as well. 

Another possibility would be to follow a convention similar to the French one and use guillemets (« ») as the primary quotation marks. The problem is that, while these quotation marks are often used in Italian for dialogue (which is rare or entirely absent in STEM texts) and for quoting statements by an author (a somewhat more common occurrence), there is at least one other use of quotation marks that is semantically different and might require separate treatment. I am referring to cases where we want to highlight a term, either because it has just been introduced or because it is being used in a slightly informal or non-standard sense (for example, "we are looking for a 'small' integer that satisfies the given equation"). In this case, guillemets would be inappropriate in Italian; standard quotation marks would work better, or alternatively the <em> tag could be used. This made me wonder whether it might be worthwhile to distinguish between the different semantic uses of quotation marks.

I also noticed another minor issue. As an experiment, I tried setting the language to French to see the effect on my project. My book is released under the GFDL license, and the file that needs to be used is the official English version, which contains quite a few <q> tags that should retain standard English quotation marks. To achieve this, it is sufficient to add the xml:lang="en-US" attribute to the <appendix> tag, and everything works correctly.

However, there is also a <shortlicense> tag in the preamble that should likewise have the xml:lang="en-US" attribute added. Doing so produces the correct English quotation marks, but it also causes a validation error.

I hope I haven't opened Pandora's box with this.

Valerio

Rob Beezer

unread,
Aug 31, 2026, 3:41:26 PMAug 31
to prete...@googlegroups.com
> I hope I haven't opened Pandora's box with this.

The box was already open. We had a pretty good idea of where we were going when
we did our own (limited) poking around to see what other languages do.

Thanks for your careful thoughts on this. Easy stuff first.

1. GFDL license. Right! That had not crossed my mind. I'll check to see if
we need some updates.

2. Short license. Change should go into the schema, for sure.

3. Highlighting a term: thinking as I write - <q><term>small</term></q> could
provoke an alternate treatment, or we could have a hint, <q variant="term">. I
use quotes a lot, in much the way you describe. I've never really felt like I
thought about semantic variants, but then we only have the upright quoteds in
English, so there is not teh opportunity for variance. Not sure what is best to
do here.

4. Do you have a recommendation for most uses in Italian? English upright, or
French guillemets? We could start there, before going down the rabbit hole on #3?

Rob
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> dc67bcc8-204b-4080-9936-2dd421276a10n%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-dev/
> dc67bcc8-204b-4080-9936-2dd421276a10n%40googlegroups.com?
> utm_medium=email&utm_source=footer>.

valeriom...@gmail.com

unread,
Sep 2, 2026, 3:22:23 AMSep 2
to PreTeXt development

Dear Rob,

Thank you for your answer.

If you want to dive into a semantic nightmare, Wikipedia documents even more different uses of quotation marks:

https://en.wikipedia.org/wiki/Quotation_marks_in_English

That said, I think that perfectly semantic markup is nearly impossible (for example, how many different uses do we have for some mathematical symbols?).

To keep things simple, the English style is perfectly reasonable for Italian as well, even if it is not the only possible choice. I wouldn't go down that rabbit hole for now.

About the licenses: following the advice in

https://pretextbook.org/doc/guide/html/open-licenses-6.html

an author could copy the version formatted for inclusion in a PreTeXt project from the source of the guide. Therefore, I would add xml:lang="en-US" to the source of the guide and possibly elsewhere. This should be harmless (even if redundant) for English-language projects, while providing a more faithful result for projects in languages other than English. I just realized that, beyond the quotation-mark issue, there is also LaTeX hyphenation to consider.

The same applies to the shortlicense code, provided that the schema is updated.


Cheers,
Valerio

Rob Beezer

unread,
Sep 2, 2026, 5:53:04 PMSep 2
to prete...@googlegroups.com
Thanks very much, Valerio, for the work on this and the suggestions. I think
everything is covered at

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

With one loose end that will be a new thread.

> If you want to dive into a semantic nightmare

If I didn't, I wouldn't still be doing this! I have seen that page... We are
trying to find a nice balance between semantics for semantics' sake, and the
practicalities of making authoring simple and enjoyable.

Rob
> dev/ <https://groups.google.com/d/msgid/pretext-dev/>
> > dc67bcc8-204b-4080-9936-2dd421276a10n%40googlegroups.com
> <http://40googlegroups.com> <https://
> > groups.google.com/d/msgid/pretext-dev/ <http://groups.google.com/d/msgid/
> pretext-dev/>
> > dc67bcc8-204b-4080-9936-2dd421276a10n%40googlegroups.com
> <http://40googlegroups.com>?
> > utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> dev/00a1e43b-7b60-4da3-93eb-4137100a38e6n%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-
> dev/00a1e43b-7b60-4da3-93eb-4137100a38e6n%40googlegroups.com?
> utm_medium=email&utm_source=footer>.

Reply all
Reply to author
Forward
0 new messages