0

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!

enter image description here

  • 1
    Should this be the numbering of an enumerate-environment or something else? You should at least provide the basics of a document. A MWE begins at \documentclass and \end{document}. Also do you use pdflatex, xelatex or lualatex? – Skillmon May 13 '17 at 11:53
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} 

enter image description here

  • 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 \fontspec and xelatex. Other than that, the font used for enumeration in your image looks similar to URW-Classico which has LaTeX support. – Bernard May 13 '17 at 13:30
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} 

enter image description here

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}

enter image description here


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}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.