2

In the code below, I wanted to change the default color of the itemize bullet from black to blue with a shadow. Can you help me accomplish this?

Here is the code:

\documentclass{book}
\usepackage{enumitem}
\usepackage{amsmath,amsfonts,amssymb,amsthm, bm}
\usepackage{xcolor}

\begin{document}
\begin{itemize}[label={$\blacktriangleright$}]
\item First item in the list
\item Second item
\item and so on
\end{itemize}
\end{document}
5

A solution using no new packages, only xcolor.

You can add shadow to any symbol or text using the command created here, \ourshadow.

enter image description hereOutput

Code

\documentclass{book}
\usepackage{enumitem}
\usepackage{amsmath,amsfonts,amssymb,amsthm, bm}
\usepackage{xcolor}

\newlength{\tmpShadow}
\newcommand{\ourShadow}[2]{%
    \settowidth{\tmpShadow}{#1}
    \addtolength{\tmpShadow}{.1em}
    \raisebox{-0.25ex}{\textcolor{gray!70}{#1}}%
    \kern-\tmpShadow%
    \textcolor{#2}{#1}%
}

\begin{document}
\begin{itemize}[label={\ourShadow{$\blacktriangleright$}{blue!80}}]
\item First item in the list
\item Second item
\item and so on
\end{itemize}



\end{document}
4

Here are two options using tikz:

enter image description here

Code:

\documentclass{book}
\usepackage{enumitem}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{shadows}

\newcommand*{\MyShadow}{\tikz \draw [baseline, fill=blue,draw=blue,circular drop shadow] circle (2pt);}
\newcommand*{\MyBall}{\tikz \draw [baseline, ball color=red, draw=red] circle (2pt);}

\begin{document}

\begin{itemize}[label={\MyShadow}]
\item First item in the list
\item Second item
\end{itemize}
\begin{itemize}[label={\MyBall}]
\item First item in the 
\item Second item
\end{itemize}
\end{document}

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.