Fonts & Character SetsThe Bullet in Other Colours

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
marie2011
Posts: 138
Joined: Mon Feb 06, 2012 4:58 pm

The Bullet in Other Colours

Post by marie2011 »

Dear forum members,

I was wondering if it is possible to have "bullets" (\textbullet) in blue, but not in black, as they tend to appear in a document.

Many thanks in advance.

Regards,

Marie

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

The Bullet in Other Colours

Post by Stefan Kottwitz »

Hi Marie,

you can easily define your own macro with color:

Code: Select all

\usepackage{color}
\newcommand*{\bluebullet}{\textcolor{blue}{\textbullet}}
Use the xcolor package if you would like to have more color names or features.

Stefan
LaTeX.org admin
marie2011
Posts: 138
Joined: Mon Feb 06, 2012 4:58 pm

The Bullet in Other Colours

Post by marie2011 »

Hi Stefan,

Many thanks for your prompt answer. Everything works fine now. I was wondering if it is possible to change the color and make it similar to the bullets I get with the color “seahorse” in beamer. Another question I have is if it is possible to separate a bit more the bullet from the text.

Here is my minimal working example:

Code: Select all

\documentclass[10pt]{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[spanish,ngerman,catalan,english]{babel}
\usepackage{pdfpages}
\usefonttheme[stillsansserifsmall]{serif}
\usefonttheme{structuresmallcapsserif}
\usetheme{Pittsburgh}
\usecolortheme{seahorse}
\setbeamertemplate{footline}[frame number]
\beamertemplatenavigationsymbolsempty
\usepackage{color}
\newcommand*{\bluebullet}{\textcolor{blue}{\textbullet}}
\begin{document}
\begin{frame}
\bluebullet This bullet should have the same colour as the bullets in
the following items and have a bigger distance between the bullet and the text.
Some Items:
\begin{itemize}
\item First Item
\item Second Item
\item Third Item
\end{itemize}
\end{frame}
\end{document}

Many thanks in advance.

Regards,

Marie
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

The Bullet in Other Colours

Post by Stefan Kottwitz »

You can use the them item color via \usebeamercolor, and add some space as desired, for example ~ for a non-breaking space, as I think you don't want a line break after the bullet:

Code: Select all

\newcommand*{\bluebullet}{{\usebeamercolor[fg]{item}{\textbullet~}}}
Stefan
LaTeX.org admin
marie2011
Posts: 138
Joined: Mon Feb 06, 2012 4:58 pm

The Bullet in Other Colours

Post by marie2011 »

Hello Stefan,

Many thanks for your answer.

When I try this new command I get the following error:

Code: Select all

[
--- TeX said ---
! File ended while scanning use of \@argdef.
--- HELP ---
No help available


Here is my minimal example:

Code: Select all

\documentclass[10pt]{beamer}
 \usepackage[T1]{fontenc}
 \usepackage[utf8]{inputenc}
 \usepackage[spanish,ngerman,catalan,english]{babel}
 \usepackage{pdfpages}
 \usepackage{tabularx}
\usepackage{tabu}
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{amsfonts}

\usepackage{color}

%\newcommand*{\bluebullet}{\textcolor{blue}{\textbullet}}
 


\newcommand*{\bluebullet}{{\usebeamercolor[fg]{item}{\textbullet~}}}



\usefonttheme[stillsansserifsmall]{serif}
\usefonttheme{structuresmallcapsserif}
\usetheme{Pittsburgh}
%\usecolortheme{whale}
\usecolortheme{seahorse}

\setbeamertemplate{footline}[frame number]


\beamertemplatenavigationsymbolsempty



\addto{\captionsspanish}{%
      \renewcommand*{\tablename}{Tabla}
    }




\begin{document}
\newcommand*\numer{N"o}


\selectlanguage{spanish}

\begin{frame}
  \titlepage
\end{frame}


\frame{
	\frametitle{{\'I}ndice}
	\tableofcontents
	[pausesections]
}



\begin{frame}
\bluebullet
\end{frame}
\end{document}


Many thanks in advance.

Regards,

Marie
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

The Bullet in Other Colours

Post by Stefan Kottwitz »

The tilde ~ is a shortcut in babel with Spanish. Either replace it by \ (backslash and whitespace) or use the es-notilde option to disable the shortcut, especially if there could be further issues with ~:

Code: Select all

\usepackage[spanish,es-notilde,ngerman,catalan,english]{babel}
Stefan
LaTeX.org admin
marie2011
Posts: 138
Joined: Mon Feb 06, 2012 4:58 pm

Re: The Bullet in Other Colours

Post by marie2011 »

Thanks for your prompt answer, Stefan

Everything works fine now :-)

Regards,

Marie
Post Reply