issue214: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 | ||
| issue214:latex [2025/03/02 09:31] – d52fr | issue214:latex [2025/03/06 10:16] (Version actuelle) – andre_domenech | ||
|---|---|---|---|
| Ligne 3: | Ligne 3: | ||
| Typesetting instructions always start with a backslash followed by a keyword. The keyword may have options which are surrounded by square brackets and/or content which is surrounded by curly brackets. Latex is a document production system which uses Tex as its base. It may be the most popular document production system based on Tex but there are others including PdfTex, XeTex, and Luatex. Each system has its own supporters, its own strengths and weaknesses. Some macros (packages) are usable in only one or more systems, some macros work in all.** | Typesetting instructions always start with a backslash followed by a keyword. The keyword may have options which are surrounded by square brackets and/or content which is surrounded by curly brackets. Latex is a document production system which uses Tex as its base. It may be the most popular document production system based on Tex but there are others including PdfTex, XeTex, and Luatex. Each system has its own supporters, its own strengths and weaknesses. Some macros (packages) are usable in only one or more systems, some macros work in all.** | ||
| + | Nous allons à nouveau nous aventurer dans le monde de LaTeX. Pour ceux qui ne connaissent pas cette série, dans chaque numéro, j' | ||
| - | **This time, we will explore a few more of the many packages available at ctan.org. (CTAN is the Comprehensive | + | Les instructions de composition commencent toujours par une barre oblique inverse suivie d'un mot-clé. Le mot-clé peut avoir des options entourées de crochets et/ou un contenu entouré d' | 
| + | |||
| + | |||
| + | **This time, we will explore a few more of the many packages available at ctan.org. (CTAN is the Comprehensive | ||
| I have worked my way through the alphabetical list of topics to “F”. The number of packages that start with F is enormous. I picked just a few for this issue. The first one I will explore this time is fancyhdr, developed in 1994 and last revised in 2025 January. The user manual is 131 pages in English, it is also available in Italian. There are “training slides” available in German. It is discussed in vol 1 of The Latex Companion. Instructions for users are on the first 85 pages of the manual, the remaining pages cover implementation and change logs. This seems like a lot of information about headers and footers, document features most of us take for granted or ignore. To use the fancyhdr package issue these two commands: | I have worked my way through the alphabetical list of topics to “F”. The number of packages that start with F is enormous. I picked just a few for this issue. The first one I will explore this time is fancyhdr, developed in 1994 and last revised in 2025 January. The user manual is 131 pages in English, it is also available in Italian. There are “training slides” available in German. It is discussed in vol 1 of The Latex Companion. Instructions for users are on the first 85 pages of the manual, the remaining pages cover implementation and change logs. This seems like a lot of information about headers and footers, document features most of us take for granted or ignore. To use the fancyhdr package issue these two commands: | ||
| Ligne 31: | Ligne 35: | ||
| \lipsum[1-4]** | \lipsum[1-4]** | ||
| + | |||
| + | Cette fois-ci, nous allons explorer quelques-uns des nombreux paquets disponibles sur ctan.org. (CTAN est le Comprehensive TeX Archive Network.) CTAN est également la base Web du groupe international TUG : TeX Users Group. J' | ||
| + | |||
| + | J'ai parcouru la liste alphabétique des sujets jusqu' | ||
| + | |||
| + | \usepackage[options]{fancyhdr} | ||
| + | |||
| + | \pagestyle{fancy} | ||
| + | |||
| + | Il existe de nombreuses commandes qui font partie du paquet fancyhdr ; elles peuvent être saisies dans le préambule du document, avant la commande begin{document}. Certaines peuvent également être saisies dans le corps du document. Lisez et utilisez les exemples de la documentation. Voici le code de la première image (page suivante, en haut à gauche). | ||
| + | |||
| + | \usepackage{fancyhdr} | ||
| + | |||
| + | \pagestyle{fancy} | ||
| + | |||
| + | \usepackage{lipsum} % insère des paragraphes de texte sans signification | ||
| + | |||
| + | \fancyhead[L]{En-tête gauche} % Majuscules ou minuscules et texte pour l' | ||
| + | |||
| + | \fancyhead[R]{En-tête droit} | ||
| + | |||
| + | \pagenumbering{arabic} % quatre autres options disponibles | ||
| + | |||
| + | \fancyfoot[c]{page \thepage} % thepage désigne la page actuelle | ||
| + | |||
| + | \begin{document} | ||
| + | |||
| + | \lipsum[1-4] | ||
| + | |||
| **The next package I will take a look at is fancypar, offering five predefined decorative styles for text paragraphs according to the documentation. Again, I encourage you to read the documentation. (This manual is only 19 pages, with lots of example code and images of results.) Here is the code for the second graphic (top right): | **The next package I will take a look at is fancypar, offering five predefined decorative styles for text paragraphs according to the documentation. Again, I encourage you to read the documentation. (This manual is only 19 pages, with lots of example code and images of results.) Here is the code for the second graphic (top right): | ||
| Ligne 47: | Ligne 80: | ||
| I dropped the paragraph text out of the code because it is just sample text. You can see the results in an image. This package allows for great customization. Be warned, if you use a color name that is not recognized, the color defaults to black. If you want more (much more) information about supported color schemes and color models, read the documentation for the xcolor package.** | I dropped the paragraph text out of the code because it is just sample text. You can see the results in an image. This package allows for great customization. Be warned, if you use a color name that is not recognized, the color defaults to black. If you want more (much more) information about supported color schemes and color models, read the documentation for the xcolor package.** | ||
| + | |||
| + | Le prochain paquet que je vais examiner est fancypar, qui propose, d' | ||
| + | |||
| + | \usepackage[x11names]{xcolor} | ||
| + | |||
| + | \usepackage[linecolor=Chocolate1!100!white!80]{fancypar} | ||
| + | |||
| + | \usepackage{lipsum} | ||
| + | |||
| + | \begin{document} | ||
| + | \NotebookPar{This time we will play ...} | ||
| + | \fancyparsetup{spiral=false, | ||
| + | |||
| + | \NotebookPar{This time we will play ...} | ||
| + | |||
| + | J'ai supprimé le texte du paragraphe du code car il s'agit simplement d'un exemple de texte. Vous pouvez voir les résultats dans l' | ||
| + | |||
| **Next, I will work with a package that could be useful for people who need assistance with layout and positioning. It is called fgruler (foreground ruler), and it puts a rule on a selected page, or all pages, at a fixed position. It can be loaded either with | **Next, I will work with a package that could be useful for people who need assistance with layout and positioning. It is called fgruler (foreground ruler), and it puts a rule on a selected page, or all pages, at a fixed position. It can be loaded either with | ||
| Ligne 67: | Ligne 117: | ||
| Fgruler can also be used to insert a ruler into the text with the \ruler command with its three options as shown in the code below. Again, there are a significant number of possibilities for the position, direction, length, color and style of the inserted ruler.** | Fgruler can also be used to insert a ruler into the text with the \ruler command with its three options as shown in the code below. Again, there are a significant number of possibilities for the position, direction, length, color and style of the inserted ruler.** | ||
| + | |||
| + | Ensuite, je vais travailler avec un paquet qui pourrait être utile pour les personnes qui ont besoin d'aide pour la mise en page et le positionnement. Il s' | ||
| + | |||
| + | usepackage[options]{fgruler} | ||
| + | |||
| + | ou | ||
| + | |||
| + | \usepackage{fgruler} | ||
| + | |||
| + | \setfgruler{package options} | ||
| + | |||
| + | La commande setfgruler peut également être utilisée dans le corps d'un document. Les options incluent | ||
| + | |||
| + | unit=cm (règle métrique – par défaut) ou unit=in (pouces) | ||
| + | |||
| + | type=upperleft, | ||
| + | |||
| + | Dix autres paires option=valeur sont disponibles. La plupart des options ont plusieurs valeurs qui leur sont associées. | ||
| + | |||
| + | Fgruler peut également être utilisé pour insérer une règle dans le texte avec la commande \ruler avec ses trois options comme indiqué dans le code ci-après (page suivante). Là encore, il existe un nombre important de possibilités pour la position, la direction, la longueur, la couleur et le style de la règle insérée. | ||
| + | |||
| **The documentation is among the best I have read so far for a Latex package. There are lots of snippets of code and the corresponding examples. There are no pages in the documentation which describe the various behind-the-scenes commands used to make this package. Instead, there are seven pages of examples and illustrations followed by 28 individual pages with 28 sets of commands and results. | **The documentation is among the best I have read so far for a Latex package. There are lots of snippets of code and the corresponding examples. There are no pages in the documentation which describe the various behind-the-scenes commands used to make this package. Instead, there are seven pages of examples and illustrations followed by 28 individual pages with 28 sets of commands and results. | ||
| Ligne 84: | Ligne 155: | ||
| I spent a short time with the fncychap package. It has seven predefined styles for chapter level headings. In addition, the user can also modify the existing styles or generate new ones with the information available in the documentation. What is not mentioned but which should be obvious is the chapter level heading is available in the document class “book”, not in document class “article”. The book document class defaults to two-sided printing which brings its own benefits and costs.** | I spent a short time with the fncychap package. It has seven predefined styles for chapter level headings. In addition, the user can also modify the existing styles or generate new ones with the information available in the documentation. What is not mentioned but which should be obvious is the chapter level heading is available in the document class “book”, not in document class “article”. The book document class defaults to two-sided printing which brings its own benefits and costs.** | ||
| + | |||
| + | La documentation est parmi les meilleures que j'ai lues jusqu' | ||
| + | |||
| + | Voici le code. Là encore, j'ai supprimé la majeure partie du texte pour gagner de la place. (illustré ci-dessus) | ||
| + | |||
| + | \usepackage[x11names]{xcolor} %Obligatoire si vous souhaitez des couleurs autres que le noir | ||
| + | |||
| + | \usepackage{fgruler} | ||
| + | |||
| + | \begin{document} | ||
| + | \setfgruler{unit=cm, | ||
| + | |||
| + | Cette fois-ci, nous allons jouer avec... | ||
| + | |||
| + | \ruler[cm]{rightdown}{10cm} %Insère une règle dans le texte sur une longueur de 10 cm. | ||
| + | |||
| + | J'ai passé un peu de temps avec le paquet fncychap. Il dispose de sept styles prédéfinis pour les titres au niveau des chapitres. De plus, l' | ||
| + | |||
| **I wanted to generate labels using Latex. The flabels package initially was attractive. However it is designed to generate a specific label for the spines of A4-sized binders. So I looked for some other package to demonstrate. Since I worked as a teacher and continue to do volunteer teaching, I chose the fancyhandout package. | **I wanted to generate labels using Latex. The flabels package initially was attractive. However it is designed to generate a specific label for the spines of A4-sized binders. So I looked for some other package to demonstrate. Since I worked as a teacher and continue to do volunteer teaching, I chose the fancyhandout package. | ||
| Ligne 92: | Ligne 181: | ||
| Because my system has a limited number of F packages, I have decided to look at how to install new packages to an existing Latex system in the next issue. Hope you can join me for that important topic.** | Because my system has a limited number of F packages, I have decided to look at how to install new packages to an existing Latex system in the next issue. Hope you can join me for that important topic.** | ||
| + | |||
| + | Je voulais générer des étiquettes en utilisant LaTeX. Le paquet flabels était initialement intéressant. Cependant, il est conçu pour générer une étiquette spécifique pour les dos de classeurs de format A4. J'ai donc cherché un autre paquet à démontrer. Comme je travaille comme enseignant et que je continue à faire de l' | ||
| + | |||
| + | Fancyhandout crée une nouvelle classe de document. Il utilise trois niveaux de titres, section, sous-section et sous-sous-section, | ||
| + | |||
| + | Voici (page précédente, | ||
| + | |||
| + | Comme mon système dispose d'un nombre limité de paquets F, j'ai décidé d' | ||
issue214/latex.1740904290.txt.gz · Dernière modification : 2025/03/02 09:31 de d52fr
                
                