Colour and links · Couleurs et liens
Adding colour
- The
xcolorpackage lets you colour text. Load it, then wrap words:
- Built-in names include
red,blue,green,orange,gray, and more.
Ajouter de la couleur
- Le package
xcolorte permet de colorer du texte. Charge-le, puis entoure les mots :
\usepackage{xcolor}
...
\textcolor{red}{This is red} and \textcolor{blue}{this is blue}.
- Les noms intégrés incluent
red,blue,green,orange,gray, etc.
Highlights and your own colours
\colorbox{yellow}{text}puts a highlight behind the words.- You can even mix your own:
\textcolor{red!60}{...}is 60% red (lighter).
Surlignages et tes propres couleurs
\colorbox{yellow}{text}met un surlignage derrière les mots.- Tu peux même mélanger tes propres couleurs :
\textcolor{red!60}{...}est 60% rouge (plus clair).
Clickable links
- The
hyperrefpackage turns cross-references and web addresses into clickable links:
- Load
hyperreflast in your preamble — it likes to have the final word.
Liens cliquables
- Le package
hyperreftransforme les références croisées et les adresses web en liens cliquables :
\usepackage{hyperref}
...
Visit \href{https://ctan.org}{CTAN} for packages.
- Charge
hyperrefen dernier dans ton préambule — il aime avoir le dernier mot.
Common mistakes
- Load
xcolorfor colour andhyperreffor clickable links. - Load
hyperreflast among your packages.
Erreurs courantes
- Charge
xcolorpour la couleur ethyperrefpour les liens cliquables. - Charge
hyperrefen dernier parmi tes packages.
Load xcolor, then make the word warning red with \textcolor{red}{warning}. You need both the package and the command. · Chargez xcolor, puis rendez le mot warning rouge avec \textcolor{red}{warning}. Vous avez besoin du package et de la commande.
Make a clickable link. Load hyperref, then turn the word CTAN into a link with \href{https://ctan.org}{CTAN}. Load hyperref last in the preamble. · Créez un lien cliquable. Chargez hyperref, puis transformez le mot CTAN en lien avec \href{https://ctan.org}{CTAN}. Chargez hyperref en dernier dans le préambule.