issue190: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 | ||
issue190:latex [2023/03/01 11:39] – d52fr | issue190:latex [2023/03/01 16:47] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 5: | Ligne 5: | ||
**There are seventeen pieces of information about using Latex. (This one makes eighteen.) Assume we want to put all of them together to make a small book, a quick introduction to some of the major features of Latex. At two or three pages each, we should generate a PDF of about fifty to sixty pages. This is a task that Latex is much better at than word processors. I have written a few books using word processors. I wish I had known Latex at the time. If you wish to write several chapters, there are two obvious ways to do that in a word processor. The first is to put all of your work in one large file. That gets very unwieldy to navigate and will get painfully slow to edit, especially if your work includes anything other than text. Any graphics or tables will slow down editing work.** | **There are seventeen pieces of information about using Latex. (This one makes eighteen.) Assume we want to put all of them together to make a small book, a quick introduction to some of the major features of Latex. At two or three pages each, we should generate a PDF of about fifty to sixty pages. This is a task that Latex is much better at than word processors. I have written a few books using word processors. I wish I had known Latex at the time. If you wish to write several chapters, there are two obvious ways to do that in a word processor. The first is to put all of your work in one large file. That gets very unwieldy to navigate and will get painfully slow to edit, especially if your work includes anything other than text. Any graphics or tables will slow down editing work.** | ||
- | Il y a dix-sept | + | Il y a dix-sept |
**The second way is to put each chapter or each section in its own file. If you do that, keeping page numbering consistent and correct is a major chore. If you use Styles in a word processor (which you should), keeping the styles consistent from chapter to chapter can be painful. I know the major word processors have something like a “master document” that will pull all the individual files together. My experience is the master document method combines the weaknesses of both of the above methods, without generating any significant benefits. If you write a text and require references, endnotes, etc., these are difficult to manage with word processors' | **The second way is to put each chapter or each section in its own file. If you do that, keeping page numbering consistent and correct is a major chore. If you use Styles in a word processor (which you should), keeping the styles consistent from chapter to chapter can be painful. I know the major word processors have something like a “master document” that will pull all the individual files together. My experience is the master document method combines the weaknesses of both of the above methods, without generating any significant benefits. If you write a text and require references, endnotes, etc., these are difficult to manage with word processors' | ||
- | La deuxième façon est de mettre chaque chapitre ou chaque section dans son propre dossier. Si vous faites cela, garder la numérotation des pages cohérente et correcte est une corvée majeure. Si vous utilisez des styles dans un traitement de texte (ce que vous devriez), garder les styles cohérents d’un chapitre à l’autre peut être douloureux. Je sais que les grands spécialistes du traitement de texte ont quelque chose comme un « document principal » qui regroupe tous les dossiers individuels. Mon expérience est que la méthode de document maître combine les faiblesses des deux méthodes ci-dessus, sans générer d’avantages significatifs. Si vous écrivez un texte et que vous avez besoin de références, | + | La deuxième façon est de mettre chaque chapitre ou chaque section dans son propre dossier. Si vous faites cela, garder la numérotation des pages cohérente et correcte est une corvée majeure. Si vous utilisez des styles dans un traitement de texte (ce que vous devriez |
**Latex uses what is a master document approach. Unlike word processors it works. You will learn how it works if you follow along with what I do this time.** | **Latex uses what is a master document approach. Unlike word processors it works. You will learn how it works if you follow along with what I do this time.** | ||
- | LaTeX utilise ce qui est une approche de document maître. Contrairement aux traitements de texte, elle fonctionne. Vous apprendrez comment | + | LaTeX utilise ce qui est une approche de document maître. Contrairement aux traitements de texte, elle fonctionne. Vous apprendrez comment |
**Obviously what I do in this article will not generate a fifty page PDF. However I hope you will learn the techniques needed to build multiple chapter (section) output using Latex.** | **Obviously what I do in this article will not generate a fifty page PDF. However I hope you will learn the techniques needed to build multiple chapter (section) output using Latex.** | ||
- | Évidemment ce que je fais dans cet article ne génèrera | + | Évidemment ce que je fais dans cet article ne générera |
**To start with, we will need at least some of the eighteen articles from the previous issues. What is needed is each article in plain text, in an ASCII file which is what tex files are. Since some of the articles include graphics, it would be best to have each article in its own folder. The “root” file will be called latexbk.tex, | **To start with, we will need at least some of the eighteen articles from the previous issues. What is needed is each article in plain text, in an ASCII file which is what tex files are. Since some of the articles include graphics, it would be best to have each article in its own folder. The “root” file will be called latexbk.tex, | ||
- | Pour commencer, nous aurons besoin d’au moins quelques-uns des dix-huit articles des numéros précédents. Il est nécessaire d' | + | Pour commencer, nous aurons besoin d’au moins quelques-uns des dix-huit articles des numéros précédents. Il est nécessaire d' |
**... and so on, for all seventeen of the articles that Eric and I have written. Of course we expect to write more about Latex in the future. Whatever method used to put all of the code from the seventeen articles into one document needs to accept a monthly addition. As it turns out, Latex makes combining “chapters” into a “book” a very simple job.** | **... and so on, for all seventeen of the articles that Eric and I have written. Of course we expect to write more about Latex in the future. Whatever method used to put all of the code from the seventeen articles into one document needs to accept a monthly addition. As it turns out, Latex makes combining “chapters” into a “book” a very simple job.** | ||
- | … et ainsi de suite, pour les dix-sept articles qu’Eric et moi avons écrits. Bien sûr, nous nous attendons à en écrire davantage sur le LaTeX à l’avenir. Quelle que soit la méthode utilisée pour mettre tout le code des dix-sept articles dans un document, celle-ci doit accepter un ajout mensuel. Il s’avère que LaTeX fait de la combinaison | + | ...et ainsi de suite, pour les dix-sept articles qu’Eric et moi avons écrits. Bien sûr, nous nous attendons à en écrire davantage sur le LaTeX à l’avenir. Quelle que soit la méthode utilisée pour mettre tout le code des dix-sept articles dans un seul document, celle-ci doit accepter un ajout mensuel. Il s’avère que LaTeX fait de l' |
**Note I have copied only the Latex document code from these two articles. I did that to keep this article a reasonable size. Any tex file or any plain text file that can be converted to a tex file can easily be included in a larger document.** | **Note I have copied only the Latex document code from these two articles. I did that to keep this article a reasonable size. Any tex file or any plain text file that can be converted to a tex file can easily be included in a larger document.** | ||
- | Notez que j’ai copié seulement le code de document de LaTeX de ces deux articles. J’ai fait cela pour garder | + | Notez que j’ai copié seulement le code de document de LaTeX de ces deux articles. J’ai fait cela pour que la taille de cet article |
**There are two tasks we need to do to generate a large document from several small ones, while still maintaining the small ones as independent files. The first step is to make a “master” file. The second is to remove all the elements from the individual files that make them independent files. Neither task is difficult. However the second step will be repetitious since it has to be done on every small file.** | **There are two tasks we need to do to generate a large document from several small ones, while still maintaining the small ones as independent files. The first step is to make a “master” file. The second is to remove all the elements from the individual files that make them independent files. Neither task is difficult. However the second step will be repetitious since it has to be done on every small file.** | ||
- | Il y a deux tâches que nous devons faire pour générer un grand document à partir de plusieurs petits, tout en maintenant | + | Il y a deux tâches que nous devons faire pour générer un grand document à partir de plusieurs petits, tout en gardant |
**The master file contains the overall instructions for the book. It has everything from \documentclass[]{} down to \begindocument{} and it also has the \enddocument{} code. ** | **The master file contains the overall instructions for the book. It has everything from \documentclass[]{} down to \begindocument{} and it also has the \enddocument{} code. ** | ||
Ligne 55: | Ligne 55: | ||
\end{document} | \end{document} | ||
- | Lorsque nous aurons terminé, il contiendra également toutes les instructions \usepackage | + | Lorsque nous aurons terminé, il contiendra également toutes les instructions \usepackage |
**\documentclass[letterpaper, | **\documentclass[letterpaper, | ||
Ligne 85: | Ligne 85: | ||
\mainmatter (optional) | \mainmatter (optional) | ||
- | Note : Si vous copiez et collez ce code dans votre IDE Latex, supprimez les éléments entre parenthèses (crochets ronds) ou commentez toutes les lignes qui ont des parenthèses ou vous aurez des erreurs lors de la compilation. | + | Note : Si vous copiez et collez ce code dans votre IDE LaTeX, supprimez les éléments entre parenthèses (crochets ronds), ou commentez toutes les lignes qui ont des parenthèses, ou vous aurez des erreurs lors de la compilation. |
**A series of “include” statements replace the text which would appear in any regular Tex document.** | **A series of “include” statements replace the text which would appear in any regular Tex document.** | ||
- | Une série « \include » remplace le texte qui apparaîtrait dans tout document | + | Une série « \include » remplace le texte qui apparaîtrait dans tout document |
**\include{fcm167} | **\include{fcm167} | ||
Ligne 105: | Ligne 105: | ||
\include{fcm167/ | \include{fcm167/ | ||
- | Ajoutez autant de déclarations d’inclusion que nécessaire pour que votre livre soit complet. Si vous avez besoin d’une table des matières, index, glossaire pour votre livre, mettez ces instructions après la dernière déclaration d’inclusion. Fermez ensuite le fichier. | + | Ajoutez autant de déclarations d’inclusion que nécessaire pour que votre livre soit complet. Si vous avez besoin d’une table des matières, index ou glossaire pour votre livre, mettez ces instructions après la dernière déclaration d’inclusion. Fermez ensuite le fichier. |
**\backmatter | **\backmatter | ||
Ligne 121: | Ligne 121: | ||
\end{document} | \end{document} | ||
- | Si vous compilez votre livre maintenant, vous obtiendrez au moins une erreur majeure. | + | Si vous compilez votre livre maintenant, vous obtiendrez au moins une erreur majeure. |
**Remember to copy and paste any usepackage[]{} statements from the small files into the master file before you make them comments. You can see a line of packages in the sample document.** | **Remember to copy and paste any usepackage[]{} statements from the small files into the master file before you make them comments. You can see a line of packages in the sample document.** | ||
Ligne 133: | Ligne 133: | ||
\usepackage{graphicx, | \usepackage{graphicx, | ||
- | Ces paquets ne sont pas nécessaires dans chaque petit fichier, mais au moins un des petits documents nécessite un (ou plusieurs) de ces paquets. Si tous ne sont pas inclus dans une instruction usepackage, le livre final ne sera pas comme il devrait. | + | Ces paquets ne sont pas nécessaires dans chaque petit fichier, mais au moins un des petits documents nécessite un (ou plusieurs) de ces paquets. Si tous ne sont pas inclus dans une instruction usepackage, le livre final n' |
**Now your small documents will start with any chapter or section title and possibly a label so you can use cross references from one or more of the other small files in the book.** | **Now your small documents will start with any chapter or section title and possibly a label so you can use cross references from one or more of the other small files in the book.** | ||
- | Maintenant, vos petits documents commenceront avec n’importe quel titre de chapitre ou de section et éventuellement une étiquette afin que vous puissiez utiliser des références croisées à partir d’un ou plusieurs des autres petits fichiers du livre. | + | Bon. Vos petits documents commenceront avec n’importe quel titre de chapitre ou de section et éventuellement une étiquette afin que vous puissiez utiliser des références croisées à partir d’un ou plusieurs des autres petits fichiers du livre. |
**\chapter{Chapter 1}\label{chap01} | **\chapter{Chapter 1}\label{chap01} | ||
Ligne 153: | Ligne 153: | ||
**If I change the documentclass to article, both the frontmatter and mainmatter instructions have to be removed or commented. Once that is done, the article compiles to three pages. The title and Table of Contents appear on page 1, the text from FCM-167 on page 2, and FCM-168 on page 3. (Find out what happens if you leave frontmatter and mainmatter commented and change to documentclass = book.)** | **If I change the documentclass to article, both the frontmatter and mainmatter instructions have to be removed or commented. Once that is done, the article compiles to three pages. The title and Table of Contents appear on page 1, the text from FCM-167 on page 2, and FCM-168 on page 3. (Find out what happens if you leave frontmatter and mainmatter commented and change to documentclass = book.)** | ||
- | Si je change la classe documentclass en article, les instructions frontmatter et mainmatter doivent être supprimées ou commentées. Une fois cela fait, l’article se compile en trois pages. Le titre et la table des matières apparaissent à la page 1, le texte de FCM-167 à la page 2, et FCM-168 à la page 3. (Découvrez ce qui se passe si vous laissez les commentaires sur les instructions frontmatter et mainmatter et que vous changez le documentclass | + | Si je change la classe documentclass en article, les instructions frontmatter et mainmatter doivent être supprimées ou commentées. Une fois cela fait, l’article se compile en trois pages. Le titre et la table des matières apparaissent à la page 1, le texte de FCM-167 à la page 2, et celui de FCM-168 à la page 3. (Découvrez ce qui se passe si vous laissez les commentaires sur les instructions frontmatter et mainmatter et que vous changez le documentclass |
**Here is the Table of Contents for a more complete set of includes from other Latex articles.** | **Here is the Table of Contents for a more complete set of includes from other Latex articles.** |
issue190/latex.1677667163.txt.gz · Dernière modification : 2023/03/01 11:39 de d52fr