issue216: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 | ||
issue216:latex [2025/04/28 08:14] – d52fr | issue216:latex [2025/04/28 13:43] (Version actuelle) – d52fr | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | Another issue of Full Circle and another exploration of the many tools and options available in Latex. This time I will explore a few of the possibilities listed in the G topics. The G topic includes the following languages: Georgian, German, Greek. I remind you I will not select any of the languages since I wrote a column about a few techniques for using other languages recently (FCM #213), and because I plan to write more extensively about using multiple languages in the future. The G topic contains mostly packages that have to do with graphics which I chose not to examine in this article. | + | **Another issue of Full Circle and another exploration of the many tools and options available in Latex. This time I will explore a few of the possibilities listed in the G topics. The G topic includes the following languages: Georgian, German, Greek. I remind you I will not select any of the languages since I wrote a column about a few techniques for using other languages recently (FCM #213), and because I plan to write more extensively about using multiple languages in the future. The G topic contains mostly packages that have to do with graphics which I chose not to examine in this article. |
- | The first group of packages in the G topic is a group entitled “Games”. I think it might have better been called “Diversions” since many of these packages are not what I think of as games. There are packages to make chess puzzles, bridge games, Scrabble, Chinese chess, Othello (Reversi), RPG, Weiqi (Go); and also packages to make ASCII art, Mandelbrot sets, I-Ching, mazes, sudoku, tangrams, and the days which are Friday the 13th. This is only a short list of what is available. | + | The first group of packages in the G topic is a group entitled “Games”. I think it might have better been called “Diversions” since many of these packages are not what I think of as games. There are packages to make chess puzzles, bridge games, Scrabble, Chinese chess, Othello (Reversi), RPG, Weiqi (Go); and also packages to make ASCII art, Mandelbrot sets, I-Ching, mazes, sudoku, tangrams, and the days which are Friday the 13th. This is only a short list of what is available. |
- | If you are interested in standard chess, there are packages for annotation of games, for drawing the board, a package of fonts supporting chess diagrams, one for correspondence with chess game notation, and more. Chessboard is a package that is part of the default installation of TexLive. It is maintained by Ulrike Fischer, one of the two main authors of The Latex Companion (ISBN 978-0-13-465894-0) which I have recommended several times. The package was last updated in 2024 November. Fischer says “you will now have full control about size, content and look of the board.”It requires the following packages: chessfss (fonts), pgfcore, pgfbaseshapes and pst-node which are also part of the default TexLive install. I also needed to load the skak package in order for chessboard to generate a board with the newgame command. (Perhaps my version of chessboard is not up to date.) One of the graphics with this article shows an initial chessboard. Fischer wrote clear and comprehensive documentation full of sample code and illustrations. | + | Un nouveau numéro du Full Circle et une nouvelle exploration des nombreux outils et options disponibles dans LaTeX. Cette fois, j' |
+ | |||
+ | Le premier groupe de paquets de la rubrique G est intitulé « Jeux ». Il aurait été plus judicieux de l' | ||
+ | |||
+ | |||
+ | **If you are interested in standard chess, there are packages for annotation of games, for drawing the board, a package of fonts supporting chess diagrams, one for correspondence with chess game notation, and more. Chessboard is a package that is part of the default installation of TexLive. It is maintained by Ulrike Fischer, one of the two main authors of The Latex Companion (ISBN 978-0-13-465894-0) which I have recommended several times. The package was last updated in 2024 November. Fischer says “you will now have full control about size, content and look of the board.”It requires the following packages: chessfss (fonts), pgfcore, pgfbaseshapes and pst-node which are also part of the default TexLive install. I also needed to load the skak package in order for chessboard to generate a board with the newgame command. (Perhaps my version of chessboard is not up to date.) One of the graphics with this article shows an initial chessboard. Fischer wrote clear and comprehensive documentation full of sample code and illustrations. | ||
+ | |||
+ | \documentclass[letterpaper, | ||
+ | |||
+ | \usepackage{chessboard, | ||
+ | |||
+ | \usepackage{chessfss, | ||
+ | |||
+ | \setchessboard{showmover=false} | ||
+ | |||
+ | \begin{document} | ||
+ | |||
+ | \newgame | ||
+ | |||
+ | \chessboard[padding=4pt, | ||
+ | |||
+ | Si vous êtes intéressé par les échecs standards, il existe des paquets pour l' | ||
\documentclass[letterpaper, | \documentclass[letterpaper, | ||
Ligne 19: | Ligne 40: | ||
\chessboard[padding=4pt, | \chessboard[padding=4pt, | ||
- | A pastime many people enjoy is solving mazes; which the next package calls labyrinths. This package was uploaded to CTAN in 2014 and works well on my system. The documentation is only eight pages long, but contains enough information to guide the user into experimenting with the code. As always, I strongly encourage you to read the documentation, | + | |
+ | **A pastime many people enjoy is solving mazes; which the next package calls labyrinths. This package was uploaded to CTAN in 2014 and works well on my system. The documentation is only eight pages long, but contains enough information to guide the user into experimenting with the code. As always, I strongly encourage you to read the documentation, | ||
\documentclass[letterpaper, | \documentclass[letterpaper, | ||
Ligne 41: | Ligne 63: | ||
\v +++--+ \h +-+++ | \v +++--+ \h +-+++ | ||
- | \end{labyrinth} | + | \end{labyrinth}** |
+ | |||
+ | Un passe-temps apprécié de nombreuses personnes est la résolution de labyrinthes, | ||
- | From the geometry topic, I selected the geometry package. It is often used in Latex as it allows the user to define almost all the parameters of a document page. The latest update available at ctan.org is version 5.9 (2020 January). Page geometry can be changed in the middle of a document. If you have used Latex for at least one project, you know that each document requires the documentclass | + | \documentclass[letterpaper,11pt]{article} |
- | Geometry options are normally set at the beginning of a document. However it may be necessary to change the page geometry part way through. The newgeometry command can be used for this purpose, for example to insert a landscape page into an otherwise portrait-oriented document. The restoregeometry page returns the document to the original settings. If a set of options is going to be used regularly then the geometry can be saved and then loadgeometry used to load those options into the current location. | + | \usepackage{labyrinth} |
- | The 42-page documentation is written clearly and contains more than enough code to assist the user in the use of this package. There are many possible options available. Different options can be true / false, or have one, two or three possible values. The code needed to generate this image is below. | + | \begin{document} |
+ | |||
+ | \begin{labyrinth}{6}{5} | ||
+ | |||
+ | \h +++++ | ||
+ | |||
+ | \v -----+ \h ++++- | ||
+ | |||
+ | \v ++-+++ \h ----- | ||
+ | |||
+ | \v +-++++ \h -+---- | ||
+ | |||
+ | \v +-++-+ \h ----+ | ||
+ | |||
+ | \v +++--+ \h +-+++ | ||
+ | |||
+ | \end{labyrinth} | ||
+ | |||
+ | |||
+ | **From the geometry topic, I selected the geometry package. It is often used in Latex as it allows the user to define almost all the parameters of a document page. The latest update available at ctan.org is version 5.9 (2020 January). Page geometry can be changed in the middle of a document. If you have used Latex for at least one project, you know that each document requires the documentclass instruction. In the examples I have used for these articles, I have almost always set the document to letter-paper which defines a page as 8.5 X 11 inches, almost the same size as A4 paper. However, most books and periodicals are not published as 8.5 X 11 pages. They may be printed on “letter paper:” but are usually trimmed to something smaller. The geometry package allows the user to define the area for text, to centre the text on the page, set margins, set the sizes of the header and footer areas, and other choices. If the document type is “book”, then pages are printed two sided, so inner and outer margins are needed. Inner margins are usually wider than outer margins to allow for the area used in binding. | ||
+ | |||
+ | Geometry options are normally set at the beginning of a document. However it may be necessary to change the page geometry part way through. The newgeometry command can be used for this purpose, for example to insert a landscape page into an otherwise portrait-oriented document. The restoregeometry page returns the document to the original settings. If a set of options is going to be used regularly then the geometry can be saved and then loadgeometry used to load those options into the current location.** | ||
+ | |||
+ | Pour la rubrique Géométrie, | ||
+ | |||
+ | Les options de géométrie sont généralement définies au début d'un document. Cependant, il peut être nécessaire de modifier la géométrie de la page en cours de route. La commande newgeometry peut être utilisée à cette fin, par exemple pour insérer une page en paysage dans un document en portrait. La page restoregeometry rétablit les paramètres d' | ||
+ | |||
+ | |||
+ | **The 42-page documentation is written clearly and contains more than enough code to assist the user in the use of this package. There are many possible options available. Different options can be true / false, or have one, two or three possible values. The code needed to generate this image is below. | ||
\documentclass[letterpaper, | \documentclass[letterpaper, | ||
Ligne 60: | Ligne 112: | ||
\lipsum[1-3] | \lipsum[1-3] | ||
+ | |||
+ | \end{document}** | ||
+ | |||
+ | La documentation de 42 pages est claire et contient suffisamment de code pour aider l' | ||
+ | |||
+ | \documentclass[letterpaper, | ||
+ | |||
+ | \usepackage[layoutwidth=6in, | ||
+ | |||
+ | \usepackage{lipsum} | ||
+ | |||
+ | \begin{document} | ||
+ | |||
+ | Les dimensions utilisées dans le paquet geometry imprimeront le texte afin de laisser de l' | ||
+ | |||
+ | \lipsum[1-3] | ||
\end{document} | \end{document} | ||
- | As I am sure most of you know, Latex generates PDF files. Very recently (2025 March), a package has been uploaded to ctan.org which allows the user to include complete or partial PDF files in Latex (PDF) documents. No need to retype or even copy and paste. If what you need is already in a PDF file, one or more pages of that file can be included in the current document using the pdfpages package. I saved my FCM#213 column as a PDF and used it as an example with the following code. | + | |
+ | **As I am sure most of you know, Latex generates PDF files. Very recently (2025 March), a package has been uploaded to ctan.org which allows the user to include complete or partial PDF files in Latex (PDF) documents. No need to retype or even copy and paste. If what you need is already in a PDF file, one or more pages of that file can be included in the current document using the pdfpages package. I saved my FCM#213 column as a PDF and used it as an example with the following code. | ||
\usepackage[final]{pdfpages} | \usepackage[final]{pdfpages} | ||
Ligne 71: | Ligne 140: | ||
\includepdf[page=1]{../ | \includepdf[page=1]{../ | ||
- | I imported just one page but you can include page ranges as well. The option [final] in the usepackage command means the text will be imported. Other options include draft (there will be a box with the file name on the designated page but no text), demo (only the required number of blank pages are inserted) and two others. There are many options available for the includepdf command. These include various layout options and various ways to include one or more pages from one or more PDF files in the current file. | + | I imported just one page but you can include page ranges as well. The option [final] in the usepackage command means the text will be imported. Other options include draft (there will be a box with the file name on the designated page but no text), demo (only the required number of blank pages are inserted) and two others. There are many options available for the includepdf command. These include various layout options and various ways to include one or more pages from one or more PDF files in the current file.** |
- | Note 1: This package seems to be pointed at pdfTex users. Even so it performed well in my Latex environment. | + | Comme la plupart d' |
+ | |||
+ | \usepackage[final]{pdfpages} | ||
+ | |||
+ | \begin{document} | ||
+ | |||
+ | \includepdf[page=1]{../ | ||
+ | |||
+ | Je n'ai importé qu'une seule page, mais vous pouvez également inclure des plages de pages. L' | ||
+ | |||
+ | |||
+ | **Note 1: This package seems to be pointed at pdfTex users. Even so it performed well in my Latex environment. | ||
Note 2: If you want to incorporate other than one complete page, you will need to either retype or use copy and paste. | Note 2: If you want to incorporate other than one complete page, you will need to either retype or use copy and paste. | ||
Ligne 90: | Ligne 170: | ||
The documentation is one page plus one paragraph so read it and have fun with your work. | The documentation is one page plus one paragraph so read it and have fun with your work. | ||
- | When I use the \hat command, my editor (TeXstudio) automatically adds dollar signs around the”hat” instruction. This happens because “hat” is a math symbol in the same way as add, subtract, etc. So the instruction \hat is changed to $\hat{a}$. Nevertheless, | + | When I use the \hat command, my editor (TeXstudio) automatically adds dollar signs around the”hat” instruction. This happens because “hat” is a math symbol in the same way as add, subtract, etc. So the instruction \hat is changed to $\hat{a}$. Nevertheless, |
+ | |||
+ | Note 1 : Ce paquet semble destiné aux utilisateurs de pdfTex. Malgré cela, il a bien fonctionné dans mon environnement LaTeX. | ||
+ | |||
+ | Note 2 : Si vous souhaitez incorporer plus d'une page complète, vous devrez soit retaper le texte, soit effectuer un copier-coller. | ||
+ | |||
+ | Le symbole d' | ||
+ | |||
+ | \hat{a} = \hat{b} | ||
+ | |||
+ | Un chapeau est choisi au hasard dans la liste. L' | ||
+ | |||
+ | \hat[crown]{c} = \hat[birthday]{b} | ||
+ | |||
+ | Il est facile de définir un style de chapeau par défaut lors du chargement initial du paquet. | ||
+ | |||
+ | \usepackage[cowboy]{realhats} | ||
+ | |||
+ | La documentation fait une page et un paragraphe, alors lisez-la et amusez-vous bien. | ||
+ | |||
+ | Lorsque j' | ||
issue216/latex.1745820862.txt.gz · Dernière modification : 2025/04/28 08:14 de d52fr