issue211: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 | ||
issue211:latex [2024/12/07 17:37] – d52fr | issue211:latex [2024/12/08 12:35] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 4: | Ligne 4: | ||
The first package I will discuss is one that allows the import of CSV files directly into Latex documents. I often used CSV files to move data from application to application when I taught at college. CSV files are plain text (ASCII usually) files, usually generated either by a spreadsheet or database. A table of data is exported – with each row of the table as a separate line in the CSV file. Each field is separated from its neighbours with a comma. The package I have on my system is called csvsimple version 1.22 from 2021. There is an updated version called csvsimple-13. The more recent version is not part of the default installation on my machine, so I will demonstrate the earlier one. The author / maintainer says it is completely compatible.** | The first package I will discuss is one that allows the import of CSV files directly into Latex documents. I often used CSV files to move data from application to application when I taught at college. CSV files are plain text (ASCII usually) files, usually generated either by a spreadsheet or database. A table of data is exported – with each row of the table as a separate line in the CSV file. Each field is separated from its neighbours with a comma. The package I have on my system is called csvsimple version 1.22 from 2021. There is an updated version called csvsimple-13. The more recent version is not part of the default installation on my machine, so I will demonstrate the earlier one. The author / maintainer says it is completely compatible.** | ||
+ | |||
+ | C'est notre quatrième exploration des sujets sur CTAN.ORG. Nous en sommes à la section D. | ||
+ | |||
+ | Il y a deux langues ici : le danois et le néerlandais. Il y a cinq éléments liés aux données et neuf qui fonctionnent avec divers diagrammes. Il y en a aussi huit liés à DVI, que je vais ignorer. Sous le thème principal « diagramme », il y a environ 70 paquets différents : schémas fonctionnels, | ||
+ | |||
+ | Le premier paquet dont je parlerai est celui qui permet l' | ||
+ | |||
**There are only two commands needed to import a CSV file into a Latex document as a simple file. The first command is to “import” the package: \usepackage{csvsimple}. The second command imports the file: \csvautotabular{grades.csv}. You can see the result in the screenshot. By default, csvsimple assumes the first row has the field names. Notice the first row is formatted a little differently than the others. | **There are only two commands needed to import a CSV file into a Latex document as a simple file. The first command is to “import” the package: \usepackage{csvsimple}. The second command imports the file: \csvautotabular{grades.csv}. You can see the result in the screenshot. By default, csvsimple assumes the first row has the field names. Notice the first row is formatted a little differently than the others. | ||
Ligne 10: | Ligne 17: | ||
Note: CSVsimple is not a spreadsheet or database. It does not sort data when importing. It takes the CSV data and converts it to a table. If you want to use more sophisticated methods and tools, then I suggest you investigate a set of packages called datatool.** | Note: CSVsimple is not a spreadsheet or database. It does not sort data when importing. It takes the CSV data and converts it to a table. If you want to use more sophisticated methods and tools, then I suggest you investigate a set of packages called datatool.** | ||
+ | |||
+ | Il n'y a que deux commandes nécessaires pour importer un fichier CSV dans un document LaTeX en tant que fichier simple. La première commande consiste à « importer » le paquet : \usepackage{csvsimple}. La deuxième commande importe le fichier : \csvautotabular{grades.csv}. Vous pouvez voir le résultat dans la capture d' | ||
+ | |||
+ | La documentation de 46 pages contient plusieurs exemples qui méritent certainement d' | ||
+ | |||
+ | Remarque : CSVsimple n'est pas une feuille de calcul ou une base de données. Il ne trie pas les données lors de l' | ||
+ | |||
**The datatool package is a collection of eight interlinked packages. Datatool is the base package and it automatically loads the datatool-base. If any of the other six packages are loaded independently, | **The datatool package is a collection of eight interlinked packages. Datatool is the base package and it automatically loads the datatool-base. If any of the other six packages are loaded independently, | ||
Ligne 16: | Ligne 30: | ||
I will move onto a couple of packages in the decorations topic.** | I will move onto a couple of packages in the decorations topic.** | ||
+ | |||
+ | Le paquet datatool est un ensemble de huit paquets interconnectés. Datatool est le paquet de base et il charge automatiquement datatool-base. Si l'un des six autres paquets est chargé indépendamment, | ||
+ | |||
+ | Je ne vais pas faire la critique de datatool dans ce numéro. Il est beaucoup trop complexe pour être décrit en quelques paragraphes. Selon la documentation, | ||
+ | |||
+ | Je vais passer à quelques paquets dans le thème des décorations. | ||
+ | |||
**The contour package is about twenty years old and has a specific function. It is also much easier to understand and easier to work with than datatool, its documentation is only fourteen pages, ten pages of which are annotated code. According to the author, contour “generates a colored contour around a given text in order to enable printing text over a background without the need of a color box around the text.” | **The contour package is about twenty years old and has a specific function. It is also much easier to understand and easier to work with than datatool, its documentation is only fourteen pages, ten pages of which are annotated code. According to the author, contour “generates a colored contour around a given text in order to enable printing text over a background without the need of a color box around the text.” | ||
Ligne 21: | Ligne 42: | ||
Here (above) is the code controlling colorbox and contour. (The package color must be used.) | Here (above) is the code controlling colorbox and contour. (The package color must be used.) | ||
- | You can see the results in the image. | + | You can see the results in the ipackagemage. |
The other package I selected in the decoration topic is multicolrule. It has 24 pages of documentation; | The other package I selected in the decoration topic is multicolrule. It has 24 pages of documentation; | ||
Ligne 28: | Ligne 49: | ||
In order to use the line-style=circles, | In order to use the line-style=circles, | ||
+ | |||
+ | Le paquet contour a une vingtaine d' | ||
+ | |||
+ | Voici (ci-dessus) le code contrôlant colorbox et contour. (Le paquet color doit être utilisé.) | ||
+ | |||
+ | Vous pouvez voir les résultats dans l' | ||
+ | |||
+ | L' | ||
+ | |||
+ | Voici (page suivante, en haut à droite) un petit exemple de code. | ||
+ | |||
+ | Pour utiliser line-style=circles, | ||
+ | |||
**This package would be helpful if you were making a brochure with a tear-away panel. There is code to use many symbols and graphics instead of lines or dots as column dividers. The documentation is full of example column dividers, and the matching code. Samples of complete code are available in the downloaded zip. The code is in mcrule-examples.tex and the results can be seen in the mcrule-examples.pdf. | **This package would be helpful if you were making a brochure with a tear-away panel. There is code to use many symbols and graphics instead of lines or dots as column dividers. The documentation is full of example column dividers, and the matching code. Samples of complete code are available in the downloaded zip. The code is in mcrule-examples.tex and the results can be seen in the mcrule-examples.pdf. | ||
Ligne 34: | Ligne 68: | ||
Again from the documentation, | Again from the documentation, | ||
+ | |||
+ | Ce paquet serait utile si vous réalisiez une brochure avec un panneau détachable. Il contient du code permettant d' | ||
+ | |||
+ | Le dernier paquet dont je vais parler cette fois est smartdiagram, | ||
+ | |||
+ | Toujours d' | ||
+ | |||
**As I hope is clear, I have only touched briefly on the capabilities of these packages. As I say every issue, read the documentation if you think one or more of these packages can be useful in your work. I also recommend reading novices-report.pdf by Dr. Nicola Talbot if you are getting started with Latex. If you are writing a thesis or other lengthy document in Latex, I recommend thesis-report.pdf also by Dr. Talbot. Both are available from her website: www.dickamaw-books.com. (Dr. Talbot is the author and maintainer of the datatool package discussed briefly in this column.) These two books were written more than 10 years ago, and there has been a significant upgrade in Latex in that time. Nevertheless they remain valuable resources. | **As I hope is clear, I have only touched briefly on the capabilities of these packages. As I say every issue, read the documentation if you think one or more of these packages can be useful in your work. I also recommend reading novices-report.pdf by Dr. Nicola Talbot if you are getting started with Latex. If you are writing a thesis or other lengthy document in Latex, I recommend thesis-report.pdf also by Dr. Talbot. Both are available from her website: www.dickamaw-books.com. (Dr. Talbot is the author and maintainer of the datatool package discussed briefly in this column.) These two books were written more than 10 years ago, and there has been a significant upgrade in Latex in that time. Nevertheless they remain valuable resources. | ||
Next time, I will take a look at some of the packages in the E topic section of ctan.org. After that, I will look at using Latex when typesetting languages that do not use the default Latin alphabet, i.e. most languages of the world.** | Next time, I will take a look at some of the packages in the E topic section of ctan.org. After that, I will look at using Latex when typesetting languages that do not use the default Latin alphabet, i.e. most languages of the world.** | ||
+ | |||
+ | Comme je l' | ||
+ | |||
+ | La prochaine fois, je jetterai un œil à certains des paquets de la section thématique E de ctan.org. Après cela, je me pencherai sur l' |
issue211/latex.1733589447.txt.gz · Dernière modification : 2024/12/07 17:37 de d52fr