Colour and links · Цвет и ссылки
Adding colour
- The
xcolorpackage lets you colour text. Load it, then wrap words:
- Built-in names include
red,blue,green,orange,gray, and more.
Добавление цвета
- Пакет
xcolorпозволяет раскрашивать текст. Подключите его, а затем оберните слова:
\usepackage{xcolor}
...
\textcolor{red}{This is red} and \textcolor{blue}{this is blue}.
- Встроенные названия включают
red,blue,green,orange,grayи другие.
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).
Подсветка и собственные цвета
\colorbox{yellow}{text}добавляет подсветку под слова.- Можно даже смешать свой собственный:
\textcolor{red!60}{...}— это 60% красного (более светлый).
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.
Кликабельные ссылки
- Пакет
hyperrefпревращает перекрёстные ссылки и веб-адреса в кликабельные ссылки:
\usepackage{hyperref}
...
Visit \href{https://ctan.org}{CTAN} for packages.
- Подключайте
hyperrefв последнюю очередь в преамбуле — он любит быть последним словом.
Common mistakes
- Load
xcolorfor colour andhyperreffor clickable links. - Load
hyperreflast among your packages.
Распространенные ошибки
- Подключите
xcolorдля цвета иhyperrefдля кликабельных ссылок. - Подключайте
hyperrefв последнюю очередь среди ваших пакетов.
Load xcolor, then make the word warning red with \textcolor{red}{warning}. You need both the package and the command. · Подключите xcolor, затем сделайте слово warning красным с помощью \textcolor{red}{warning}. Вам понадобятся и пакет, и команда.
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. · Создайте кликабельную ссылку. Подключите hyperref, затем превратите слово CTAN в ссылку с помощью \href{https://ctan.org}{CTAN}. Подключайте hyperref в самом конце преамбулы.