I want to get the following "1.", "2." and "3." The color is "RoyalBlue" from the package xcolor, option [dvipnames], and I also want a custom font for it (other than Computer Modern). Also some more vertical space if it's possible. Thanks!
Asked
Active
Viewed 274 times
0
karlkoeller
- 124,410
Furfurr
- 79
2 Answers
5
With the enumitem package is easy... Please refer to its documentation to know how the label, ref and font options work.
\documentclass{article}
\usepackage[dvipsnames]{xcolor}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[label=\arabic*.,ref=\arabic*,font=\color{RoyalBlue}\usefont{T1}{utm}{b}{n}]
\item text\label{pippo}
\item text
\item text
\end{enumerate}
We are referring to item \ref{pippo}.
\end{document}
In this case, without further info,
\usefont{T1}{utm}{b}{n}
selects the Times font in boldface.
BTW: the right option to select the RoyalBlue color is dvipsnames...
If you also want to act on the items separation use the itemsep option (in the following MWE I've exaggerated with 1.5em):
\documentclass{article}
\usepackage[dvipsnames]{xcolor}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[label=\arabic*.,ref=\arabic*,font=\color{RoyalBlue}\usefont{T1}{utm}{b}{n},itemsep=1.5em]
\item text\label{pippo}
\item text
\item text
\end{enumerate}
We are referring to item \ref{pippo}.
\end{document}
EDIT
If you want to use CG Omega as a font (I've downloaded roman and bold faces from https://fontzone.net/) you can use lualatex and declare, e.g.:
\newfontfamily{\CGOmega}{CG Omega}
Then you can set
font=\color{RoyalBlue}\CGOmega\bfseries
as in the following MWE (compile with lualatex):
\documentclass{article}
\usepackage{fontspec}
\usepackage[dvipsnames]{xcolor}
\usepackage{enumitem}
\newfontfamily{\CGOmega}{CG Omega}
\begin{document}
\begin{enumerate}[label=\arabic*.,ref=\arabic*,font=\color{RoyalBlue}\CGOmega\bfseries]
\item text\label{pippo}
\item text
\item text
\end{enumerate}
We are referring to item \ref{pippo}.
\end{document}
karlkoeller
- 124,410
2
Like this, with enumitem?:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{classico}
\usepackage{amsmath}
\usepackage[dvipsnames]{xcolor}
\usepackage{enumitem}
\usepackage{lipsum}
\begin{document}
\lipsum[11]
\begin{enumerate}[label=\arabic*., ref=\arabic*, wide=0pt, font=\color{RoyalBlue}\bfseries\classico]%
\item A first example. A first example. A first example. A first example. A first example. A first example. See \ref{mylabel}.
\item $ \bigl(√{a}\bigr)² = a$.
\item $ √{a² }=\lvert a\rvert $. \label{mylabel}
\end{enumerate}
\end{document}
Bernard
- 271,350
-
Hmm... I think the font in my picture is CG Omega. How can I set that font for the enumeration? – Furfurr May 13 '17 at 12:46
-
If this font doesn't have LaTeX support, you can use it with
\fontspecandxelatex. Other than that, the font used for enumeration in your image looks similar toURW-Classicowhich has LaTeX support. – Bernard May 13 '17 at 13:30





enumerate-environment or something else? You should at least provide the basics of a document. A MWE begins at\documentclassand\end{document}. Also do you usepdflatex,xelatexorlualatex? – Skillmon May 13 '17 at 11:53