Fonts & Character SetsDraw Color and Fill Color of a Bullet Symbol

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
leandroponsoni
Posts: 2
Joined: Fri Jun 14, 2013 12:12 pm

Draw Color and Fill Color of a Bullet Symbol

Post by leandroponsoni »

Hi everybody,

My name is Leandro. I already used this forum a lot of times to solve some "problems". At this time I didn't find the answer.

I would like to add some \bullet in my text. But I want bullets with different draw color and fill color (like Matlab does, for example see attachment).

Does anybody know how to do this (if it is possible)?

Thank you very much for your help.
Attachments
Some examples of what I want to do.
Some examples of what I want to do.
bullet-example.png (708 Bytes) Viewed 20314 times
Last edited by localghost on Fri Jun 14, 2013 4:29 pm, edited 2 times in total.

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Draw Color and Fill Color of a Bullet Symbol

Post by localghost »

Create a new symbol by graphical packages like PGF/TikZ or PSTricks. And perhaps some background information about the purpose of this new symbol could be helpful. The final solution might depend on that.


Best regards and welcome to the board
Thorsten
leandroponsoni
Posts: 2
Joined: Fri Jun 14, 2013 12:12 pm

Draw Color and Fill Color of a Bullet Symbol

Post by leandroponsoni »

Hello Thorsten,

Thank you very much for your help. I appreciated a lot your tip. I didn't know the packages pgf/TikZ. And it looks like a really powerful tool.

I am posting the solution, maybe can help others.

Code: Select all

\documentclass{article}
\usepackage{tikz}

\newcommand{\newsymbol}{
\begin{tikzpicture}
\filldraw[fill=black,draw=yellow] circle (3pt);
\end{tikzpicture}
}

\begin{document}
  Um simples teste \newsymbol.
\end{document}
Or use \protect\newsymbol inside of the figure captions.

Regards.
Last edited by localghost on Fri Jun 14, 2013 7:59 pm, edited 1 time in total.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Draw Color and Fill Color of a Bullet Symbol

Post by localghost »

In case you need a more flexible command for bullets with different colors, try something like this.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{tikz}

%% Macro for a bullet symbol with two mandatory arguments
%% #1: draw color
%% #2: fill color
%% for color names see the »xcolor« manual
\newcommand*{\tikzbullet}[2]{%
  \setbox0=\hbox{\strut}%
  \begin{tikzpicture}
    \useasboundingbox (-.25em,0) rectangle (.25em,\ht0);
    \filldraw[draw=#1,fill=#2] (0,0.5\ht0) circle[radius=.25em];
  \end{tikzpicture}%
}

\begin{document}
  A variety of colored bullets:
  \tikzbullet{orange}{green}
  \tikzbullet{blue}{lime}
  \tikzbullet{cyan}{yellow}
  \tikzbullet{red}{teal}.
\end{document}
Attachments
tmp.png
tmp.png (2.35 KiB) Viewed 20293 times
Post Reply