issue201: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 | ||
issue201:latex [2024/02/06 06:48] – d52fr | issue201:latex [2024/02/06 11:04] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 2: | Ligne 2: | ||
Of course no one likes typing the same information over and over. This is a great way to induce boredom and boredom leads to mistakes. How can we make sure every cookbook starts with the same set of formatting instructions? | Of course no one likes typing the same information over and over. This is a great way to induce boredom and boredom leads to mistakes. How can we make sure every cookbook starts with the same set of formatting instructions? | ||
+ | |||
+ | Cette fois-ci, nous allons travailler avec ce que nous connaissons déjà et nous aventurer dans un nouveau domaine : les feuilles de style. Supposons que vous dirigiez une maison d' | ||
+ | |||
+ | Bien sûr, personne n'aime taper la même information à plusieurs reprises. C'est un excellent moyen de s' | ||
+ | |||
**Theoretically we should then be able to use this customized style file in any document simply by telling Latex usepackage{cookbook.sty}. Of course it is not quite that simple. There are two more steps. First, any custom style files need to be stored in the same folder / directory as the default style files. Second, Latex-Tex needs to know there is an additional style file available. Where are the default style files stored? That will depend on your distribution, | **Theoretically we should then be able to use this customized style file in any document simply by telling Latex usepackage{cookbook.sty}. Of course it is not quite that simple. There are two more steps. First, any custom style files need to be stored in the same folder / directory as the default style files. Second, Latex-Tex needs to know there is an additional style file available. Where are the default style files stored? That will depend on your distribution, | ||
Instead of typing all the instructions we used last time we only need to tell Latex to usepackage{cookbook} and all those instructions will automatically be used when the new cookbook PDF is generated. Just in case you are new to this series or forget what we had to type last time here is the listing (above).** | Instead of typing all the instructions we used last time we only need to tell Latex to usepackage{cookbook} and all those instructions will automatically be used when the new cookbook PDF is generated. Just in case you are new to this series or forget what we had to type last time here is the listing (above).** | ||
+ | |||
+ | Théoriquement, | ||
+ | |||
+ | Au lieu de taper toutes les instructions que nous avons utilisées la dernière fois, il nous suffit d' | ||
+ | |||
**We have not taken advantage of this usepackage feature of Latex. So far we have only used to to “turn on” certain desired features in our cookbook. I like the Noto font family and so used that package. Your book may use the default font family or a different font family. I wanted the cover to have a particular look (image within a frame and a shaded background to the image). I wanted the clickable links to use the default colours. Your choices could be different. I urge you to experiment with the various options available with these packages. I also urge you to find and use other packages with Latex. Now we know where to look let’s see if we can discover some useful and / or style files. | **We have not taken advantage of this usepackage feature of Latex. So far we have only used to to “turn on” certain desired features in our cookbook. I like the Noto font family and so used that package. Your book may use the default font family or a different font family. I wanted the cover to have a particular look (image within a frame and a shaded background to the image). I wanted the clickable links to use the default colours. Your choices could be different. I urge you to experiment with the various options available with these packages. I also urge you to find and use other packages with Latex. Now we know where to look let’s see if we can discover some useful and / or style files. | ||
Ligne 12: | Ligne 22: | ||
Load the package with \usepackage{gcard}** | Load the package with \usepackage{gcard}** | ||
+ | |||
+ | Nous n' | ||
+ | |||
+ | Mon installation comporte plus de deux mille répertoires contenant des fichiers de style. Certains répertoires contiennent plus d'un fichier de style. Cela fait beaucoup d' | ||
+ | |||
+ | Chargez le paquet avec \usepackage{gcard}. | ||
+ | |||
**Before \begin{document} if you want to use margins different from the de#faults (0.2in for all), set four lengths to values of your choice: [content deleted] | **Before \begin{document} if you want to use margins different from the de#faults (0.2in for all), set four lengths to values of your choice: [content deleted] | ||
Ligne 27: | Ligne 44: | ||
[End of documentation excerpt]** | [End of documentation excerpt]** | ||
+ | |||
+ | Avant \begin{document}, | ||
+ | |||
+ | Ensuite, après \begin document}, spécifiez le contenu de chaque panneau avec les environnements frontcover, backcover, insideleft et insideright. Chaque environnement définit son contenu dans une mini-page de largeur \panelwidth et de hauteur \panelheight. Ces deux longueurs peuvent être référencées, | ||
+ | |||
+ | Par exemple, vous pouvez spécifier le matériau pour la couverture de la carte avec | ||
+ | |||
+ | \begin{frontcover} | ||
+ | \Large | ||
+ | We heard you had a little trouble with the law \ldots (Il paraît que vous ayez eu des problèmes avec la police) | ||
+ | \end{frontcover} | ||
+ | |||
+ | Le texte apparaîtra centré verticalement sur la couverture, avec une justification normale. Il n'est pas nécessaire de fournir les quatre environnements ; les panneaux correspondant aux environnements manquants seront laissés vides. | ||
+ | |||
**A little experimentation will show which panels you need to use for whatever design for a greeting card you want to use. | **A little experimentation will show which panels you need to use for whatever design for a greeting card you want to use. | ||
Ligne 33: | Ligne 64: | ||
Another example is the bizcard style file developed by Sebastian Kirsch for Latex 2e, which is the previous version of Latex. Even though it is more than twenty years old it works well with the current version. In order to know how to use bizcard properly go to CTAN, then download and read the documentation supplied by the author. Since bizcard is part of a default installation there is no need to download the package. The documentation is only five pages and the information that will be important to most users is on pages 2 and 3. I copied the code from the documentation into an image for this article. It shows the code needed to generate business cards for the developer of the package. ** | Another example is the bizcard style file developed by Sebastian Kirsch for Latex 2e, which is the previous version of Latex. Even though it is more than twenty years old it works well with the current version. In order to know how to use bizcard properly go to CTAN, then download and read the documentation supplied by the author. Since bizcard is part of a default installation there is no need to download the package. The documentation is only five pages and the information that will be important to most users is on pages 2 and 3. I copied the code from the documentation into an image for this article. It shows the code needed to generate business cards for the developer of the package. ** | ||
+ | |||
+ | Quelques essais vous permettront de savoir quels panneaux vous devez utiliser, quel que soit le modèle de carte de vœux que vous souhaitez utiliser. | ||
+ | |||
+ | Cet exemple n' | ||
+ | |||
+ | Un autre exemple est le fichier de style carte de visite (bizcard) développé par Sebastian Kirsch pour LaTeX 2e, qui est la version précédente de LaTeX. Bien qu'il ait plus de vingt ans, il fonctionne bien avec la version actuelle. Pour savoir comment utiliser correctement bizcard, rendez-vous sur CTAN, puis téléchargez et lisez la documentation fournie par l' | ||
+ | |||
**There is no line-by-line explanation of the code in the documentation. However the code should be reasonably understandable to most computer users. If you decide to make some business cards using this style file then you can experiment with the various measurements and options to get what is best for your situation. Remember to save various iterations of your experiments for reference later. (Of course if you do not need the special German characters then you can delete the unneeded code for them.) | **There is no line-by-line explanation of the code in the documentation. However the code should be reasonably understandable to most computer users. If you decide to make some business cards using this style file then you can experiment with the various measurements and options to get what is best for your situation. Remember to save various iterations of your experiments for reference later. (Of course if you do not need the special German characters then you can delete the unneeded code for them.) | ||
Another of the more than two thousand built-in styles is exercise. The documentation says: “This package offers a simple environment to typeset exercises, and their questions, sub-questions, | Another of the more than two thousand built-in styles is exercise. The documentation says: “This package offers a simple environment to typeset exercises, and their questions, sub-questions, | ||
+ | |||
+ | La documentation ne contient pas d' | ||
+ | |||
+ | Un autre des plus de deux mille styles intégrés est « exercice ». La documentation indique : « Ce paquet offre un environnement simple pour la composition d' | ||
+ | |||
**There are over twenty styles starting with “beamer”. These are related to Latex styles that will build PDF files that are slides and can be used in presentations. The main beamer documentation is 225 pages long. It contains an example, instructions on how to make a first beamer presentation and a lot of details about the many parts of a beamer presentation. A search in CTAN using beamer gives 83 results. Some of those are variations on beamer for different languages or for the requirements for different institutions or base fonts. | **There are over twenty styles starting with “beamer”. These are related to Latex styles that will build PDF files that are slides and can be used in presentations. The main beamer documentation is 225 pages long. It contains an example, instructions on how to make a first beamer presentation and a lot of details about the many parts of a beamer presentation. A search in CTAN using beamer gives 83 results. Some of those are variations on beamer for different languages or for the requirements for different institutions or base fonts. | ||
Ligne 42: | Ligne 85: | ||
There is a little style package called datetime which comes with a thirteen-page document. It has quite a number of variations covering languages from Basque to Welsh. Along with the babel package (many languages) datetime allows for localisation of the display of dates and / or times. | There is a little style package called datetime which comes with a thirteen-page document. It has quite a number of variations covering languages from Basque to Welsh. Along with the babel package (many languages) datetime allows for localisation of the display of dates and / or times. | ||
- | An important set of packages start with bibtex. Tex / Latex was originally designed by Donald Knuth for use by academics (particularly in mathematics and natural sciences). Bibliographies are very important when the results of research and experimentation are published. Because of its age bibtex and its derivatives do not support Unicode fonts. If your work requires Unicode compatibility then you should use the bibLatex and biber packages.** | + | An important set of packages start with bibtex. Tex / Latex was originally designed by Donald Knuth for use by academics (particularly in mathematics and natural sciences). Bibliographies are very important when the results of research and experimentation are published. Because of its age bibtex and its derivatives do not support Unicode fonts. If your work requires Unicode compatibility then you should use the bibLatex and biber packages.** |
+ | |||
+ | Il existe plus de vingt styles commençant par « beamer ». Ceux-ci sont liés aux styles LaTeX qui permettent de créer des fichiers PDF qui sont des diapositives et peuvent être utilisés dans des présentations. La documentation principale de beamer fait 225 pages. Elle contient un exemple, des instructions sur la manière de réaliser une première présentation pour vidéoprojecteur et de nombreux détails sur les différentes parties d'une présentation projetée. Une recherche dans CTAN à l'aide de « beamer » donne 83 résultats. Certains d' | ||
+ | |||
+ | Il existe un petit paquet de style appelé datetime, accompagné d'un document de treize pages. Il comporte un grand nombre de variantes couvrant des langues allant du basque au gallois. Avec le paquet babel (beaucoup de langues), datetime permet de localiser l' | ||
+ | |||
+ | Un ensemble important de paquets commence avec « bibtex ». TeX/LaTeX a été conçu à l' | ||
**I included the cooking-units package when I developed the little cookbook example in the last few issues. I did not explain much about it then. It comes with forty-eight pages of documentation. The abstract says “this package enables user to globally format units, to switch between them and change your recipes to a given number of persons.” It supports text in English, French and German and can show amounts in factions if needed. Decimal numbers are automatically rounded to two digits, temperatures (four possible scales) are rounded to whole numbers. Conversions from one unit to another can be done in the recipe using the cooking-units package. For example oven temperatures can be shown as 350°F (175°C). Standard metric units (kg, metre, litre) and Imperial (lb, foot, quart) units of mass and volume are used by default, however new units can be defined. Ingredient amounts can be adjusted when the PDF is compiled using specific instructions explained in the documentation. For example a recipe can be coded for 4 servings but increased to 8 or 10 servings by using an appropriate instruction. | **I included the cooking-units package when I developed the little cookbook example in the last few issues. I did not explain much about it then. It comes with forty-eight pages of documentation. The abstract says “this package enables user to globally format units, to switch between them and change your recipes to a given number of persons.” It supports text in English, French and German and can show amounts in factions if needed. Decimal numbers are automatically rounded to two digits, temperatures (four possible scales) are rounded to whole numbers. Conversions from one unit to another can be done in the recipe using the cooking-units package. For example oven temperatures can be shown as 350°F (175°C). Standard metric units (kg, metre, litre) and Imperial (lb, foot, quart) units of mass and volume are used by default, however new units can be defined. Ingredient amounts can be adjusted when the PDF is compiled using specific instructions explained in the documentation. For example a recipe can be coded for 4 servings but increased to 8 or 10 servings by using an appropriate instruction. | ||
That is the end of fun with Latex for this month. We will take a look at some more of the installed packages over the next several issues.** | That is the end of fun with Latex for this month. We will take a look at some more of the installed packages over the next several issues.** | ||
+ | |||
+ | J'ai inclus le paquet d' | ||
+ | |||
+ | C'est la fin de l' | ||
issue201/latex.1707198482.txt.gz · Dernière modification : 2024/02/06 06:48 de d52fr