issue211:latex
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue211:latex [2024/11/30 19:04] – créée auntiee | issue211:latex [2024/12/08 12:35] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | This is our fourth exploration of the topics at CTAN.ORG. We are up to the D section. | + | **This is our fourth exploration of the topics at CTAN.ORG. We are up to the D section. |
There are two languages here: Danish and Dutch. There are five items to do with data, and nine that work with various diagrams. There are also eight to do with DVI, those I will ignore. Under the main “diagram” topic are about 70 different packages: block diagrams, circuit diagrams, control diagrams, and others. There are packages to make knitting patterns and to make fingering diagrams for recorders. Since I do not know anything about knitting or playing a recorder, I will not demonstrate these packages. I have picked a few packages from one or two topics which I hope will be of interest to some readers. If there is a task you wish to do in Latex but are not sure how to do it, or how to use the relevant package, send me a note (rboardman@psmail.net) and tell me about it. I will do my best to sort out the problem. | There are two languages here: Danish and Dutch. There are five items to do with data, and nine that work with various diagrams. There are also eight to do with DVI, those I will ignore. Under the main “diagram” topic are about 70 different packages: block diagrams, circuit diagrams, control diagrams, and others. There are packages to make knitting patterns and to make fingering diagrams for recorders. Since I do not know anything about knitting or playing a recorder, I will not demonstrate these packages. I have picked a few packages from one or two topics which I hope will be of interest to some readers. If there is a task you wish to do in Latex but are not sure how to do it, or how to use the relevant package, send me a note (rboardman@psmail.net) and tell me about it. I will do my best to sort out the problem. | ||
- | 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.** |
- | 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. | + | 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. | ||
The 46-page documentation contains several examples which are definitely worth review and study. The examples usually require one or more additional packages (tikz, csv-sorter, color, and others). The examples show how csvsimple can be used to generate graphs (or charts) and mail-merge letters. The documentation offers two alternatives to dealing with CSV files that do not have field names / data headers. It also shows how to convert files where the fields are separated not by commas but by some other character, usually quotation marks, and how to deal with data values that have commas in them. | The 46-page documentation contains several examples which are definitely worth review and study. The examples usually require one or more additional packages (tikz, csv-sorter, color, and others). The examples show how csvsimple can be used to generate graphs (or charts) and mail-merge letters. The documentation offers two alternatives to dealing with CSV files that do not have field names / data headers. It also shows how to convert files where the fields are separated not by commas but by some other character, usually quotation marks, and how to deal with data values that have commas in them. | ||
- | 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.** |
- | 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, | + | 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, | ||
I am not going to review datatool in this issue. It is much too complex to describe in a few paragraphs. According to the documentation, | I am not going to review datatool in this issue. It is much too complex to describe in a few paragraphs. According to the documentation, | ||
- | I will move onto a couple of packages in the decorations topic. | + | I will move onto a couple of packages in the decorations topic.** |
- | 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.” | + | 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.” | ||
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 27: | Ligne 48: | ||
Here (next page, top right) is a bit of sample code. | Here (next page, top right) is a bit of sample code. | ||
- | In order to use the line-style=circles, | + | In order to use the 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. | + | 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. | ||
The last package I am going to discuss this time is smartdiagram, | The last package I am going to discuss this time is smartdiagram, | ||
- | 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. | ||
+ | |||
+ | 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.** | ||
- | As I hope is clear, I have only touched briefly on the capabilities of these packages. As I say every issue, read the documentation | + | Comme je l' |
- | Next time, I will take a look at some of the packages in the E topic section of ctan.org. | + | La prochaine fois, je jetterai un œil à certains des paquets de la section thématique |
issue211/latex.1732989840.txt.gz · Dernière modification : 2024/11/30 19:04 de auntiee