issue189:latex
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue189:latex [2023/02/07 20:07] – [paragraphe 06] darkjam | issue189:latex [2023/02/11 17:45] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== paragraphe 01 ====== | + | **Last issue, we made a one page poster advertising a lost dog. Of course the subject matter for a poster could be anything you wish. The poster got us started into an exploration of font use in Latex / Tex. Before we start, there are at least two guides you might wish to look at if this topic interests you. The first is more recent: LATEX 2ε Font Selection, compiled by the Latex Project Team (2021 March). The second is LATEX Font Encodings by Frank Mittelbach, Robin Fairbairns, and Werner Lemberg (2016 February). Because they deal with the same topic, there is some duplication of contents of course. ** |
- | Last issue, we made a one page poster advertising a lost dog. Of course the subject matter for a poster could be anything you wish. The poster got us started into an exploration of font use in Latex / Tex. Before we start, there are at least two guides | + | La dernière fois, nous avons fait une affiche « Animal perdu ». Bien entendu, le sujet de cette affiche peut être ce que vous voulez. Cette affiche était pour nous le moyen d’appréhender l' |
- | La dernière fois, nous avons fait une affiche " | + | **While pointing you to references, I should also point out The Tex Book by Donald Knuth is also available for download. It is a tex file, a large tex file, so you can open it in any text editor and examine the coding required to make this particular book. You can also compile it into a PDF (with TexStudio or whichever environment you use). If you download it, you are not allowed to distribute it or sell it. Printed copies are available through the usual sources.** |
- | ====== paragraphe 02 ====== | + | |
- | While pointing you to references, I should also point out The Tex Book by Donald Knuth is also available for download. It is a tex file, a large tex file, so you can open it in any text editor and examine the coding required to make this particular book. You can also compile it into a PDF (with TexStudio or whichever environment you use). If you download it, you are not allowed to distribute it or sell it. Printed copies are available through the usual sources. | + | |
- | Puisque nous en sommes aux références, | + | Puisque nous en sommes aux références, |
- | ====== paragraphe 03 ====== | + | **As mentioned last time, there is a series of keywords which indicate the ten default sizes for fonts. Depending on the size of the base font selected (10pt, 11pt, 12pt), the keyword sizes increase from about 5pt to almost 25pt. We used the \selectfont command to change the existing font to a new one. (Note: Although not technically correct, I will use font and typeface to mean the same thing in this article.) If you make a change in the code, but do not use \selectfont where you want the change to occur, the change will not be visible.** |
- | As mentioned last time, there is a series of keywords which indicate the ten default sizes for fonts. Depending on the size of the base font selected (10pt, 11pt, 12pt), the keyword sizes increase from about 5pt to almost 25pt. We used the \selectfont command to change the existing font to a new one. (Note: Although not technically correct, I will use font and typeface to mean the same thing in this article.) If you make a change in the code, but do not use \selectfont where you want the change to occur, the change will not be visible. | + | |
- | Comme mentionné la dernière fois, il y a une série de 10 mots clés indiquant les tailles par défaut. | + | Comme mentionné la dernière fois, il y a une série de 10 mots clés indiquant les tailles |
- | ====== paragraphe 04 ====== | + | **There are six commands which can be used to change the appearance of the text: fontencoding {⟨encoding⟩}, |
- | There are six commands which can be used to change the appearance of the text: fontencoding {⟨encoding⟩}, | + | |
+ | Il y a six commandes qui peuvent être utilisées pour changer l' | ||
- | Il y a six commandes qui peuvent être utilisés pour changer apparence du texte : fontencoding {⟨encodage⟩}, | ||
- | ====== paragraphe 05 ====== | ||
There are far too many font families to list. If you have done any HTML-CSS coding, you will be familiar with some font families. Word processors often use the term “font name” as a substitute for the font family. Then word processors use buttons or menus to set the series and shape. In Latex / Tex, a chosen series refers to the one of ten weights, and one of ten widths, of the font (Bold, Condensed, Light, etc.) Shape refers to normal, italic, small caps, and five others. Font size must be specified separately with the fontsize command if it is to be different from the default. Different measuring units can be used. If no unit is specified, then point (pt) is assumed. | There are far too many font families to list. If you have done any HTML-CSS coding, you will be familiar with some font families. Word processors often use the term “font name” as a substitute for the font family. Then word processors use buttons or menus to set the series and shape. In Latex / Tex, a chosen series refers to the one of ten weights, and one of ten widths, of the font (Bold, Condensed, Light, etc.) Shape refers to normal, italic, small caps, and five others. Font size must be specified separately with the fontsize command if it is to be different from the default. Different measuring units can be used. If no unit is specified, then point (pt) is assumed. | ||
- | l y a beaucoup trop de familles de polices à lister. Si vous avez fait de la programmation HTML-CSS, vous serez familier avec certaines familles de polices. Les traitements de texte utilisent souvent le terme « nom de police » pour remplacer la famille de polices. Ensuite, les traitements de texte utilisent des boutons ou des menus pour définir la série et la forme. Dans Latex / Tex, une série choisie se réfère à l’un des dix poids, et l’un des dix largeurs, de la police (Gras, Condensé, Lumière, etc.) Forme se réfère à la normale, italique, petites majuscules, et cinq autres. La taille de police doit être spécifiée séparément avec la commande fontsize si elle doit être différente de la valeur par défaut. Différentes unités de mesure peuvent être utilisées. Si aucune unité n’est spécifiée, | + | |
+ | Il y a beaucoup trop de familles de polices à lister. Si vous avez fait de la programmation HTML-CSS, vous serez familier avec certaines familles de polices. Les traitements de texte utilisent souvent le terme « nom de police » pour remplacer la famille de polices. Ensuite, les traitements de texte utilisent des boutons ou des menus pour définir la série et la forme. Dans LaTeX/Tex, une série choisie se réfère à l’un des dix poids, et l’une des dix largeurs, de la police (Gras, Condensé, Lumière, etc.) Forme se réfère à la normale, italique, petites majuscules, et cinq autres. La taille de police doit être spécifiée séparément avec la commande fontsize si elle doit être différente de la valeur par défaut. Différentes unités de mesure peuvent être utilisées. Si aucune unité n’est spécifiée, | ||
- | \paragraph*{} The quick fox jumped over the lazy yellow dog. | + | **\paragraph*{} The quick fox jumped over the lazy yellow dog. |
\paragraph*{}\fontfamily{cmtt}\selectfont The quick fox jumped over the lazy yellow dog. | \paragraph*{}\fontfamily{cmtt}\selectfont The quick fox jumped over the lazy yellow dog. | ||
\paragraph*{}\fontfamily{phv}\selectfont The quick fox jumped over the lazy yellow dog. | \paragraph*{}\fontfamily{phv}\selectfont The quick fox jumped over the lazy yellow dog. | ||
Ligne 29: | Ligne 26: | ||
This code produces: | This code produces: | ||
- | The \paragraph*{} code gives more space between lines of text than two presses of < | + | The \paragraph*{} code gives more space between lines of text than two presses of < |
- | \paragraph*{} donne plus d’espace entre les lignes de texte que deux pressions sur < | ||
- | ====== paragraphe 06 ====== | ||
- | As usual with Latex, there are other ways to vary fonts. The next method is suggested for small sections of text although it could be used for any quantity of text. There are at least nine additions to the \text command. All enclose the text to be modified in curly braces. The general form of the command is \text\_\_{modified text here}. When used, the underscore is replaced by two letters which indicate the desired effect. The two-letter codes try to indicate what the effect is. [Note: Not all fonts will have the appropriate letter set for the change.] | ||
+ | \paragraph*{} The quick fox jumped over the lazy yellow dog. | ||
+ | \paragraph*{}\fontfamily{cmtt}\selectfont The quick fox jumped over the lazy yellow dog. | ||
+ | \paragraph*{}\fontfamily{phv}\selectfont The quick fox jumped over the lazy yellow dog. | ||
- | Comme d’habitude avec Latex, il existe d’autres façons de varier les polices. La méthode suivante est suggérée pour les petites sections de texte bien qu’elle puisse être utilisée pour n’importe quelle quantité de texte. Il y a au moins neuf ajouts à la commande \text. Tous contiennent le texte à modifier en accolades. La forme générale de la commande est \text__{texte modifié ici}. Lorsqu’il est utilisé, le underscore est remplacé par deux lettres qui indiquent l’effet désiré. Les codes à deux lettres essaient d’indiquer quel est l’effet. [Remarque : | + | Ce code produit : |
- | On my machine with the default font, UC did nothing and lf generated an error. | + | |
+ | \paragraph*{} donne plus d’espace entre les lignes de texte que deux appuis sur < | ||
+ | |||
+ | **As usual with Latex, there are other ways to vary fonts. The next method is suggested for small sections of text although it could be used for any quantity of text. There are at least nine additions to the \text command. All enclose the text to be modified in curly braces. The general form of the command is \text\_\_{modified text here}. When used, the underscore is replaced by two letters which indicate the desired effect. The two-letter codes try to indicate what the effect is. [Note: Not all fonts will have the appropriate letter set for the change.]** | ||
+ | |||
+ | |||
+ | Comme d’habitude avec LaTeX, il existe d’autres façons de varier les polices. La méthode suivante est suggérée pour les petites sections de texte bien qu’elle puisse être utilisée pour n’importe quelle quantité de texte. Il y a au moins neuf ajouts à la commande \text. Tous contiennent le texte à modifier entre accolades. La forme générale de la commande est \text\__\_{texte modifié ici}. Lorsqu’il est utilisé, le soulignement est remplacé par deux lettres qui indiquent l’effet désiré. Les codes à deux lettres essaient d’indiquer ce qu'est l’effet. [Remarque : | ||
+ | |||
+ | **On my machine with the default font, UC did nothing and lf generated an error. | ||
Sur ma machine avec la police par défaut, UC n’a rien fait et lf a généré une erreur. | Sur ma machine avec la police par défaut, UC n’a rien fait et lf a généré une erreur. | ||
- | ====== paragraphe 07 ====== | + | |
- | It is possible to nest the codes to get various combinations. For example, some people like to use bold and italic together. In Latex that means: | + | **It is possible to nest the codes to get various combinations. For example, some people like to use bold and italic together. In Latex that means: |
• writing the first code ending with curly braces | • writing the first code ending with curly braces | ||
• writing the second code inside the first set of curly braces | • writing the second code inside the first set of curly braces | ||
• writing the text inside the inside curly braces | • writing the text inside the inside curly braces | ||
- | \textbf{\textit{The quick fox jumped over the lazy yellow dog}} | + | \textbf{\textit{The quick fox jumped over the lazy yellow dog}}** |
- | Il est possible d’imbriquer les codes pour obtenir diverses combinaisons. Par exemple, certaines personnes aiment utiliser les caractères gras et italiques ensemble. En Latex cela signifie : | + | Il est possible d’imbriquer les codes pour obtenir diverses combinaisons. Par exemple, certaines personnes aiment utiliser les caractères gras et italiques ensemble. En LaTeX cela signifie : |
- | * écrire | + | * écrire |
* écrire le deuxième code dans le premier ensemble d’accolades | * écrire le deuxième code dans le premier ensemble d’accolades | ||
- | * écrire le texte à l’intérieur des accolades | + | * écrire le texte à l’intérieur des accolades à l'intérieur des accolades |
\textbf{\textit{The quick fox jumped over the lazy yellow dog}} | \textbf{\textit{The quick fox jumped over the lazy yellow dog}} | ||
- | Here is the code and result: | + | **Here is the code and result: |
\paragraph*{}\textit{The quick fox jumped over the lazy yellow dog.} | \paragraph*{}\textit{The quick fox jumped over the lazy yellow dog.} | ||
\paragraph*{}\texttt{The quick fox jumped over the lazy yellow dog.} | \paragraph*{}\texttt{The quick fox jumped over the lazy yellow dog.} | ||
\paragraph*{}\textbf{The quick fox jumped over the lazy yellow dog.} | \paragraph*{}\textbf{The quick fox jumped over the lazy yellow dog.} | ||
- | \paragraph*{}\textbf{\textit{The quick fox jumped over the lazy yellow dog}} | + | \paragraph*{}\textbf{\textit{The quick fox jumped over the lazy yellow dog}}** |
Voici le code et le résultat : | Voici le code et le résultat : | ||
Ligne 65: | Ligne 70: | ||
\paragraph*{}\textbf{The quick fox jumped over the lazy yellow dog.} | \paragraph*{}\textbf{The quick fox jumped over the lazy yellow dog.} | ||
\paragraph*{}\textbf{\textit{The quick fox jumped over the lazy yellow dog}} | \paragraph*{}\textbf{\textit{The quick fox jumped over the lazy yellow dog}} | ||
- | ====== paragraphe 08 ====== | ||
- | It is possible to use three of the same two-letter abbreviations with another command to achieve similar results: \rmfamily, \sffamily, \ttfamily. A space is required between the command and the start of the text. Do not use curly braces around the text. I assume you can handle this code on your own. | ||
- | If you are eager to explore using different fonts in Latex, I suggest you start at tug.org/ | + | **It is possible |
- | And here is what is needed for the preamble in order to change the default typeface in this document to Tex Gyre Adventor. (This is a sans serif typeface derived from the URW Gothic family.) | + | Il est possible d’utiliser trois des mêmes abréviations de deux lettres avec une autre commande pour obtenir des résultats similaires : |
+ | |||
+ | **If you are eager to explore using different fonts in Latex, I suggest you start at tug.org/ | ||
+ | |||
+ | Si vous désirez explorer l’utilisation de différentes polices dans LaTeX, je vous suggère de commencer par tug.org/ | ||
+ | |||
+ | **And here is what is needed for the preamble in order to change the default typeface in this document to Tex Gyre Adventor. (This is a sans serif typeface derived from the URW Gothic family.)** | ||
+ | |||
+ | Et voici ce qui est nécessaire pour le préambule afin de changer la police par défaut dans ce document en Tex Gyre Adventor. (Cela est une police sans serif dérivée de la famille URW Gothic.) | ||
+ | |||
+ | **\usepackage{tgadventor} | ||
+ | \renewcommand*\familydefault{\sfdefault} | ||
+ | \usepackage[T1]{fontenc}** | ||
\usepackage{tgadventor} | \usepackage{tgadventor} | ||
Ligne 76: | Ligne 91: | ||
\usepackage[T1]{fontenc} | \usepackage[T1]{fontenc} | ||
- | ====== paragraphe 09 ====== | + | **Fonts are usually installed in / |
- | Fonts are usually installed in / | + | |
+ | Les polices sont généralement installées dans / |
issue189/latex.1675796823.txt.gz · Dernière modification : 2023/02/07 20:07 de darkjam