Outils pour utilisateurs

Outils du site


issue180:latex

Ceci est une ancienne révision du document !


Somehow, just before moving 1000km, I backed up my drive and reinstalled my laptop. I was using a pre-release of Voyager Linux and some things were just broken, even after the updates. Though the 12-part series was complete, I cannot find the rest up to the time of writing this. I acknowledge some of you would like to get to the rest of the series, so it will continue. Currently, I cannot go and rewrite the last four parts like I did with the blender series. I just do not have the time. Even my cycling has taken a back seat this year as I try to catch up with my new job. But there is good news, you will have to get to the end to read it, so what are you waiting for? Fire up your LaTeX editor and let’s start! When it comes to typesetting, LaTeX is the undisputed champ. Boika, Boika… It outweighs its opponents in the sheer number of options alone. At first, LaTeX is a bit confusing, and difficult to use. Not to scare you, but I suggest looking here: http://tug.ctan.org/info/symbols/comprehensive/symbols-a4.pdf By now you have settled on an editor, and I will not introduce another. What I will be touching on in this issue is alignment. We looked at basic mathematical placing last issue, but what if you need to do some chemical equations that span multiple lines? Yes, I know all of our readers are budding rocket scientists, just bear with me. Do you still remember how to span multiple lines? If not, quickly grab the last issue, I’ll wait. Right, now that we are on the same page, the trick is the ampersand (“&”). Now that you know the secret, let’s play with it.

D'une façon ou d'une autre, juste avant de déménager de 1000 km, j'ai sauvegardé mon disque et réinstallé mon ordinateur portable. J'utilisais une pré-version de Voyager Linux et certaines trucs étaient tout simplement cassé, même après les mises à jour. Bien que la série de 12 parties soit terminé, je n'arrive pas à trouver le reste jusqu'au moment d'écrire ces lignes. Je sais que certains d'entre vous aimeraient avoir le reste de la série et elle va donc continuer. Actuellement, je ne peux pas récrire les quatre dernières parties. Je néglige même le vélo cette année pendant que j'essaie de me mettre au niveau de mon nouveau boulot. Mais il y a une bonne nouvelle, mais vous devez aller jusqu'au bout afin de pouvoir la lire, alors qu'est-ce que vous attendez ? Lancez votre éditeur LaTeX et commençons !

Lorsqu'il s'agit de la composition, LaTeX est le champion incontesté. Hip, hip hourrah… Il surclasse ses rivaux ne serait-ce qu'avec le très grand nombre d'options. Au départ, LaTex est un peu déroutant et difficile à utiliser. Je ne veux pas vous effrayer, mais je suggère de regarder ici : http://tug.ctan.org/info/symbols/comprehensive/symbols-a4.pdf

Let us build on what we already have, and add an alignment section (top right).

When you run this, you will notice that, even though I purposely misaligned the two lines in the code (look at the spaces too), they align perfectly in the output. This works with bigger symbols too, like the summation. Go on, try it out. Even if you just add another line, do it, you will remember it better. This will work with however many lines you give it. If you paid any attention to your output, you may have noticed that there are numbers next to your equations, so you can reference them later. What if we don’t want these? Add this bit of code and see what it does:

\subsection{Without} \[

E = mc^2

\]

You need to be sure when to use brackets, braces, or parentheses. Mixing them will cause all kinds of havoc on your document.

The last thing I want to touch on is \left & \right, this will position a number to that side of a symbol.

Quickly add this code in place of whatever there was in your \begin{equation} -section:

\begin{equation}

z =\left .x^{2}
\right\rvert^{y}_{z}

\end{equation}

Now peruse the output. Try changing something, like removing the \right. What happened?

Since going any deeper is beyond newbie territory, I will leave you here. If you have ADHD, now you can squirrel!

There is an honourable mention here, namely the algorithm package, specifically the algorithm2e and the algorithmic packages. We as computer people use algorithms a lot. (Don’t be mistaken, you can use it for recipes or todo lists too, no lie!).

From the next issue onwards, Robert will be taking over the LaTex tutorials, and should I come across WHERE I stashed the rest of the series, I will send them to Ronnie so he can put it out there for you completionists.

issue180/latex.1651760371.txt.gz · Dernière modification : 2022/05/05 16:19 de auntiee