issue169: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 | ||
issue169:latex [2021/06/04 16:01] – d52fr | issue169:latex [2021/06/06 17:53] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 4: | Ligne 4: | ||
When it comes to typesetting, | When it comes to typesetting, | ||
+ | |||
+ | Vous vous demandez peut-être : « Pourquoi un autre tutoriel sur le LaTeX alors qu'il y a tant de vidéos sur Youtube ? » | ||
+ | |||
+ | Et ma réponse serait la suivante : après avoir regardé d' | ||
+ | |||
+ | En matière de composition, | ||
+ | |||
**Last issue, we explored more basic concepts, one of them was tagging with labels. We can dive into the nuances of fonts and columns if there is interest, but for now, we soldier on. If you recall, we spoke about tagging your images with fig:2 or whatever, but instead of a figure, we tagged a section. The reason was that I wanted to further explore the issue of images and common mistakes in a totally separate tutorial. | **Last issue, we explored more basic concepts, one of them was tagging with labels. We can dive into the nuances of fonts and columns if there is interest, but for now, we soldier on. If you recall, we spoke about tagging your images with fig:2 or whatever, but instead of a figure, we tagged a section. The reason was that I wanted to further explore the issue of images and common mistakes in a totally separate tutorial. | ||
Place your cursor on a new line and this time go to the “wizards” menu item and choose: insert graphic. Follow the prompts to get your ‘code’ filled in for you. Compile (F6)... What went wrong? Should a wizard not just work? You are welcome to google/ | Place your cursor on a new line and this time go to the “wizards” menu item and choose: insert graphic. Follow the prompts to get your ‘code’ filled in for you. Compile (F6)... What went wrong? Should a wizard not just work? You are welcome to google/ | ||
+ | |||
+ | Dans le dernier numéro, nous avons exploré des concepts de base, notamment l' | ||
+ | |||
+ | Placez votre curseur sur une nouvelle ligne et, cette fois, allez dans l' | ||
+ | Je vais également couvrir - vous laisser faire/faire - les erreurs les plus courantes que les débutants font. | ||
+ | |||
**Explanation: | **Explanation: | ||
Ligne 14: | Ligne 27: | ||
The wizard will automatically use the picture’s name as a label, so you can save yourself a lot of time by changing the names of your pictures beforehand. However, I have no picture of snoopy displayed (I used a picture of snoopy). Instead I have a black block. This is the “demo”.** | The wizard will automatically use the picture’s name as a label, so you can save yourself a lot of time by changing the names of your pictures beforehand. However, I have no picture of snoopy displayed (I used a picture of snoopy). Instead I have a black block. This is the “demo”.** | ||
+ | |||
+ | Explication : | ||
+ | |||
+ | Le LaTeX est très « geek ». C'est comme un langage de programmation. Vous ne pouvez pas utiliser d' | ||
+ | |||
+ | L' | ||
+ | |||
**Go back, remove the “[demo]” from that line, and use the wizard again. When you compile your document, you will be greeted by a new error. TL;DR – you need to specify a path to a directory that has your images. The full path in the \includegraphics{} statement does not work. *(Even when they say so.) This also has to be added in the pre-processor space at the top. Here again, I was met with frustration, | **Go back, remove the “[demo]” from that line, and use the wizard again. When you compile your document, you will be greeted by a new error. TL;DR – you need to specify a path to a directory that has your images. The full path in the \includegraphics{} statement does not work. *(Even when they say so.) This also has to be added in the pre-processor space at the top. Here again, I was met with frustration, | ||
TIP: When using images in your Latex documents, I suggest you make a separate folder for them. ** | TIP: When using images in your Latex documents, I suggest you make a separate folder for them. ** | ||
+ | |||
+ | Revenez en arrière, supprimez le « [demo] » de cette ligne et utilisez à nouveau l' | ||
+ | |||
+ | ASTUCE : Lorsque vous utilisez des images dans vos documents LaTeX, je vous suggère de créer un dossier séparé pour celles-ci. | ||
+ | |||
**Check the type of image you are adding as currently it can be only a .png, a .jpg, or a .pdf file. | **Check the type of image you are adding as currently it can be only a .png, a .jpg, or a .pdf file. | ||
Ligne 31: | Ligne 56: | ||
This is why I recommend making a “Figures” folder in your current working folder and dumping your pictures there. This used to trip me up when I was trying to get to grips with LaTeX. Now that you have made the mistake with me, hopefully this will stick.** | This is why I recommend making a “Figures” folder in your current working folder and dumping your pictures there. This used to trip me up when I was trying to get to grips with LaTeX. Now that you have made the mistake with me, hopefully this will stick.** | ||
+ | |||
+ | Vérifiez le type d' | ||
+ | |||
+ | Respirez profondément, | ||
+ | |||
+ | |||
+ | \begin{figure} | ||
+ | \includegraphics{Figures/ | ||
+ | \caption{} | ||
+ | \label{figure: | ||
+ | \end{figure} | ||
+ | |||
+ | C'est pourquoi je recommande de créer un dossier « Figures » dans votre dossier de travail actuel et d'y déposer vos images. C'est ce que je faisais souvent lorsque j' | ||
+ | |||
**Now, when you click on run, you should see “Process exited normally”, | **Now, when you click on run, you should see “Process exited normally”, | ||
Ligne 37: | Ligne 76: | ||
It is always a good idea to use a larger image than needed as it will show in the end product’s quality. We can restrain our image thus: Inside your square brackets, type “w” and the word “width=” should appear with two of the most common options. Choose “linewidth” and hit F5. ** | It is always a good idea to use a larger image than needed as it will show in the end product’s quality. We can restrain our image thus: Inside your square brackets, type “w” and the word “width=” should appear with two of the most common options. Choose “linewidth” and hit F5. ** | ||
+ | |||
+ | Maintenant, lorsque vous cliquez sur exécuter, vous devriez voir « Process exited normally » (Traitement terminé normalement), | ||
+ | |||
+ | En fonction de la taille de votre image, si vous ne fournissez aucune option, l' | ||
+ | |||
+ | C'est toujours une bonne idée d' | ||
+ | |||
**What happened to your image? We have no lines in our document yet, so our line width is 0. This is another common mistake you need to watch out for. Hover your mouse cursor over the word “linewidth” and read the tool tip carefully. | **What happened to your image? We have no lines in our document yet, so our line width is 0. This is another common mistake you need to watch out for. Hover your mouse cursor over the word “linewidth” and read the tool tip carefully. | ||
Ligne 46: | Ligne 92: | ||
Looking better already! Another popular option is angle. This can be a positive or negative integer. Since you are reading FCM, I have no doubt you know how angles work, so I will leave that to you to play with. ** | Looking better already! Another popular option is angle. This can be a positive or negative integer. Since you are reading FCM, I have no doubt you know how angles work, so I will leave that to you to play with. ** | ||
- | **My image is currently at the top, what if I want it at the bottom? Right next to \begin{figure} simply add a [b] thus: | + | Qu' |
+ | Comment faire pour ramener notre image à une taille plus gérable ? Il suffit de spécifier la hauteur et la largeur en centimètres. Ajoutez ce qui suit entre les crochets et appuyez de nouveau sur F5 : | ||
+ | height=3cm, | ||
+ | C'est déjà mieux ! Une autre option appréciée est l' | ||
+ | |||
+ | |||
+ | **My image is currently at the top, what if I want it at the bottom? Right next to \begin{figure} simply add a [b] thus: | ||
\begin{figure}[b] | \begin{figure}[b] | ||
Ligne 60: | Ligne 112: | ||
You may have noticed that I added a caption and a label. By default, if you drag the image in, it will use the name of the file in here, be sure to change it to something useful.** | You may have noticed that I added a caption and a label. By default, if you drag the image in, it will use the name of the file in here, be sure to change it to something useful.** | ||
+ | |||
+ | Mon image est actuellement en haut, que faire si je la veux en bas ? Juste à côté de \begin{figure} ajoutez simplement un [b] ainsi : | ||
+ | |||
+ | \begin{figure}[b] | ||
+ | \includegraphics[height= 3cm, | ||
+ | \caption{C' | ||
+ | \label{fig: | ||
+ | \end{figure} | ||
+ | |||
+ | Cela placera votre image en bas de la page (PAS à la fin de votre texte). Si vous voulez qu' | ||
+ | |||
+ | Vous avez peut-être remarqué que j'ai ajouté une légende et une étiquette. Par défaut, si vous faites insérer l' | ||
+ | |||
**Add a section and copy the following code to reference your image (as you type /ref{ TeXstudio should fill in the image reference for you). | **Add a section and copy the following code to reference your image (as you type /ref{ TeXstudio should fill in the image reference for you). | ||
Ligne 76: | Ligne 141: | ||
If you have any comments or queries, email us: misc@fullcirclemagazine.org** | If you have any comments or queries, email us: misc@fullcirclemagazine.org** | ||
+ | |||
+ | Ajoutez une section et copiez le code suivant pour référencer votre image (lorsque vous tapez /ref{, TeXstudio devrait remplir la référence de l' | ||
+ | |||
+ | \section A | ||
+ | |||
+ | Comme vous pouvez le voir dans la figure \ref{fig: | ||
+ | |||
+ | Appuyez à nouveau sur F5 pour voir votre travail artistique. | ||
+ | |||
+ | Il est maintenant facile de faire référence à n' | ||
+ | |||
+ | J' | ||
+ | |||
+ | Rejoignez-nous dans le prochain numéro pour plus de LaTeX, où nous nous attaquerons à d' | ||
+ | |||
+ | Si vous avez des commentaires ou des questions, envoyez-nous un courriel à l' | ||
issue169/latex.1622815293.txt.gz · Dernière modification : 2021/06/04 16:01 de d52fr