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/10 13:38] – 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.** | ||
- | Les données de tableau et LaTeX ne sont pas étrangers l'un à l' | + | Les données de tableau et LaTeX ne sont pas étrangers l'un à l' |
- | **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:** | + | **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: |
- | Spreadtab est un paquet LaTeX qui peut apporter quelques-unes des caractéristiques | + | Spreadtab est un paquet LaTeX qui peut apporter quelques-unes des fonctionnalités |
- | + | ||
- | **“This package provides spreadsheet features for LaTeX table environments.** | + | |
- | + | ||
- | **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.”** | + | |
- | + | ||
- | “Ce paquet offre des fonctionnalités de feuille de calcul pour les environnements de tableau LaTeX | + | |
- | + | ||
- | La principale | + | |
**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' | + | 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, | ||
- | Pour aiguiser votre appétit pour Spreadtab, je vais vous montrer quelques-unes des choses basiques que vous pouvez faire avec ce paquet. L'une des mesures d' | + | 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 |
**What I will show you here can be done with a spreadsheet, | **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, si vous voulez placer les informations de feuille de calcul dans un document LaTeX, | + | Ce que je vais vous montrer ici peut être fait avec une feuille de calcul |
**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) | ||
Ligne 44: | Ligne 35: | ||
• {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.** | ||
+ | |||
+ | 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, | **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:** | + | |
- | **\end{spreadtab}** | + | \end{spreadtab} |
- | **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 “&”. They do not have to be, and as you add or subtract data they will move around – that is OK. However, keeping everything aligned will help you correct errors and/or prevent you from getting dizzy.** | + | Le « & » signale une cellule ou un onglet, et les étiquettes dans les cellules sont précédées de « @ ». On notera que, dans l' |
- | **You will have to visualise that there are five columns here, and four rows, and, just like a spreadsheet, | + | Pour fermer cet environnement, utilisez cette commande : |
- | **And all of that will give us: | + | \end{spreadtab} |
- | 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”.** | + | 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. |
- | **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. | + | Compte tenu de ce qui précède, notre document peut ressembler à l' |
- | ** | + | |
- | **Let’s put this to work: | + | |
- | Here (previous page, bottom right) is an invoice for a growing concern.** | + | |
- | **The command \STautoround*{2} provides 2 decimal points with the “*” filling in zeros when necessary. | + | **Notice how nicely I have lined up the “&”. They do not have to be, and as you add or subtract data they will move around – that is OK. However, keeping everything aligned will help you correct errors and/or prevent you from getting dizzy. |
- | **** | + | |
- | Placing a % at the start of a line hides it from LaTeX but the A B C can help us keep track of the columns.** | + | |
- | **The @ 1 @ 2 @ 3 gives us the line numbers, but as “words” – so there are no decimal places.** | + | You will have to visualise that there are five columns here, and four rows, and, just like a spreadsheet, |
- | **It looks like the image above.** | + | And all of that will give us: |
+ | 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. | ||
- | **The only “Gotcha” I could find is things can go haywire if you have a blank line within | + | Just for a giggle, lets change the rat “3” with the word “pi”.** |
- | **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:// | + | Remarquez que j'ai bien aligné le « & ». Ils ne doivent pas l' |
- | ** | + | |
- | **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 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.** | + | 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. | ||
- | Tout commence dans un nouveau dossier | + | Let’s put this to work: |
+ | Here (previous page, bottom right) is an invoice for a growing concern. | ||
- | Les données tabulaires que vous voulez inclure doivent être décrites à l' | + | The command \STautoround*{2} provides 2 decimal points with the “*” filling in zeros when necessary. |
- | | + | |
- | | + | |
- | * le " | + | |
+ | Placing a % at the start of a line hides it from LaTeX but the A B C can help us keep track of the columns. | ||
- | Le "&" | + | The @ 1 @ 2 @ 3 gives us the line numbers, but as “words” – so there are no decimal places. |
- | Pour fermer cet environnement, | + | It looks like the image above. |
- | \end{spreadtab} | + | The only “Gotcha” I could find is things can go haywire if you have a blank line within the spreadtab |
- | Créeons une page avec cinq onglets, une ligne verticale entre les onglets | + | Vous pouvez également effectuer des calculs à l' |
- | Compte tenu de ce qui précède, notre document peut ressembler | + | Mettons tout ça en pratique : |
+ | Voici (page précédente, en bas à droite) une facture pour une société en croissance. | ||
- | Remarquez comment bien j'ai aligné | + | La commande \STautoround*{2} fournit 2 décimaux et le « * » insère |
- | Vous aurez à voir qu'il y a cinq colonnes ici, et quatre lignes, et, comme 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' | + | Placer un % au début d' |
- | Et tout ceci va nous donner : | + | Le @ 1 @ 2 @ 3 nous donne les numéros de ligne, mais comme des « mots » ; aussi il n'y a pas de décimales. |
- | Dans mon exemple ici, les données sont alignés à gauche en raison | + | |
- | Juste pour sourire, changeons le rat " | + | Cela ressemblera à l' |
- | Vous pouvez également effectuer des calculs à l' | + | Le seul « hic » que je pourrais trouver est que les choses peuvent se dégrader |
- | Mettons tout ça en pratique: | + | **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:// |
- | Ici (page précédente, en bas à droite) est une facture. | + | |
- | La commande \STautoround*{2} fournit 2 points décimaux avec le "*" remplaçant les zéros si nécessaire. | + | Once again, a big thank you / merci beaucoup to Christian Tellechea for all of his work on this package and the documentation.** |
- | Placer un % au début d'une ligne le cache à LaTeX, mais les A B C peuvent nous aider à garder une trace des colonnes. | + | 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:// |
- | Le @ 1 @ 2 @ 3 nous donne les numéros de ligne, mais comme des «mots» - donc il n'y a pas de décimales. | + | À nouveau, un grand et sincère merci à Christian Tellechea pour tout le travail qu'il a fait sur ce paquet et sa documentation. |
+ | |||
+ | **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.** | ||
- | ça ressemblera | + | 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, |
- | Le seul " |
issue112/tutoriel1.1473507528.txt.gz · Dernière modification : 2016/09/10 13:38 de bosskhalif