issue171:tutoriel1
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue171:tutoriel1 [2021/08/01 19:18] – créée auntiee | issue171:tutoriel1 [2021/08/04 12:10] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | + | **When it comes to typesetting, | |
- | When it comes to typesetting, | + | |
So by this point you have an understanding of inserting pictures into your LaTeX document, but let’s say you want to add some data. I am unashamedly stealing this from Wikipedia as I just needed some values (and because if I steal it anywhere else, people get upset about copyright nonsense). | So by this point you have an understanding of inserting pictures into your LaTeX document, but let’s say you want to add some data. I am unashamedly stealing this from Wikipedia as I just needed some values (and because if I steal it anywhere else, people get upset about copyright nonsense). | ||
- | So If I wanted to have a table with the maximum temperatures for British Columbia, how would you think that we would do it? With a subsection of Tables! This can be sales figures or whatever you want, we are just going to use temperatures as a neutral example. I hope you have your practise document from the last issue. Delete everything between \begin{document} and \end{document} so we can start fresh. | + | So If I wanted to have a table with the maximum temperatures for British Columbia, how would you think that we would do it? With a subsection of Tables! This can be sales figures or whatever you want, we are just going to use temperatures as a neutral example. I hope you have your practise document from the last issue. Delete everything between \begin{document} and \end{document} so we can start fresh.** |
+ | |||
+ | En matière de composition, | ||
+ | |||
+ | À ce stade, vous savez comment insérer des images dans votre document LaTeX, mais disons que vous voulez ajouter des données. Je vole sans honte ces données à Wikipedia car j' | ||
+ | |||
+ | Donc, si je voulais avoir un tableau avec les températures maximales pour la Colombie-Britannique, | ||
- | This is what we will be covering if you are interested in the long explanation: | + | **This is what we will be covering if you are interested in the long explanation: |
Our code (or skeleton, per-se) will be, if you deleted last month’s file: | Our code (or skeleton, per-se) will be, if you deleted last month’s file: | ||
Ligne 20: | Ligne 25: | ||
\end{document} | \end{document} | ||
- | If you looked at the Wiki, you would have seen a bunch of “c’s” following the word ‘tabular’. Now what is all this about? Well, the ‘c’ is shorthand for centre, so it is the alignment of your columns. From this you should be able to figure out that ‘l’ will be left alignment, and ‘r’, right alignment. The pipe symbol is the line, separating the columns. Starting to make sense? I thought so! We generally do have smart readers. | + | If you looked at the Wiki, you would have seen a bunch of “c’s” following the word ‘tabular’. Now what is all this about? Well, the ‘c’ is shorthand for centre, so it is the alignment of your columns. From this you should be able to figure out that ‘l’ will be left alignment, and ‘r’, right alignment. The pipe symbol is the line, separating the columns. Starting to make sense? I thought so! We generally do have smart readers. |
- | I am going with four columns, as our stolen data has four months listed. We can do that first and see what it looks like. You can name your columns and use the ampersand “&” to separate them. | + | Voici ce dont nous allons parler si vous êtes intéressés par une longue explication : https:// |
+ | |||
+ | Si vous avez supprimé le fichier du mois dernier, notre code (ou squelette, peut-être) sera : | ||
+ | |||
+ | \documentclass[a4paper, | ||
+ | \usepackage{graphicx} | ||
+ | \usepackage{subcaption} | ||
+ | \graphicspath{dir-list} | ||
+ | \usepackage{lipsum} | ||
+ | |||
+ | \begin{document} | ||
+ | |||
+ | \end{document} | ||
+ | |||
+ | Si vous avez consulté le Wiki, vous avez dû voir une série de « c » après le mot « tabular ». Mais de quoi s' | ||
+ | |||
+ | **I am going with four columns, as our stolen data has four months listed. We can do that first and see what it looks like. You can name your columns and use the ampersand “&” to separate them. | ||
Monkey see, monkey do quickly and I will explain. | Monkey see, monkey do quickly and I will explain. | ||
Ligne 37: | Ligne 58: | ||
\end{table} | \end{table} | ||
- | I inserted two pipe symbols on either side of my columns, to get double lines. Pipe symbol = line, if that was not clear. It looks very ugly, but it illustrates something you needed to learn. Tabular is included in LaTeX and does not require you to import any packages. We use {Tables} to make our tabular columns float. That way we can align our table with text. Please, at any time, feel free to play with the options you have learned so far. Make more columns, change the amount of lines, whatever makes you happy. If you make a mistake, see if you can rectify it before looking back here. Feel free to add some ipsum text, to see what it looks like. | + | I inserted two pipe symbols on either side of my columns, to get double lines. Pipe symbol = line, if that was not clear. It looks very ugly, but it illustrates something you needed to learn. Tabular is included in LaTeX and does not require you to import any packages. We use {Tables} to make our tabular columns float. That way we can align our table with text. Please, at any time, feel free to play with the options you have learned so far. Make more columns, change the amount of lines, whatever makes you happy. If you make a mistake, see if you can rectify it before looking back here. Feel free to add some ipsum text, to see what it looks like.** |
- | We have columns, but how do we get rows? In LaTeX, rows are called horizontal lines, so you will need to pre-fix and post-fix each data line with ‘hline’. The other thing you need to know is that two slashes “\\” end a line. | + | Je vais opter pour quatre colonnes, car nos données volées comportent quatre mois. Nous pouvons commencer par cela et voir à quoi cela ressemble. Vous pouvez nommer vos colonnes et utiliser l' |
+ | |||
+ | Le singe voit, le singe fait rapidement et je vais vous expliquer. | ||
+ | |||
+ | \Sous-section{Tables} | ||
+ | |||
+ | \begin{table} | ||
+ | |||
+ | | ||
+ | Jan & Avr & Juil & Oct | ||
+ | |||
+ | | ||
+ | |||
+ | \end{table} | ||
+ | |||
+ | J'ai inséré deux symboles de tuyau de chaque côté de mes colonnes, pour obtenir des lignes doubles. Symbole de tuyau = ligne, si ce n' | ||
+ | |||
+ | **We have columns, but how do we get rows? In LaTeX, rows are called horizontal lines, so you will need to pre-fix and post-fix each data line with ‘hline’. The other thing you need to know is that two slashes “\\” end a line. | ||
If you looked at the example on the Wiki, did you figure it out? Don’t worry, me neither. Monkey see, monkey do time. I will do the first and you see if you can do the rest from our stolen table. | If you looked at the example on the Wiki, did you figure it out? Don’t worry, me neither. Monkey see, monkey do time. I will do the first and you see if you can do the rest from our stolen table. | ||
Ligne 50: | Ligne 88: | ||
\end{tabular} | \end{tabular} | ||
- | I added the Celsius symbol so you can see that it is not numeric only. Go ahead and make a table. Admit it, it was easier than you thought. | + | I added the Celsius symbol so you can see that it is not numeric only. Go ahead and make a table. Admit it, it was easier than you thought. |
- | Homework: add a caption to the table explaining what we are looking at. | + | Nous avons des colonnes, mais comment obtenir des lignes ? Dans LaTeX, les lignes sont appelées lignes horizontales. Vous devrez donc préfixer et postfixer chaque ligne de données avec « hline ». L' |
+ | |||
+ | Si vous avez regardé l' | ||
+ | |||
+ | \begin{tabular}{||c|c|c|c|||} | ||
+ | \hline | ||
+ | Jan & Avr & Juil & Oct \\ \hline | ||
+ | 5.6C & 10.2C & 16.2C & 11.1C \\ \hline | ||
+ | |||
+ | \end{tabular} | ||
+ | |||
+ | J'ai ajouté le symbole Celsius pour que vous puissiez voir que ce n'est pas uniquement numérique. Allez-y et faites un tableau. Avouez-le, c' | ||
+ | |||
+ | **Homework: add a caption to the table explaining what we are looking at. | ||
This is the basics of tables, we can go deeper, but we have a lot to cover, and this series is aimed at newbies who have no idea what LaTeX is. They are kept short on purpose, as LaTeX can overwhelm those who have no idea how complex it can be. | This is the basics of tables, we can go deeper, but we have a lot to cover, and this series is aimed at newbies who have no idea what LaTeX is. They are kept short on purpose, as LaTeX can overwhelm those who have no idea how complex it can be. | ||
Ligne 62: | Ligne 113: | ||
There are more graphics options available from the tikz package. That is another kettle of fish completely. Tikz can net you a 12-part series on its own. We will maybe touch on it at the end of this series. | There are more graphics options available from the tikz package. That is another kettle of fish completely. Tikz can net you a 12-part series on its own. We will maybe touch on it at the end of this series. | ||
- | Did I make a mistake? Do you have questions? E-mail us at: misc@fullirclemagazine.com | + | Did I make a mistake? Do you have questions? E-mail us at: misc@fullirclemagazine.com** |
+ | |||
+ | Devoir : ajouter une légende au tableau expliquant ce que nous regardons. | ||
+ | |||
+ | C'est la base des tableaux. Nous pouvons aller plus loin, mais nous avons beaucoup de choses à traiter, et cette série est destinée aux débutants qui n'ont aucune idée de ce qu'est LaTeX. Elle est volontairement courte, car LaTeX peut submerger ceux qui n'ont aucune idée de sa complexité. | ||
+ | |||
+ | Référence pour vous : https:// | ||
+ | |||
+ | Si vous avez réussi à suivre, bravo ! Rendez-vous dans le prochain numéro avec des codes plus énigmatiques. | ||
+ | |||
+ | Il y a plus d' | ||
+ | |||
+ | Ai-je fait une erreur ? Avez-vous des questions ? Envoyez-nous un mail à l' | ||
issue171/tutoriel1.1627838311.txt.gz · Dernière modification : 2021/08/01 19:18 de auntiee