Quantcast
Viewing latest article 27
Browse Latest Browse All 95

custom list bullets with tikz

I'm trying to make my own bullets for itemized and enumerated lists. I'm rather surprised that latex has not properly been developed on this point. By default the first level is a round bullet, but if \sfdefault is set it will be a small square. To change it back to the round bullet one has to use $\bullet$. And the second level is --.Using instead \blacksquare does not fit nicely with the size of the previous level.

Here is my mwe: The goal of this post is to get from users nice rounded bullets without excessive size.

\documentclass[a4paper]{article}\usepackage{pifont,enumitem,tikz}\newcommand*\circled[1]{\tikz[baseline=-.75ex]{%  \node[shape=circle,minimum size=2.6ex,draw,inner sep=1pt,font=\tiny] (char) {#1};}}\renewcommand*\bullet{\tikz{%  \fill[fill=black] (0,0) circle [radius=.43ex];}}\newcommand*\square{\tikz{%  \fill[fill=black] (0,0) rectangle (.9ex,.9ex);}}\setlist[enumerate]{label=\protect\circled{\arabic*}}\setlist[itemize,1]{label=\bullet}\setlist[itemize,2]{label=\square}\begin{document}\renewcommand{\familydefault}{\sfdefault}\begin{enumerate}  \item un  \item deu    \begin{itemize}      \item deuzième niveau      \item ...    \end{itemize}  \item tro  \item qua  \item cin    \begin{itemize}      \item deuzième niveau      \item ...    \end{itemize}  \item six  \item sep  \item hui  \item neu  \item dix  \item onz  \item dou\end{enumerate}\begin{itemize}  \item un  \item deu    \begin{itemize}      \item deuzième niveau      \item ...    \end{itemize}  \item trois\end{itemize}\end{document}

Viewing latest article 27
Browse Latest Browse All 95

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>