issue112:tutoriel1
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 | ||
issue112:tutoriel1 [2016/09/09 12:59] – bosskhalif | issue112:tutoriel1 [2016/09/12 09:03] (Version actuelle) – d52fr | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
**I have found that, once a person gets bitten by the LaTeX bug, there is never a lack of something to do or learn. All it takes is a task that needs to be done, a desire to take a path less travelled to complete the task (with style!), and a person is off and away into the LaTeX way of doing things. Sometimes we have to use the software provided in an office suite, because they do some (OK, many) things well. I am typing this in LibreOffice Writer because that is the format that FullCircle accepts. And that is OK, as there are things that may be best left to the office suite, like spreadsheets. The right tool for the job.** | **I have found that, once a person gets bitten by the LaTeX bug, there is never a lack of something to do or learn. All it takes is a task that needs to be done, a desire to take a path less travelled to complete the task (with style!), and a person is off and away into the LaTeX way of doing things. Sometimes we have to use the software provided in an office suite, because they do some (OK, many) things well. I am typing this in LibreOffice Writer because that is the format that FullCircle accepts. And that is OK, as there are things that may be best left to the office suite, like spreadsheets. The right tool for the job.** | ||
- | J'ai constaté que, une fois qu'une personne | + | J'ai constaté que, une fois qu'une personne |
**In my last article, I demonstrated that LaTeX code (or any markup code) can be inserted into data that is in a spreadsheet to format the data for publication. This comes in handy for creating something like a pocket address book from information in a tabular database. | **In my last article, I demonstrated that LaTeX code (or any markup code) can be inserted into data that is in a spreadsheet to format the data for publication. This comes in handy for creating something like a pocket address book from information in a tabular database. | ||
** | ** | ||
- | Dans mon dernier article, je démontrais que le code LaTeX (ou tout autre code de balise) peut être inséré dans des données se trouvant dans une feuille de calcul pour formater les données en vue de la publication. C'est très pratique pour créer quelque chose comme un carnet d' | + | Dans mon dernier article, je démontrais que le code LaTeX (ou tout autre code à balises) peut être inséré dans des données se trouvant dans une feuille de calcul pour formater les données en vue de la publication. C'est très pratique pour créer quelque chose comme un carnet d' |
**Tabular data and LaTeX are not strangers to one another, and the combination is covered in many of the basic LaTeX manuals. There are also special packages written to help us communicate tabular data with LaTeX, most of these packages have detailed manuals of their own like the 38-page manual for the package csvsimple, a package that I hope to cover in a future article. Then there is Spreadtab.** | **Tabular data and LaTeX are not strangers to one another, and the combination is covered in many of the basic LaTeX manuals. There are also special packages written to help us communicate tabular data with LaTeX, most of these packages have detailed manuals of their own like the 38-page manual for the package csvsimple, a package that I hope to cover in a future article. Then there is Spreadtab.** | ||
- | **Spreadtab is a LaTeX package that can bring some of the features of a spreadsheet to your LaTeX documents. Or, as Christian Tellechea, the creator of the package, said in the abstract of the (extremely well written) manual:** | + | Les données de tableau et LaTeX ne sont pas étrangers l'un à l' |
- | **“This package provides spreadsheet features for LaTeX table environments.** | + | **Spreadtab is a LaTeX package that can bring some of the features of a spreadsheet to your LaTeX documents. Or, as Christian Tellechea, the creator of the package, said in the abstract of the (extremely well written) manual: |
- | **The main feature allows the user to construct tables in a manner similar to a spreadsheet where cells are used in formulas to generate values in other cells. The package computes the formulas in the correct order, and finally displays the table with the numeric results.”** | + | Spreadtab est un paquet LaTeX qui peut apporter quelques-unes des fonctionnalités d'un tableur à vos documents LaTeX. Ou, comme l'a dit Christian Tellechea, le créateur du paquet, dans le résumé du manuel (qui est très bien écrit) : « Ce paquet offre des fonctionnalités de feuille de calcul pour les environnements de tableau LaTeX. La fonctionnalité principale permet à l' |
**Up until the time this package was written, there was nothing in the LaTeX environment that could do this. Christian Tellechea took this on as a programming exercise. Once again, someone scratches an itch and the world is a better place for it. Thank you, Christian!!!** | **Up until the time this package was written, there was nothing in the LaTeX environment that could do this. Christian Tellechea took this on as a programming exercise. Once again, someone scratches an itch and the world is a better place for it. Thank you, Christian!!!** | ||
+ | |||
+ | Jusqu' | ||
**To whet your appetite for Spreadtab, I will demonstrate some of the basic things you can do with this package. One of the incentives is to Keep It Simple Silly (KISS) – I am not a mathematician by any stretch of the imagination, | **To whet your appetite for Spreadtab, I will demonstrate some of the basic things you can do with this package. One of the incentives is to Keep It Simple Silly (KISS) – I am not a mathematician by any stretch of the imagination, | ||
- | What I will show you here can be done with a spreadsheet, | + | Afin de vous mettre l'eau à la bouche, je vais vous montrer quelques-unes des choses basiques que vous pouvez faire avec Spreadtab. L'une des incitations est Keep It Simple Silly (KISS - tout doit rester simple, idiot). Puisque je suis loin d' |
+ | |||
+ | **What I will show you here can be done with a spreadsheet, | ||
+ | |||
+ | Ce que je vais vous montrer ici peut être fait avec une feuille de calcul ; cependant, si vous voulez placer les informations de la feuille de calcul dans un document LaTeX, vous trouverez ce paquet utile. Ou, si vous avez un document avec des calculs que vous souhaitez réutiliser, | ||
- | Everything starts in a new directory (rule number one) and a preamble at the top of your file (see box above) | + | **Everything starts in a new directory (rule number one) and a preamble at the top of your file (see box above) |
The tabular data that you want to include must be described to the package: | The tabular data that you want to include must be described to the package: | ||
• {tabular} tells LaTeX “here comes some information in tabs” | • {tabular} tells LaTeX “here comes some information in tabs” | ||
• {with lower case “l”s} tells LaTex how many tabs there are | • {with lower case “l”s} tells LaTex how many tabs there are | ||
- | • the “|” tells LaTeX where to place any vertical lines. | + | • the “|” tells LaTeX where to place any vertical lines.** |
- | The “&” signals a cell or tab and labels in the cells are preceded with the “@”. Note that, within the tabular environment, | + | Tout commence dans un nouveau dossier (règle numéro un) et une préambule en haut de votre fichier (voir encadré ci-dessus). |
+ | Les données tabulaires que vous voulez inclure doivent être décrites au paquet : | ||
+ | • {tabular} (tableau) dit à LaTeX « voici quelques informations dans des onglets » ; | ||
+ | • {with lower case " | ||
+ | • le « | » indique à LaTeX où placer toutes les lignes verticales. | ||
+ | |||
+ | **The “&” signals a cell or tab and labels in the cells are preceded with the “@”. Note that, within the tabular environment, | ||
To end this environment use this command: | To end this environment use this command: | ||
Ligne 38: | Ligne 50: | ||
Let’s set up a page with five tabs, a vertical line between tab 4 and 5, and with labels for columns and rows. | Let’s set up a page with five tabs, a vertical line between tab 4 and 5, and with labels for columns and rows. | ||
- | Given the above, our document can look like that shown below after the preamble. | + | Given the above, our document can look like that shown below after the preamble.** |
- | Notice how nicely I have lined up the “& | + | Le « & » signale une cellule ou un onglet, et les étiquettes dans les cellules sont précédées de « @ ». On notera que, dans l' |
+ | |||
+ | Pour fermer cet environnement, | ||
+ | |||
+ | \end{spreadtab} | ||
+ | |||
+ | Créons une page avec cinq onglets, une ligne verticale entre les onglets 4 et 5, et avec des noms pour les colonnes et les lignes. | ||
+ | |||
+ | Compte tenu de ce qui précède, notre document peut ressembler à l' | ||
+ | |||
+ | **Notice how nicely I have lined up the “& | ||
You will have to visualise that there are five columns here, and four rows, and, just like a spreadsheet, | You will have to visualise that there are five columns here, and four rows, and, just like a spreadsheet, | ||
Ligne 47: | Ligne 69: | ||
In my example here, the data is flush left because of the five letter l’s in the tabular command. To move data to the right replace the l’s with r’s, and c will place the data in the centre of the column. | In my example here, the data is flush left because of the five letter l’s in the tabular command. To move data to the right replace the l’s with r’s, and c will place the data in the centre of the column. | ||
- | Just for a giggle, lets change the rat “3” with the word “pi”. | + | Just for a giggle, lets change the rat “3” with the word “pi”.** |
- | You can also make calculations within tabs with the * and / – if you place 8/2 in a tab, it will show a 4. Place a 8*5 in a tab and it will show a 40. | + | Remarquez que j'ai bien aligné le « & ». Ils ne doivent pas l' |
+ | |||
+ | Vous devrez imaginer qu'il y a cinq colonnes ici, et quatre lignes, et, comme dans une feuille de calcul, les colonnes ont une lettre et les lignes ont un chiffre. Cela nous permettra de faire des calculs, tout comme dans une feuille de calcul. Alors nous allons ajouter quelques chiffres et des calculs (voir l' | ||
+ | |||
+ | Et tout ceci va nous donner : | ||
+ | Dans mon exemple ici, les données sont alignées à gauche en raison des cinq lettres « l » dans la commande du tableau. Pour déplacer les données vers la droite, remplacez les « l » par « r », et « c » centrera les données dans la colonne. | ||
+ | |||
+ | Juste pour rigoler, remplaçons le rationnel « 3 » par le mot « pi ». | ||
+ | |||
+ | **You can also make calculations within tabs with the * and / – if you place 8/2 in a tab, it will show a 4. Place a 8*5 in a tab and it will show a 40. | ||
Let’s put this to work: | Let’s put this to work: | ||
Ligne 62: | Ligne 93: | ||
It looks like the image above. | It looks like the image above. | ||
- | The only “Gotcha” I could find is things can go haywire if you have a blank line within the spreadtab environment. | + | The only “Gotcha” I could find is things can go haywire if you have a blank line within the spreadtab environment.** |
+ | |||
+ | Vous pouvez également effectuer des calculs à l' | ||
+ | |||
+ | Mettons tout ça en pratique : | ||
+ | Voici (page précédente, | ||
+ | |||
+ | La commande \STautoround*{2} fournit 2 décimaux et le « * » insère des zéros si nécessaire. | ||
+ | |||
+ | Placer un % au début d'une ligne la cache à LaTeX, mais les A B C peuvent nous aider à garder une trace des colonnes. | ||
+ | |||
+ | Le @ 1 @ 2 @ 3 nous donne les numéros de ligne, mais comme des « mots » ; aussi il n'y a pas de décimales. | ||
+ | |||
+ | Cela ressemblera à l' | ||
+ | |||
+ | Le seul « hic » que je pourrais trouver est que les choses peuvent se dégrader si vous avez une ligne vide dans l' | ||
+ | |||
+ | **I have just scratched the surface with Spreadtab, really. My tables here are very simple, but what you will see in the spreadtab manual are much more complex and interesting. You can download the manual from https:// | ||
+ | |||
+ | Once again, a big thank you / merci beaucoup to Christian Tellechea for all of his work on this package and the documentation.** | ||
+ | |||
+ | En fait, je ne vous livre ici qu'un examen superficiel de Spreadtab. Mes tableaux sont très simples, mais ceux que vous verrez dans le manuel de Spreadtab sont beaucoup plus complexes et intéressants. Vous pouvez télécharger le manuel sur https:// | ||
+ | |||
+ | À nouveau, un grand et sincère merci à Christian Tellechea pour tout le travail qu'il a fait sur ce paquet et sa documentation. | ||
- | I have just scratched the surface with Spreadtab, really. My tables here are very simple, but what you will see in the spreadtab manual are much more complex | + | **John Eddie Kerr is a law librarian in Guelph, Ontario Canada. Ubuntu Linux is his desktop at home and at work. Xubuntu powers his Raspberry Pi 3 and Ubuntu Mate powers his Raspberry Pi 2.** |
- | Once again, a big thank you / merci beaucoup to Christian Tellechea for all of his work on this package and the documentation. | + | John Eddie Kerr est bibliothécaire en droit dans une bibliothèque de droit de comté dans Guelph, Ontario au Canada. Son ordinateur de bureau, à la maison comme au travail, est sous Ubuntu Linux. Xubuntu fait tourner son Raspberry Pi 3 et son Raspberry Pi 2 est sous Ubuntu Mate. |
- | John Eddie Kerr is a law librarian in Guelph, Ontario Canada. Ubuntu Linux is his desktop at home and at work. Xubuntu powers his Raspberry Pi 3 and Ubuntu Mate powers his Raspberry Pi 2. |
issue112/tutoriel1.1473418771.txt.gz · Dernière modification : 2016/09/09 12:59 de bosskhalif