Colour and links
עמוד זה דורש דפדפן עדכני (תומך ב-SharedArrayBuffer). אנא עדכן את Chrome, Edge, Firefox או Safari לגרסה העדכנית ביותר.
English
Adding colour
- The
xcolorpackage lets you colour text. Load it, then wrap words:
\usepackage{xcolor}
...
\textcolor{red}{This is red} and \textcolor{blue}{this is blue}.
- Built-in names include
red,blue,green,orange,gray, and more.

English
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).
English
Clickable links
- The
hyperrefpackage turns cross-references and web addresses into clickable links:
\usepackage{hyperref}
...
Visit \href{https://ctan.org}{CTAN} for packages.
- Load
hyperreflast in your preamble — it likes to have the final word.
English
Common mistakes
\textcolorwithoutxcolor. LaTeX stops with! Undefined control sequence.- A misspelt colour name.
\textcolor{rd}{...}gives! Package xcolor Error: Undefined color 'rd'. - Loading
hyperrefearly. Other packages can then break its links. Load it last in the preamble.
רמת קושי 2/5 · 140 מטבעות + בונוס קטן בהשלמה הראשונה היום
עומס xcolor, then make the word warning red with \textcolor{red}{warning}. You need both the package and the command.
לחץ הרצה כדי להרכיב ולהציג מראות את הקובץ.
רמת קושי 2/5 · 140 מטבעות + בונוס קטן בהשלמה הראשונה היום
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.
לחץ הרצה כדי להרכיב ולהציג מראות את הקובץ.
רמת קושי 2/5 · 140 מטבעות + בונוס קטן בהשלמה הראשונה היום
Highlight the word Note with a yellow background using \colorbox{yellow}{Note}. xcolor is already loaded.
לחץ הרצה כדי להרכיב ולהציג מראות את הקובץ.