tikz add tag
I am working on some documents/books (Related to Mechanical Engineering). I found that there is no package that could be used for Geometric Dimensioning & Tolerancing symbols and Feature Control Frame.

[Upon Googling for- I found a thread on Stack Exchange 
https://tex.stackexchange.com/questions/53471/how-to-create-geometry-tolerance-symbols-with-tikz) but it didn't helped much.

***Problem Statement:***

I want to create a package that contains all these symbols (One can call these symbols directly or through Feature Control Frame, as mentioned below) -


Feature Control Frame are these box structure containing symbols (shown above), numbers & alphabets.

These are of 3 types-


**Type 1**

**Similarly, Type 2**

**Similarly, Type 3**

**Combination Type**

I am still new to LaTeX, so I have almost zero experience with creating a style file & use of TikZ Package. Could someone here please guide me how to solve this problem.

Once this is done, I will move on to Welding, hydraulic & pneumatic Symbols etc. (I want to create package & submit it on CTAN for the community).


-Taneja Parvesh 


Top Answer
### Preface:

Using Ti*k*Z to draw symbols is both rather slow[^1] and also adds a lots of dependencies to a document. I would only follow the approach for symbols which are not available in another way (I'm saying this as someone who wrote a couple packages using Ti*k*Z).


You're question is very broad, but maybe this short example could be a starting point. 

I'm defining one symbol which will scale with the surrounding font, but also allows the user to pass the common Ti*k*Z options to the macro. I also added an option to draw it with or without the surrounding square. 




Test \mysymbol

\Huge \textcolor{red}{Test \mysymbol[noframe]}

Test \mysymbol[scale=2]



\ProvidesPackage{test}[2021/08/23 v0.1 test package]



  % Pass unknown keys on to tikz
  /test/.search also={/tikz,/pgf},
  noframe/.code= \test@noframetrue,

      % store scaling factor from https://topanswers.xyz/tex?q=819#a965
        \path[line width=\test@scalingfactor*0.4pt] (0,0) rectangle ++ (1.5ex,1.5ex);
        \draw[line width=\test@scalingfactor*0.4pt] (0,0) rectangle ++ (1.5ex,1.5ex);
      \draw[line width=\test@scalingfactor*0.4pt] (0.75ex,0.75ex) circle [radius=0.6ex];
      \draw[line width=\test@scalingfactor*0.4pt] (0.15ex,0.15ex) -- (1.35ex,1.35ex);


![Screenshot 2021-08-23 at 18.16.00.png](/image?hash=f64d0626545f3182bc9f2d925ab48dd505cc9f60e3053b25214f8a8a8c09ea98)

[^1]: Unless you have magic killer bunny skills and can write packages like [xistercian](https://ctan.org/pkg/xistercian)

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.