Colour and links · Cor e 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.
Adicionando cor
- O pacote
xcolorpermite colorir texto. Carregue-o, depois envolva palavras:
\usepackage{xcolor}
...
\textcolor{red}{This is red} and \textcolor{blue}{this is blue}.
- Nomes embutidos incluem
red,blue,green,orange,graye muitos outros.
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).
Destaquês e suas próprias cores
\colorbox{yellow}{text}coloca um fundo de destaque atrás das palavras.- Você pode até misturar as suas:
\textcolor{red!60}{...}é 60% vermelho (mais claro).
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.
Links clicáveis
- O pacote
hyperreftransforma referências cruzadas e endereços web em links clicáveis:
\usepackage{hyperref}
...
Visit \href{https://ctan.org}{CTAN} for packages.
- Carregue
hyperrefpor último no seu preâmbulo — ele gosta de ter a última palavra.
Common mistakes
- Load
xcolorfor colour andhyperreffor clickable links. - Load
hyperreflast among your packages.
Erros comuns
- Carregue
xcolorpara cor ehyperrefpara links clicáveis. - Carregue
hyperrefpor último entre seus pacotes.
Load xcolor, then make the word warning red with \textcolor{red}{warning}. You need both the package and the command. · Carregue xcolor, depois faça a palavra warning ficar vermelha com \textcolor{red}{warning}. Você precisa tanto do pacote quanto do comando.
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. · Faça um link clicável. Carregue hyperref, depois transforme a palavra CTAN em um link com \href{https://ctan.org}{CTAN}. Carregue hyperref por último no preâmbulo.