10

Symbols that have to do with the brakes of a car, from dashboard indicators to the sticker on the braking fluid reservoir, all have a common theme of a circle surrounded by two curved lines. From this website:

car brake symbols

I would like to draw the first symbol (black on white), but can't find the Unicode character for it. DeTeXify also doesn't know it. How do I draw this simple figure inline with \tikz{ }?

Bonus points if you can recreate the other symbols without the size of the circle changing. For the symbol with dashed lines, it'd be interesting to know how to get three dashes consistently, rather than relying on TikZ's default of not caring about one endpoint.


Edit: For what it's worth, here's a snippet that can be used to test whether your solution affects the whitespace around the current line.

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

\begin{document}

\noindent This is the first line.\\
The brake symbol \tikz{ ??? } can be found on your dashboard.\\
This is the third line.\\
This is the fourth line.

\end{document}
5
  • 4
    \draw[delta angle=90] (0,0) circle[radius=1] (-45:1.2) arc[start angle=-45, radius=1.2] (135:1.2) arc[start angle=135, radius=1.2]; would be a start, i.e. a circle and two arcs. Then you can draw further stuff inside the circle. Do you need this to be a node? What troubles do you have drawing them yourself? Commented Aug 13, 2023 at 14:20
  • @Qrrbrbirlbel I'm only familiar with drawing electrical diagrams in circuitikz and very basic TikZ otherwise. As far as I know, you'd want the circle to be a node to be able to put symbols (e.g. text) inside of it easily, correct?
    – Mew
    Commented Aug 13, 2023 at 16:48
  • 1
    Downvoter: please specify what is wrong with this question. These types of questions are usually accompanied by at least one comment about how the poster should have tried DeTeXify. I did my due diligence. Giving an MWE like \usepackage{tikz} \begin{document} \end{document} is clearly pointless too.
    – Mew
    Commented Aug 13, 2023 at 16:50
  • 4
    Having been neutral so far: in a nutshell, this site values own attempts, manifested in code. No code, no vote. No "do it for me, please". // Wrt Tikz I suggest to review the 4 tutorials at the beginning of the pgfmanual several times: almost all you need for a start (and more) is presented there. // With circuitikz experience you should be able to make Qrrbirlbel's code run and add more to it.
    – MS-SPO
    Commented Aug 13, 2023 at 17:03
  • 3
    @Mew A mwe like \usepackage{tikz} \begin{document} \end{document} is far from pointless. It helps people to get a feeling on how much you already know and tailor their answers accordingly. It also saves them from typing these boring bits for the millionth time. Commented Aug 13, 2023 at 18:55

3 Answers 3

17

Here is a macro \brake[<tikz styles>]{content} that will produce your symbols. The <tikz styles> are optional but can include color, line patterns, etc. The height of the symbols can be adjusted by changing \newcommand{\brakeheight}{3mm}.

enter image description here

\documentclass{article}

\usepackage{tikz}

