« Discussion:ConTeXt » : différence entre les versions

Contenu supprimé Contenu ajouté
Ousia (discussion | contributions)
suggestion to end French as language and mutiline linenotes
Ousia (discussion | contributions)
suggestions on mixing languages
Ligne 3 :
[[Utilisateur:Adeimantos|Adeimantos]] ([[Discussion utilisateur:Adeimantos|discussion]]) 27 avril 2016 à 13:13 (CEST)
 
== Critical Apparatus ==
:Sorry for not writing in French. I would have some suggestions to your file:
 
:
:Sorry for not writing in French. I would have some suggestions to your file:
:<source lang="latex">
 
:<source lang="latex">
\mainlanguage[la]% Définition du latin comme langue principale du document.
\setuplayout[header=0cm, footer=0cm]% Paramétrage de la page; ici on a choisi d'enlever l'entête et le pied de page.
Ligne 42 ⟶ 44 :
\stoptext
</source>
 
:
:The suggestions are these ones:
 
:
:* <code>\start\fr</code> should be closed with <code>\stop</code>. Otherwise, all the document will follow French hyphenation rules.
 
:
:* Logos for LaTeX and ConTeXt were introduced.
 
:
:* I introduced a linenote that spans across multiple lines.
 
:
:Just in case it helps, —[[Utilisateur:Ousia|Ousia]] ([[Discussion utilisateur:Ousia|discussion]]) 15 mai 2016 à 16:07 (CEST).
 
== Mixing Languages ==
 
Again, some suggestions when mixing languages. But first of all, the code:
 
<source lang="latex">
\definefallbackfamily [mainface] [serif] [DejaVu Serif] [preset=range:cyrillic, rscale=auto]
\definefallbackfamily [mainface] [serif] [GFS Didot] [preset=range:greek, rscale=auto]
 
\definefontfamily [mainface] [serif] [TeX Gyre Pagella]
\setupbodyfont[mainface]
 
\setuplanguage[fr][patterns={fr,ru,gr}] %one language per script, otherwise it won’t work
\mainlanguage[fr] % mainlanguage should be set, if not US English
 
\starttext
Voyons ce qu'écrit Descartes dans la seconde Méditation Métaphysique :
 
\quotation{Je suppose donc que toutes les choses que je vois sont fausses; je me persuade que rien n'a jamais été de tout ce que ma mémoire remplie de mensonges me représente; je pense n'avoir aucun sens; je crois que le corps, la figure, l'étendue, le mouvement et le lieu ne sont que des fictions de mon esprit. Qu'est-ce donc qui pourra être estimé véritable ? Peut-être rien autre chose, sinon qu'il n'y a rien au monde de certain}.
 
F. Nietzsche semble avoir repéré une difficulté concernant l'usage général de la notion de vertu :
 
{\de\quotation{Ach, wie übel ihnen das Wort »Tugend« aus dem Munde läuft! Und wenn sie sagen: »ich bin gerecht,« so klingt es immer gleich wie: »ich bin gerächt!«}}
% setting German is required in the previous paragraph, otherwise it would be considered French
% since the next two paragraphs contain languages that use different scripts, mixing hyphenation patterns is fine
% it would be problematic mixing Russian and Ukranian, or ancient Greek with contemporary monotonic Greek
 
Une phrase en russe : Традиционная систематика лишайников оказывается во многом условна и
 
Écoutons ce que dit Platon dans son Apologie de Socrate :
\quotation{Ὅτι μὲν ὑμεῖς, ὦ ἄνδρες Ἀθηναῖοι,
πεπόνθατε ὑπὸ τῶν ἐμῶν κατηγόρων,
οὐκ οἶδα· ἐγὼ δ' οὖν καὶ αὐτὸς ὑπ'
αὐτῶν ὀλίγου ἐμαυτοῦ ἐπελαθόμην,
οὕτω πιθανῶς ἔλεγον}.
 
\stoptext
</source>
 
* You may load multiple hyphenation patters when setting up a language. But the golden rule is ''one language per script''. When you mix German and French patterns, ConTeXt won’t be able to know when a word is German or French.
 
* So, you have to mark the German passage in the text.
 
* After setting up French, you should load it as the main language. Otherwise, Russian and Greek texts won’t be hyphenated at all. US English is the language that comes by default with TeX.
 
* Although it is a question of personal taste, I guess [http://www.greekfontsociety.gr/typefaces GFS Didot] matches far better the Latin glyphs from TeX Gyre Pagella than DejaVu Serif.
 
* BTW, <code>force=yes</code> is the default. And there are presets for some scripts in font fallback.
 
I hope it helps, [[Utilisateur:Ousia|Ousia]] ([[Discussion utilisateur:Ousia|discussion]]) 15 mai 2016 à 16:48 (CEST).
Revenir à la page « ConTeXt ».