If #set text(lang: "...") is not used, lang defaults to en, which means, for example, that "straight" quotation marks are converted to “curly” ones. But is it possible to simply disable all the typographical substitutions, so that, for example, "straight" quotation marks will stay straight and three consequtive hyphens won’t be converted to em dash? Of course, I don’t mean to put the whole text inside the raw block.
I tried #set text(lang: "none"), but this produces an error.
I don’t quite understand why turning * into bold wouldn’t be a “typographical substitution”. You claim you don’t want raw, but that’s basically what you’re describing.
Could it be implemented? "none" could probably be added as a language, but then the question is what that language’s behavior should be. Is *strong* regional or not? This would have to be decided on the Typst level. In the end it’s probably best if you make those decisions yourself, using a set of show rules like the ones shown.
This returns us to my comment above in which I replied to @Enivex:
Enivex: I don’t quite understand why turning * into bold wouldn’t be a “typographical substitution”. You claim you don’t want raw, but that’s basically what you’re describing.
Me: Well, I tend to agree.
Now I see that my reply to him was not really correct. We can put literal em dash or literal curly quotation marks in raw Typst. But we cannot put literal bold text there. That is to say, the demarcation line can be put between:
things that we can represent in raw Typst using Unicode symbols. That is, if we use lang: "none", no need to convert --- to em dash because we can put literal em dash if we really need it somewhere. That is, if we use lang: "none", then --- should be preserved as-is.
and things that we cannot represent in raw Typst, such as bold ot italic text, for example. These things should be converted nevertheless.
That is, I don’t mean regional-specific substitutions. Sorry.
I think if we are talking specifically about substitutions, then smart quotes should be the only one that exists. There are some other regional-specific stuff that are used in different things:
But it isn’t really the kind of substitution you are talking about.
Since different length dashes aren’t a regional substitution, there is nothing to add here. But if you really want to disable the default substitution behavior, you can use @SillyFreak’s solution:
#show sym.dash.en: "--"
#show sym.dash.em: "---"
a - -- --- b
About bold and italic. Since these functions have a dedicated syntax, you can’t insert verbatim symbols that represent the dedicated syntax. For them, you have to use escaping with a backslash (\):
\*not bold\*
\_not italic\_
my\@email // small bonus
I don’t think it’s a string interpolation, it’s just a string (that can’t handle special markup syntax). It’s the same core concept as #show sym.dash.em: "---", but manual/must be used for each instance separately. The difference (from markup mode) however is that:
you don’t have to escape `*_@# symbols;
you have to escape double quotes.
I think in certain situations this might be a better solution (than escaping everything in markup).