\newcommand{\brakeheight}{3mm} % height of symbols
\newcommand{\brake}[2][]{\tikz[font=\sffamily]{
    \draw[#1, solid] circle[radius=.5*\brakeheight];
    \draw[line cap=round, #1] (-45:.6*\brakeheight)arc(-45:45:.6*\brakeheight) (135:.6*\brakeheight)arc(135:225:.6*\brakeheight);
    \node[#1, inner sep=0pt, scale={.85*\brakeheight/max(width("#2"), height("#2"), 1)}]{#2}
}}

\begin{document}

Previous line.

Inline \brake{!} \brake[orange]{ABS} \brake{} \brake[dash pattern=on 2pt off 1pt]{} symbols.

Following line.

\end{document}
11

Using the heatmark shape from the ext.shapes.heatmark library of my tikz-ext package we can recreate these symbols with two tweaks.

The lightning symbol is taken from the marvosym package, the show symbol is from twoemojis. Maybe you can find a better symbol somewhere. If needed, we could put a separate drawing inside the symbol but I don't want to find a shoe path now.


For now, the symbols are sized acoording to the inner sep of 0.15em and a content of AAA in the font \sffamily (see node font as well as the text … keys inside the definition of mew/brake symbol).

The !, ↯ and 👟 are sized manually and will ignore any font setting of the node or the text outside of TikZ. Depending on your use-case, we will have to find a more flexible solution.

Code

\documentclass[varwidth]{standalone}
\usepackage{tikz, marvosym, twemojis}
\usetikzlibrary{ext.shapes.heatmark}
\pgfset{% a few hacks
  no quick fill/.code=\def\pgfusepathqfill{\pgfusepath{fill}},
  no fill/.code=\def\pgfusepathqfill{\pgfusepath{}}}
\tikzset{
  mew/brake symbol/.style={
    shape=heatmark, draw, line width={#1}, inner sep=+.15em, outer sep=+0pt,
    heatmark arcs=2, heatmark arc width={#1}, heatmark arc sep={#1},
    heatmark arc rings=1, heatmark arc sep angle=90,
    heatmark inner opacity=1, heatmark outer opacity=1,
    /pgf/heatmark ring 1/.append style={% needs /pgf/
      no quick fill, /tikz/rounded corners={(#1)/2}},% needs /tikz/
    node font=\sffamily, align=center,
    text width=width("AAA"), text height=height("A"), text depth=+0pt},
  mew/brake symbol/.default=1.5pt,
  mew/use brake symbol/.cd, .is choice,
  empty/.style={mew/brake symbol, node contents=},
  ESP/.style  ={mew/brake symbol, node contents=ESP},
  ABS/.style  ={mew/brake symbol, node contents=ABS},
  RBS/.style  ={mew/brake symbol, node contents=RBS},
  !/.style    ={mew/brake symbol, node contents=\raisebox{-.5ex}{\bfseries\LARGE!}},
  lightning/.style={mew/brake symbol,
    node contents=\raisebox{-.6ex}{\bfseries\LARGE\Lightning}},
  shoe/.style     ={mew/brake symbol,
    node contents=\raisebox{1.9ex}{\rotatebox{-80}
      {\scalebox{-1.8}[1.8]{\twemoji{man’s shoe}}}}},
  hand brake/.style={
    mew/brake symbol, node contents=,
    heatmark arcs=12, heatmark arc sep angle=6,
    /utils/mew/no heatmark arc/.list={3, 4, 5, 9, 10, 11}},
  /utils/mew/no heatmark arc/.style={/pgf/heatmark arc #1/.append style=no fill}}
\newcommand*\brakesymbol[2][]{%
  \tikz[baseline, trim left=(@.west), trim right=(@.east)]
    \node(@)[anchor=base,mew/use brake symbol={#2},#1];}
\begin{document}
\foreach \Type in {empty, ESP, ABS, RBS, !, hand brake, lightning, shoe}{%
  \Type: \brakesymbol{\Type}\par}
\end{document}

Output

enter image description here

2
  • How feasible is it to make the gap as wide as the arc, as in the reference image?
    – Mew
    Commented Aug 14, 2023 at 13:03
  • @Mew The distance between circle and arcs is controlled by heatmark arc sep. Maybe 1.5*(#1) is a better approach. Commented Aug 14, 2023 at 13:41
6

A minimal solution that doesn't support content inside the circle nor three-dash arcs, inspired by Qrrbrbirlbel's comment (with different arc radii and with downscaling for inline use):

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

\newcommand{\brake}{\hspace{-0.5pt}\tikz[scale=0.15,baseline=-0.3em]{\draw[delta angle=90] (0,0) circle[radius=1] (-45:1.35) arc[start angle=-45, radius=1.35] (135:1.35) arc[start angle=135, radius=1.35];}}

\begin{document}

\noindent This is the first line.\\
The brake symbol \brake{} can be found on your dashboard.\\
This is the third line.\\
This is the fourth line.

\end{document}

Output: output

2
  • 3
    Move your M(not)WE inside your question.
    – projetmbc
    Commented Aug 13, 2023 at 17:46
  • 1
    Yes, that was my thought too. Question == Problem, Answer == Solution.
    – MS-SPO
    Commented Aug 13, 2023 at 17:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .