italian words with apostrophe - hyphenation and discretionary
Hello list, I'd like to know how to specify the following rules of the Italian language. Feminine words starting with a vowel change the preceding indefinite article ending with a vowel: the article loses the ending vowel, that is replaced by an apostrophe. Example: una opera => un'opera ("a work", but also "an opera") una opera => un’opera (with the unicode curly single quote) In case of definite articles, that is true also for masculine words starting with a vowel. la opera => l'opera ("the work", also "the opera", feminine) lo operaio => l'operaio ("the worker", masculine) This extends to articulate prepositions (preposition+article), like nella opera => nell'opera ("in the work", "in the opera") dello operaio => dell'operaio ("of the worker") HYPHENATION In Italian you can't hyphenate after an apostrophe: un'opera => un'o-pe-ra nell'opera => nel-l'o-pe-ra so these are the allowed hyphenations: un'o- pera typographically rather ugly un'ope- ra better nel- l'opera typographically the best (preposition-article split) nell'o- ugly pera nell'ope- ra but, though it's not used much anymore, you can go back to the version without apostrophe, as long as the uncut article or preposition is the last word in a line: una opera nella opera These are seldom used, but they would be a good solution, especially when the line break occurs across pages. Sometimes it's also the finest typographical solution when you have narrow columns. The reason it is seldom used is because there's no automatic solution in typesetting software. You can do it manually, but when a change in the text modifies the line breaking, the article/preposition could move away from the end of the line, and you'd get "una opera" or "nella opera" in the middle of a line, which is grammatically correct but definitely not something you would expect in a printed text, considered almost an error. THE QUESTION Is there a way to encode such rules with \hyphenation and \discretionary? I tried \hyphenation{nel{-l'o}{la}{o}-pe-ra} but it does not seem to work. Massi
Hi Massi, I do not know if there is the completely automated solution but I guess that the following code might help you, the #3 way with \definetextmodediscretionary seems the best to me. Tomáš %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % APOSTROPHE, HYPHENATED %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % For number 3 you need: \definetextmodediscretionary l' {\discretionary{-}{l'}{l'}} %\definetextmodediscretionary l’ {\discretionary{-}{l’}{l’}} \def\mycmd{\par\thinrule \par 1.~\discretionary{nel-}{l'opera}{nell'opera} \par 2.~nel\discretionary{-}{l'}{l'}opera \par 3.~nel|l'|opera } \starttext \hsize10cc \par \mycmd \hsize1dd \par \mycmd \stoptext %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % FULL WORDS, NO HYPHENATION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % For number 3 you need: \definetextmodediscretionary ' {\discretionary{a}{}{'}} %\definetextmodediscretionary ’ {\discretionary{a}{}{’}} \def\mycmd{\par\thinrule \par 1.~\discretionary{nella}{opera}{nell'opera} \par 2.~nell\discretionary{a}{}{'}opera \par 3.~nell|'|opera } \starttext \hsize10cc \par \mycmd \hsize1dd \par \mycmd \stoptext On Tue, Oct 22, 2024 at 01:59:10PM +0200, mf wrote:
Hello list,
I'd like to know how to specify the following rules of the Italian language.
Feminine words starting with a vowel change the preceding indefinite article ending with a vowel: the article loses the ending vowel, that is replaced by an apostrophe. Example:
una opera => un'opera ("a work", but also "an opera") una opera => un’opera (with the unicode curly single quote)
In case of definite articles, that is true also for masculine words starting with a vowel.
la opera => l'opera ("the work", also "the opera", feminine)
lo operaio => l'operaio ("the worker", masculine)
This extends to articulate prepositions (preposition+article), like
nella opera => nell'opera ("in the work", "in the opera")
dello operaio => dell'operaio ("of the worker")
HYPHENATION
In Italian you can't hyphenate after an apostrophe:
un'opera => un'o-pe-ra nell'opera => nel-l'o-pe-ra
so these are the allowed hyphenations:
un'o- pera typographically rather ugly
un'ope- ra better
nel- l'opera typographically the best (preposition-article split)
nell'o- ugly pera
nell'ope- ra
but, though it's not used much anymore, you can go back to the version without apostrophe, as long as the uncut article or preposition is the last word in a line:
una opera
nella opera
These are seldom used, but they would be a good solution, especially when the line break occurs across pages. Sometimes it's also the finest typographical solution when you have narrow columns.
The reason it is seldom used is because there's no automatic solution in typesetting software. You can do it manually, but when a change in the text modifies the line breaking, the article/preposition could move away from the end of the line, and you'd get "una opera" or "nella opera" in the middle of a line, which is grammatically correct but definitely not something you would expect in a printed text, considered almost an error.
THE QUESTION
Is there a way to encode such rules with \hyphenation and \discretionary?
I tried
\hyphenation{nel{-l'o}{la}{o}-pe-ra}
but it does not seem to work.
Massi ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________
Thank you, Tomáš! I chose this one: nell\discretionary{a}{}{'}opera It's not a general solution, but it's a local, elegant fix. In my case I had "dell’Informazione", hyphenated as "del-l’Informazione". That hyphenation is fine in general, but here it happens at the end of an odd page, so that you must turn the page to see what comes after "del-". Now the page ends with "della", and the next one starts with "Informazione". Which is typographically better. If the text preceding those words changes, they may end in the middle of a line, but as "dell’Informazione" instead of "della Informazione". Moreover, I found a way to make it work with my XML workflow. It's actually something like this: ... dell<ctx>\discretionary{a}{}{</ctx>’<ctx>}</ctx>Informazione ... Think of the <ctx> tag as a way to inject ConTeXt code that is not part of the contents of the document, but it's important for a particular typesetting layout. Once you expunge the <ctx> tags, you get back the pure, intact content: ... dell’Informazione ... Massi Il 22/10/24 15:33, Tomáš Hála ha scritto:
Hi Massi,
I do not know if there is the completely automated solution but I guess that the following code might help you, the #3 way with \definetextmodediscretionary seems the best to me.
Tomáš
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % APOSTROPHE, HYPHENATED %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% For number 3 you need: \definetextmodediscretionary l' {\discretionary{-}{l'}{l'}} %\definetextmodediscretionary l’ {\discretionary{-}{l’}{l’}}
\def\mycmd{\par\thinrule \par 1.~\discretionary{nel-}{l'opera}{nell'opera} \par 2.~nel\discretionary{-}{l'}{l'}opera \par 3.~nel|l'|opera }
\starttext \hsize10cc \par \mycmd \hsize1dd \par \mycmd \stoptext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % FULL WORDS, NO HYPHENATION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% For number 3 you need: \definetextmodediscretionary ' {\discretionary{a}{}{'}} %\definetextmodediscretionary ’ {\discretionary{a}{}{’}}
\def\mycmd{\par\thinrule \par 1.~\discretionary{nella}{opera}{nell'opera} \par 2.~nell\discretionary{a}{}{'}opera \par 3.~nell|'|opera }
\starttext \hsize10cc \par \mycmd \hsize1dd \par \mycmd \stoptext
On Tue, Oct 22, 2024 at 01:59:10PM +0200, mf wrote:
Hello list, ...
Hi Tomáš and Massi,
I chose this one:
nell\discretionary{a}{}{'}opera
It's not a general solution, but it's a local, elegant fix.
In my case I had "dell’Informazione", hyphenated as "del-l’Informazione". That hyphenation is fine in general, but here it happens at the end of an odd page, so that you must turn the page to see what comes after "del-".
Now the page ends with "della", and the next one starts with "Informazione". Which is typographically better.
If the text preceding those words changes, they may end in the middle of a line, but as "dell’Informazione" instead of "della Informazione".
Moreover, I found a way to make it work with my XML workflow. It's actually something like this:
... dell<ctx>\discretionary{a}{}{</ctx>’<ctx>}</ctx>Informazione ...
Think of the <ctx> tag as a way to inject ConTeXt code that is not part of the contents of the document, but it's important for a particular typesetting layout.
Once you expunge the <ctx> tags, you get back the pure, intact content:
... dell’Informazione ...
There's a fourh way ... \starttext \startexceptions nell{a}{}{a'}opera \stopexceptions \start \hsize 10cm nella'opera \par \stop \start \hsize 01mm nella'opera \par \stop \start \hsize 10cm nell\discretionary{a}{}{'}opera \par \stop \start \hsize 01mm nell\discretionary{a}{}{'}opera \par \stop \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Hi Hans, I have to admit that \startexceptions is new to me, thank you. nell{a}{}{a'}opera very nicely solves the full word substitution but I do not know how to figure out the hyphenatation case: Using the exception "nel{-}{l'}{l'}opera" it will change also words with articles where hyphenation is supressed (below). Is there any way how to fix it? Tomáš \starttext \startexceptions % nell{a}{}{a'}opera nel{-}{l'}{l'}opera \stopexceptions \start \hsize 10cm nell'opera \par l'operaio \par \stop \start \hsize 01mm nell'opera \par l'operaio \par \stop \stoptext
There's a fourh way ...
\starttext
\startexceptions nell{a}{}{a'}opera \stopexceptions
\start \hsize 10cm nella'opera \par \stop \start \hsize 01mm nella'opera \par \stop
\start \hsize 10cm nell\discretionary{a}{}{'}opera \par \stop \start \hsize 01mm nell\discretionary{a}{}{'}opera \par \stop
\stoptext
Towards my previous post: I know that one can use \hyphenation{l'operaio} for solving the particular word with article. The question is how to fix it generally (i.e. for all words with article) via exceptions or by another way. Tomáš On Tue, Oct 22, 2024 at 06:32:47PM +0200, Tomáš Hála wrote:
Hi Hans,
I have to admit that \startexceptions is new to me, thank you.
nell{a}{}{a'}opera very nicely solves the full word substitution but I do not know how to figure out the hyphenatation case:
Using the exception "nel{-}{l'}{l'}opera" it will change also words with articles where hyphenation is supressed (below). Is there any way how to fix it?
Tomáš
\starttext \startexceptions % nell{a}{}{a'}opera nel{-}{l'}{l'}opera \stopexceptions
\start \hsize 10cm nell'opera \par l'operaio \par \stop \start \hsize 01mm nell'opera \par l'operaio \par \stop
\stoptext
There's a fourh way ...
\starttext
\startexceptions nell{a}{}{a'}opera \stopexceptions
\start \hsize 10cm nella'opera \par \stop \start \hsize 01mm nella'opera \par \stop
\start \hsize 10cm nell\discretionary{a}{}{'}opera \par \stop \start \hsize 01mm nell\discretionary{a}{}{'}opera \par \stop
\stoptext
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________
On 10/22/2024 7:22 PM, Tomáš Hála wrote:
Towards my previous post:
I know that one can use \hyphenation{l'operaio} for solving the particular word with article. The question is how to fix it generally (i.e. for all words with article) via exceptions or by another way.
I'll send you both a file to play with % \enabletrackers[languages.goodies] % \enabletrackers[languages.applied] \setuplanguage[italian][goodies={lang-it-test.llg}] \mainlanguage[italian] \starttext \start \hsize 10cm nella'opera \par \stop \start \hsize 01mm nella'opera \par \stop \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Il 22/10/24 21:22, Hans Hagen via ntg-context ha scritto:
On 10/22/2024 7:22 PM, Tomáš Hála wrote:
Towards my previous post:
I know that one can use \hyphenation{l'operaio} for solving the particular word with article. The question is how to fix it generally (i.e. for all words with article) via exceptions or by another way.
I'll send you both a file to play with
% \enabletrackers[languages.goodies] % \enabletrackers[languages.applied]
\setuplanguage[italian][goodies={lang-it-test.llg}]
\mainlanguage[italian]
\starttext \start \hsize 10cm nella'opera \par \stop \start \hsize 01mm nella'opera \par \stop \stoptext
The test should be: \starttext \start \hsize 10cm nell'opera \par \stop \start \hsize 01mm nell'opera \par \stop \stoptext "nell'opera" is an elision of the last vowel of "nella". At the primary school I've been taught that the apostrophe was a teardrop of the first word, crying for the loss of its last letter (a nice allegory for kids). Normally you'd never transform "nell'opera" back into "nella opera", even when there's a line break. These are usually preferred: nel-l'opera the best one nell'o-pera acceptable but a bit ugly (only one letter between the apostrophe and the hyphen) nell'ope-ra better than the previous one That's because in "nella opera" you have two vowels one next to the other ("a" and "o"), that slow the spelling and make it more uncomfortable. For the same reason sometimes we use an euphonic "d" to "break" the repetition of two vowels (especially when it is the same vowel): 1) "Max va a Milano" ("Max goes to Milan"), no vowel after the "a" ("to") preposition; 2) "Max va ad Aosta", not "Max va a Aosta": (in these case we put a "d", otherwise we should say 3 consecutive "a" vowels) Back to elision and hyphenation, I would resort to "nella opera" only in very particular cases: - to prevent the hyphenation of the last line of a page (especially an odd page); - when all the hyphenations of "nell'opera" (nel-l'o-pe-ra) result in ugly typesettings (e.g. many successive hyphenations, stretched word skips); this happens especially with narrow columns of text; it could be that "nella" at the end of a line, and "opera" at the start of the next one, make the typesetting result more pleasing. Generalizing a rule (you can't) It's hard to generalize a rule, because the elided articulated prepositions ("dell'", "all'", "dall'", "nell'") are the same for masculine and feminine words, but their un-elided versions depend on the gender: "dello", "allo", "dallo", "nello" for masculine, "della", "alla", "dalla", "nella" for feminine. So an algorithm should know the gender of a word, and that makes it impractical. Instead, the elided, indefinite article "un'" is always feminine, and could be automatically un-elided to "una". But, even in this case, I would do it only when the alternative typesettings are really ugly. Here's an example ("un'istanza"): ... una istanza could be preferable to: ... un'i- stanza (a single "i" between an apostrophe and a hyphen is rather ugly), and also to: ... un'istan- za which could also be impractical because "un'istan-" may not fit in the first line. Massi
participants (4)
-
Hans Hagen
-
Hans Hagen
-
mf
-
Tomáš Hála