issue207: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 | ||
issue207:latex [2024/08/05 14:37] – d52fr | issue207:latex [2024/08/06 17:43] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 2: | Ligne 2: | ||
Before we continue, a few words about paper sizes, which are the controlling factors in page design. Most countries in the world use A4 paper as the default paper size. Canada, the Philippines, | Before we continue, a few words about paper sizes, which are the controlling factors in page design. Most countries in the world use A4 paper as the default paper size. Canada, the Philippines, | ||
+ | |||
+ | Bienvenue dans cette nouvelle aventure avec LaTeX. Cette fois-ci, nous allons explorer le paquet geometry. Geometry est un paquet de mise en page. L' | ||
+ | |||
+ | Avant de poursuivre, quelques mots sur les formats de papier, qui sont les facteurs déterminants de la conception des pages. La plupart des pays du monde utilisent le format A4 comme format de papier par défaut. Le Canada, les Philippines et les États-Unis utilisent un format de papier par défaut appelé « letter ». Le format A4 fait partie d'une série de formats de papier reconnus par l'ISO. A0 est le plus grand. Une feuille A0 mesure un mètre carré (841 mm x 1189 mm, arrondi au mm le plus proche). Chaque format de feuille correspond exactement à la moitié du format précédent, | ||
+ | |||
**The geometry package also accepts several other less frequently used paper sizes: b0paper – b6paper, c0paper – c6paper, b0j – b6j (Japanese sizes), as well as letterpaper (216mm x 279mm), legalpaper (216mm x 356mm), and executivepaper (184mm x 267mm) to accommodate North American standards. It is also possible to set paperwidth and paperheight to specific dimensions if necessary or desirable. | **The geometry package also accepts several other less frequently used paper sizes: b0paper – b6paper, c0paper – c6paper, b0j – b6j (Japanese sizes), as well as letterpaper (216mm x 279mm), legalpaper (216mm x 356mm), and executivepaper (184mm x 267mm) to accommodate North American standards. It is also possible to set paperwidth and paperheight to specific dimensions if necessary or desirable. | ||
Ligne 10: | Ligne 15: | ||
I have set up some example pages to show a small part of the flexibility of the geometry package. Example one is a fairly standard page: [paper=letterpaper, | I have set up some example pages to show a small part of the flexibility of the geometry package. Example one is a fairly standard page: [paper=letterpaper, | ||
+ | |||
+ | Le paquet geometry accepte également plusieurs autres formats de papier moins fréquemment utilisés : papier b0 - papier b6, papier c0 - papier c6, b0j - b6j (formats japonais), ainsi que letterpaper (216 mm x 279 mm), legalpaper (216 mm x 356 mm) et executivepaper (184 mm x 267 mm) pour répondre aux normes nord-américaines. Il est également possible de définir des dimensions spécifiques pour la largeur et la hauteur du papier, si cela est nécessaire ou souhaitable. | ||
+ | |||
+ | Geometry prend en charge l' | ||
+ | |||
+ | Geometry supporte l' | ||
+ | |||
+ | J'ai créé quelques pages d' | ||
+ | |||
**One magazine I subscribe to has a final paper size of 19cm x 26cm. It has two columns of text printed on both sides of the page. The outside margin is 2.5cm, the inside margin is also 2.5cm including the space required for binding. The top margin is 2.3cm and the bottom margin is 3.3cm. The footer appears 2.5cm below the text block. Geometry does not control what happens inside the text block, so setting for two columns and setting the space between columns is in the control of another package. Settings for this magazine could be: Example 2 settings: [paperheight=26cm, | **One magazine I subscribe to has a final paper size of 19cm x 26cm. It has two columns of text printed on both sides of the page. The outside margin is 2.5cm, the inside margin is also 2.5cm including the space required for binding. The top margin is 2.3cm and the bottom margin is 3.3cm. The footer appears 2.5cm below the text block. Geometry does not control what happens inside the text block, so setting for two columns and setting the space between columns is in the control of another package. Settings for this magazine could be: Example 2 settings: [paperheight=26cm, | ||
Ligne 15: | Ligne 29: | ||
This combination of settings is only one way to specify the layout for this magazine. The page designer could also work from letter size paper or A4 paper, and use the four margins to control the size of the text block. There are often two or more ways to use the many settings available in the geometry package to specify a layout. | This combination of settings is only one way to specify the layout for this magazine. The page designer could also work from letter size paper or A4 paper, and use the four margins to control the size of the text block. There are often two or more ways to use the many settings available in the geometry package to specify a layout. | ||
- | Remember the goal of Latex / Tex is to generate a standard PDF file which can be read on screen, or printed. When doing page design, it is important to know what the readers expect. It may be desirable for some design elements to be different if the document is to be read on screen compared to being printed.** | + | Remember the goal of LaTeX / Tex is to generate a standard PDF file which can be read on screen, or printed. When doing page design, it is important to know what the readers expect. It may be desirable for some design elements to be different if the document is to be read on screen compared to being printed.** |
+ | |||
+ | Un magazine auquel je suis abonné a un format final de 19 cm x 26 cm. Il comporte deux colonnes de texte imprimées sur les deux côtés de la page. La marge extérieure est de 2,5 cm, la marge intérieure est également de 2,5 cm, y compris l' | ||
+ | Paramètres du 2e exemple : [paperheight=26cm, | ||
+ | |||
+ | Cette combinaison de paramètres n'est qu'une façon de spécifier la mise en page de ce magazine. Le concepteur de pages peut également travailler sur du papier de format letter ou A4 et utiliser les quatre marges pour contrôler la taille du bloc de texte. Il y a souvent deux façons ou plus d' | ||
+ | |||
+ | N' | ||
**Changing geometry mid document (1) | **Changing geometry mid document (1) | ||
Ligne 25: | Ligne 47: | ||
Types of options for geometry are: Boolean (true – false), one option, (key=value) two option key={value1, | Types of options for geometry are: Boolean (true – false), one option, (key=value) two option key={value1, | ||
+ | |||
+ | Changement de géométrie en milieu de document (1) | ||
+ | |||
+ | \newgeometry{options} modifie la mise en page en cours de document. \newgeometry est presque similaire à \geometry sauf que \newgeometry désactive toutes les options spécifiées par \usepackage et \geometry dans le préambule et ignore les options liées au format du papier. | ||
+ | |||
+ | \restoregeometry restaure la mise en page spécifiée dans le préambule. Cette commande n'a pas d' | ||
+ | |||
+ | \savegeometry{name} enregistre les dimensions de la page sous ' | ||
+ | |||
+ | Les types d' | ||
+ | |||
**Options available | **Options available | ||
Ligne 37: | Ligne 70: | ||
Finally, there is a group called native size. These options can override the defaults built into Latex. For example, the default spaces allocated for headers and footers can be eliminated. For another example, look at either of the two images. There is space set aside in the right margin for margin notes (or outside margin in two-sided layouts). Using the reversemarginpar instruction puts that space in the left margin (or inside margin in two-sided layouts).** | Finally, there is a group called native size. These options can override the defaults built into Latex. For example, the default spaces allocated for headers and footers can be eliminated. For another example, look at either of the two images. There is space set aside in the right margin for margin notes (or outside margin in two-sided layouts). Using the reversemarginpar instruction puts that space in the left margin (or inside margin in two-sided layouts).** | ||
+ | |||
+ | Options disponibles | ||
+ | |||
+ | Il y a cinq pages d' | ||
+ | |||
+ | La catégorie papersize (format de papier) comprend tous les formats dont j'ai parlé au début de cet article, ainsi que d' | ||
+ | |||
+ | Le groupe layout size (taille de la mise en page) comporte un petit nombre d' | ||
+ | |||
+ | Vient ensuite une longue liste de paramètres dans le groupe « body size » (taille du corps). (Le corps fait référence au corps du texte, qui contient le contenu de l' | ||
+ | |||
+ | Enfin, il existe un groupe appelé « native size » (taille native). Ces options peuvent remplacer les valeurs par défaut intégrées dans LaTeX. Par exemple, les espaces par défaut alloués aux en-têtes et aux pieds de page peuvent être supprimés. Pour un autre exemple, regardez l'une des deux images. Un espace est réservé dans la marge droite pour les notes de marge (ou la marge extérieure dans les mises en page recto-verso). L' | ||
+ | |||
**Changing geometry mid-document (2) | **Changing geometry mid-document (2) | ||
Ligne 48: | Ligne 94: | ||
As mentioned above, it is also possible to build a collection, a library of geometry “styles” using the \savegeometry{name}. For example, assume you regularly published PDF files using two or more different page layouts. Assume they are called L1 and L2. Start the document in the usual way and include the geometry package. After the \begin{document} command, issue the appropriate \loadgeometry{L1} command for an L1 layout. No need to remember what the various layout dimensions are. This ability would also allow for quick and easy use of different page layouts for pages with illustrations and pages without illustrations in the same document, for example.** | As mentioned above, it is also possible to build a collection, a library of geometry “styles” using the \savegeometry{name}. For example, assume you regularly published PDF files using two or more different page layouts. Assume they are called L1 and L2. Start the document in the usual way and include the geometry package. After the \begin{document} command, issue the appropriate \loadgeometry{L1} command for an L1 layout. No need to remember what the various layout dimensions are. This ability would also allow for quick and easy use of different page layouts for pages with illustrations and pages without illustrations in the same document, for example.** | ||
+ | |||
+ | Changement de géométrie en cours de document (2) | ||
+ | |||
+ | La commande newgeometry permet de modifier toutes les options de geometry, à l' | ||
+ | ••Si elle est utilisée, elle doit apparaître après la commande \begin{document}. | ||
+ | ••Elle peut modifier un ou plusieurs des paramètres définis à l' | ||
+ | ••La commande newgeometry peut être émise plusieurs fois dans un document. | ||
+ | ••Pour revenir aux paramètres d' | ||
+ | ••Les commandes \newgeometry et \restoregeometry émettent toutes deux la commande \newpage avant de modifier la mise en page. | ||
+ | |||
+ | Comme indiqué ci-dessus, il est également possible de créer une collection, une bibliothèque de « styles » pour geometry à l'aide de la commande \savegeometry{name}. Par exemple, supposons que vous publiez régulièrement des fichiers PDF en utilisant deux ou plusieurs mises en page différentes. Supposons qu' | ||
+ | |||
**Documentation | **Documentation | ||
Ligne 64: | Ligne 122: | ||
\printparametersfalse | \printparametersfalse | ||
\currentpage\pagedesign}** | \currentpage\pagedesign}** | ||
+ | |||
+ | Documentation | ||
+ | |||
+ | Je vous recommande vivement de lire la documentation relative au paquet geometry (comme je l'ai fait pour tous les logiciels dont j'ai parlé). Les 17 premières pages contiennent toutes les informations dont la plupart des utilisateurs auront besoin. Le reste des 42 pages présente le code et les explications. Les pages 16 et 17 contiennent onze exemples annotés, du plus simple au plus complexe. Il y en a probablement au moins un qui peut servir de base à la mise en page que vous souhaitez utiliser. | ||
+ | |||
+ | Remarque particulière | ||
+ | |||
+ | Pour générer des vues de mises en page comme celles de cet article, le code suivant est très utile. Placez-le dans le préambule, c' | ||
+ | |||
+ | \usepackage{layouts} | ||
+ | \newcommand\showpage{% | ||
+ | \setlayoutscale{0.5}% | ||
+ | \setlabelfont{\large}% | ||
+ | \printheadingsfalse | ||
+ | \printparametersfalse | ||
+ | \currentpage\pagedesign} | ||
+ | |||
**Put any parameters for the geometry package below these layouts package commands. In the body of the document, use the \showpage command to generate the view of the layout. If you set the layout scale to 1, you will get an image that will be the finished size of the layout design. It can be saved as a PDF file and printed if desired. However the image will be shown or printed inside the margins of a standard page, and so will probably flow past the existing right and bottom margins. | **Put any parameters for the geometry package below these layouts package commands. In the body of the document, use the \showpage command to generate the view of the layout. If you set the layout scale to 1, you will get an image that will be the finished size of the layout design. It can be saved as a PDF file and printed if desired. However the image will be shown or printed inside the margins of a standard page, and so will probably flow past the existing right and bottom margins. | ||
Thanks again for reading and following along in my adventures with Latex. So far, it has been not only interesting but also educational. I have learned a lot and I hope you have too. Talk to you again in the next issue.** | Thanks again for reading and following along in my adventures with Latex. So far, it has been not only interesting but also educational. I have learned a lot and I hope you have too. Talk to you again in the next issue.** | ||
+ | |||
+ | Placez tous les paramètres du paquet geometry sous les commandes du paquet de mise en page. Dans le corps du document, utilisez la commande \showpage pour générer la vue de la mise en page. Si vous réglez l' | ||
+ | |||
+ | Merci encore d' | ||
issue207/latex.1722861426.txt.gz · Dernière modification : 2024/08/05 14:37 de d52fr