issue206:latex
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue206:latex [2024/06/29 17:34] – créée auntiee | issue206:latex [2024/07/08 10:26] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | This time we are going to examine the first instruction in a Latex document file. Every Latex document starts with: \documentclass[]{}. What the writer puts inside the curly braces sets much document formatting in place before a single word of text is written. In most of the examples seen in Full Circle Monthly the document class has been article. That is the quickest and easiest document class to show in these pages. For the purposes of the examples in previous issues the document class chosen has had no consequences on the results of the example. This time we are going to look at what the article class entails, what other options are available and what parameters can be put into the square brackets. | + | **This time we are going to examine the first instruction in a LaTeX document file. Every LaTeX document starts with: \documentclass[]{}. What the writer puts inside the curly braces sets much document formatting in place before a single word of text is written. In most of the examples seen in Full Circle Monthly the document class has been article. That is the quickest and easiest document class to show in these pages. For the purposes of the examples in previous issues the document class chosen has had no consequences on the results of the example. This time we are going to look at what the article class entails, what other options are available and what parameters can be put into the square brackets. |
- | There are four standard document classes: article, report, letter and book. The text of a document can be split into parts which generate a hierarchical structure. The parts of that structure are determined by the document class being used. There are five standard levels: part, chapter, section, subsection, subsubsection. Class book and class report can use all five, class article cannot use part and chapter. Letter class cannot use any of the five hierarchical levels. As you know if you have been reading this series | + | There are four standard document classes: article, report, letter and book. The text of a document can be split into parts which generate a hierarchical structure. The parts of that structure are determined by the document class being used. There are five standard levels: part, chapter, section, subsection, subsubsection. Class book and class report can use all five, class article cannot use part and chapter. Letter class cannot use any of the five hierarchical levels. As you know if you have been reading this series |
- | Note: There is a fifth document | + | Cette fois-ci, nous allons examiner la première instruction d'un fichier de document |
- | There are two more divisions allowed in standard | + | Il existe quatre classes de documents |
- | Note: users are also able to define new Latex macros in document | + | |
+ | **Note: There is a fifth document class: slides. It is used to set the default configuration for slide presentations. It is rarely used. I will not discuss its features in this article. | ||
+ | |||
+ | There are two more divisions allowed in standard LaTeX: paragraph and subparagraph. They are not used to force the start of new paragraphs. They are used to indicate divisions lower in the hierarchy than subsubparagraph without using a ridiculous number of “sub-” prefices. | ||
+ | |||
+ | Note: users are also able to define new LaTeX macros in document | ||
When complete the documentclass command will look like the following: | When complete the documentclass command will look like the following: | ||
Ligne 13: | Ligne 18: | ||
\documentclass[font size,paper size, other possible options]{class} | \documentclass[font size,paper size, other possible options]{class} | ||
- | As you would expect all of the options have their defaults. Quite often when making | + | As you would expect all of the options have their defaults. Quite often when making |
- | Because of the technology available when Tex was written (early 1970s) there are only three font sizes available to the documentclass command: 10pt, 11pt, 12pt with 10pt being the default. This is not a problem. Review my article in FCM 189 for some instructions about using fonts in Latex. | + | Because of the technology available when Tex was written (early 1970s) there are only three font sizes available to the documentclass command: 10pt, 11pt, 12pt with 10pt being the default. This is not a problem. Review my article in FCM 189 for some instructions about using fonts in LaTeX.** |
- | There are six paper sizes which can be specified. Latex users in North America get a break here. The default paper size is letterpaper which is 8.5 x 11 inches so it does not need to be specified. The five other paper sizes available | + | Remarque |
- | If you need to use a paper size different from these six then you need to define the physical page size. One way to do that is to define the page width and height using \pdfpaagewidth and \pdfpageheight. A more flexible way is to include the geometry package which gives many options for the physical size and the print area. | + | Il existe deux autres divisions autorisées dans LaTeX standard : paragraph |
- | Other possible options for the documentclass command: | + | Remarque : les utilisateurs peuvent également définir de nouvelles macros LaTeX dans les préambules des documents. Ces macros personnalisées peuvent être utilisées pour définir les caractéristiques des nouvelles divisions du document. |
+ | |||
+ | Une fois terminée, la commande documentclass ressemblera à ce qui suit : | ||
+ | |||
+ | \documentclass[taille de la police, taille du papier, autres options possibles]{class} | ||
+ | |||
+ | Comme on peut s'y attendre, toutes les options ont leur valeur par défaut. Très souvent, lorsque je crée des documents LaTeX, je n' | ||
+ | |||
+ | En raison de la technologie disponible à l' | ||
+ | |||
+ | |||
+ | **There are six paper sizes which can be specified. LaTeX users in North America get a break here. The default paper size is letterpaper which is 8.5 x 11 inches so it does not need to be specified. The five other paper sizes available | ||
+ | |||
+ | If you need to use a paper size different from these six then you need to define the physical page size. One way to do that is to define the page width and height using \pdfpaagewidth and \pdfpageheight. A more flexible way is to include the geometry package which gives many options for the physical size and the print area.** | ||
+ | |||
+ | Six formats de papier peuvent être spécifiés. Les utilisateurs de LaTeX en Amérique du Nord bénéficient ici d'un avantage. Le format de papier par défaut est letterpaper (8,5 x 11 pouces) et il n'est donc pas nécessaire de le spécifier. Les cinq autres formats de papier disponibles pour documentclass sont : a4paper, a5paper, b5paper, executivepaper et legalpaper. En Amérique du Nord, nous connaissons le papier legal, de format 8,5 x 14 pouces. Les formats A4, A5 et B5 sont généralement connus dans le reste du monde. Le papier exécutif est plus petit que le papier letter, seulement 7,25 x 10,5 pouces. Je crois qu'il s'agit d'un format standard pour écrire des lettres. | ||
+ | |||
+ | Si vous devez utiliser un format de papier différent de ces six formats, vous devez définir la taille physique de la page. Une façon de le faire est de définir la largeur et la hauteur de la page en utilisant \pdfpagewidth et \pdfpageheight. Une méthode plus souple consiste à inclure le paquet geometry qui offre de nombreuses options pour la taille physique et la zone d' | ||
+ | |||
+ | |||
+ | **Other possible options for the documentclass command: | ||
landscape: selects landscape setup (long side of page will be horizontal), | landscape: selects landscape setup (long side of page will be horizontal), | ||
draft / final: Mark (draft) or do not mark (final – default) overfull boxes with a black box in the margin | draft / final: Mark (draft) or do not mark (final – default) overfull boxes with a black box in the margin | ||
Ligne 30: | Ligne 55: | ||
onecolumn (default) / two column: typeset in one or two columns (this one should be obvious as should be the next one) | onecolumn (default) / two column: typeset in one or two columns (this one should be obvious as should be the next one) | ||
openright / openany: for the book class, openright is the default. It means every chapter starts on a right hand (odd-numbered) page. All others default to openany. | openright / openany: for the book class, openright is the default. It means every chapter starts on a right hand (odd-numbered) page. All others default to openany. | ||
- | oneside / twoside: one or two-sided layout, twoside is default for the book class, all others are oneside by default | + | oneside / twoside: one or two-sided layout, twoside is default for the book class, all others are oneside by default** |
- | Special considerations | + | Autres options possibles pour la commande documentclass : |
+ | landscape : sélectionne la configuration paysage (le côté long de la page sera horizontal), | ||
+ | brouillon / final : marque (brouillon) ou ne marque pas (final - par défaut) les cases trop pleines avec une case noire dans la marge. | ||
+ | fleqn : force les formules à être affichées à gauche, la valeur par défaut est centrée. | ||
+ | leqno : insére les numéros d' | ||
+ | openbib : utilise le format de bibliographie « open » (ouvert/ | ||
+ | titlepage (par défaut pour les rapports) / notitlepage (par défaut pour les autres documents imprimés) : spécifie s'il doit y avoir une page séparée pour le titre et pour le résumé. | ||
+ | onecolumn (par défaut) / two column : composition en une ou deux colonnes (celle-ci devrait être évidente, tout comme la suivante). | ||
+ | openright / openany : pour la classe book, openright est la valeur par défaut. Cela signifie que chaque chapitre commence sur une page de droite (impaire). Toutes les autres classes commencent par défaut par « openany ». | ||
+ | oneside / twoside : mise en page sur un ou deux côtés, twoside est la valeur par défaut pour la classe book, one side par défaut pour toutes les autres. | ||
+ | |||
+ | **Special considerations | ||
Oneside means the text will be placed in a “window” which is centred between the margins. | Oneside means the text will be placed in a “window” which is centred between the margins. | ||
- | Twoside means the size of the text window must be calculated since the margins for the left hand and right hand pages are mirror images. In twoside there are no margins labelled left and right. Rather they are labelled inner and outer in most desktop publishing and word processing software. In Latex / Tex they are also called oddside and evenside. | + | Twoside means the size of the text window must be calculated since the margins for the left hand and right hand pages are mirror images. In twoside there are no margins labelled left and right. Rather they are labelled inner and outer in most desktop publishing and word processing software. In LaTeX / Tex they are also called oddside and evenside. |
+ | |||
+ | As I am sure you realize, demonstrating many of these possibilities is not effective in FCM. Changing paper size or orientation , changing document class, and others cannot be observed in this format. There are a few which can be changed. Follow the code (previous page) and the images (below) to see a few examples.** | ||
+ | |||
+ | Considérations particulières | ||
+ | |||
+ | Oneside signifie que le texte sera placé dans une « fenêtre » centrée entre les marges. | ||
+ | |||
+ | Avec twoside, la taille de la fenêtre de texte doit être calculée car les marges des pages de gauche et de droite sont des images inversées. Dans twoside, il n'y a pas de marges étiquetées à gauche et à droite. Dans la plupart des logiciels de publication assistée par ordinateur et de traitement de texte, les marges sont plutôt appelées intérieure et extérieure. En LaTeX / TeX, elles sont également appelées oddside (côté impair) et evenside (côté pair). | ||
- | As I am sure you realize, demonstrating many of these possibilities is not effective in FCM. Changing paper size or orientation , changing | + | Comme vous le savez certainement, la démonstration de plusieurs de ces possibilités n'est pas efficace dans le cadre du FCM. La modification de la taille ou de l'orientation |
issue206/latex.1719675278.txt.gz · Dernière modification : 2024/06/29 17:34 de auntiee