6

enter image description here

I am new to LaTeX. I want to create a new symbol shown as in the figure. Please somebody help me to create this symbol. I am writing my thesis.

  • 6
    Welcome to TeX.SE! Please what should that symbol mean? How should it be used? Like a sum? More informations would be helpful! – Mensch Sep 29 '14 at 11:33
  • Might this be for a Zener diode on a circuit diagram? If so, which package are you using to create your circuit diagrams? – Paul Gessler Sep 29 '14 at 11:48
  • Try circuitikz here or circuit_macros here. But Zener diode does not look like that, the "diode triangle" is missing in your drawing see here. – Václav Pavlík Sep 29 '14 at 12:02
15

A version lighter than using TikZ:

\documentclass{article}
\usepackage{pict2e}

\DeclareRobustCommand{\kumarsymbol}{%
  \begingroup\setlength{\unitlength}{\fontcharht\font`A}%
  \begin{picture}(.5,1)
  \roundcap
  \put(0,1){\line(2,-1){.25}}
  \put(.25,.875){\line(0,-1){.75}}
  \put(.25,.125){\line(2,-1){.25}}
  \end{picture}%
  \endgroup
}

\begin{document}
A\kumarsymbol B

\LARGE A\kumarsymbol B
\end{document}

enter image description here

One can modify the line thickness and the angles in quite an easy way, see the documentation of pict2e.

10

If you are using pdfTeX, you can draw the symbol using PDF elementary commands and set it as the PDF form (this is like subroutine in PDF, the drawing commands are not repeated at the every instance of the symbol in PDF file).

\def\drawmysymbol{\pdfliteral{q 1 J 0 8 m 3 5 l 3 1 l 6 -2 l S Q}}
\setbox0=\hbox to8bp{\kern1bp\vrule height9bp depth3bp width0bp \drawmysymbol\hss}
\pdfxform0 \mathchardef\mysymbolA=\pdflastxform
\def\mysymbol{\pdfrefxform\mysymbolA}

And the test: here is \mysymbol.

draw symbol

The main point of this method is that you can draw arbitrary symbol (if you know the PDF elementary commands) and you can set it as a character (i.e. the drawing commands are not repeated in the output PDF). Moreover, the argument of \pdfliteral can be copied from the output of Inkscape (EPS format), thus you can create your character by interactive editor.

  • Why not do this and prefer picture or tikzpicture? For ensuring portability, for instance. – egreg Sep 29 '14 at 12:49
  • 3
    @egreg tikzpicture needs to load 26 thousands lines of code. I needn't them if I need to draw only refracted line (this takes only 18 characters of PDF code, see above). And portability: almost all output is in PDF today so PDF code is sufficiently portable. An if you need to output to the PostScript, then there is simple PostScript re-definition of PS operators so PostScript can read this PDF code. Inkscape uses this method, for example. – wipet Sep 29 '14 at 13:01
  • 1
    Of course, XeTeX doesn't understand \pdfliteral. But I'm using the \def\pdfliteral#1{\special{pdf:literal #1}} and XeTeX does understand \pdfliteral after this definition. This is only little modification. – wipet Sep 29 '14 at 14:16
  • 1
    "loading a package no matter how big it is, is definitely not an issue...". But there are 10times more lines in log file (there are 59 inputted files, each file is one line, when tikz is loaded). Users will not read such log file, they tend to ignore warnings (about underfull etc.). And if some tracing is needed, there is huge amount of information, human can read it only with difficulties. IMHO it is better to do things simple when they can be done simple. – wipet Sep 29 '14 at 14:37
  • 1
    @percusse I wish they know how to make it simpler. This is a reason why I spend time here at tex.sx.com. – wipet Sep 29 '14 at 21:08
7

Please give us more information about the meaning and its usage. I searched the unicode for you and the most similar would be the U+23B1. This symbol is quite curly, but with the font Code222 it could be acceptable. You will have to compile my MWE with Xe- or LuaLaTeX.

I made the symbol applicable for math- and text-mode. Further improvements can be done when having more information.

The symbol is called \rmoustache in unicode-math. You can use this with the font XITS. I commented these lines out, as it is even more curly than the Code2000 version.

% arara: lualatex

\documentclass{article}
\usepackage{fontspec}
\usepackage{mathtools}
%\usepackage{unicode-math}
\newcommand*\strangeSymbol{{\fontspec{code2000.ttf}\ensuremath{\text{\symbol{"23B1}}}}}

\begin{document}
\strangeSymbol $\strangeSymbol$
%\setmathfont{XITS Math} % even more curly version
%$\rmoustache$
\end{document}

enter image description here


If you are using the XITS or Asana Math font, you may produce a symbol in their very style by combining two angle symbols. Very hackish, very hard-coded, very ugly...

% arara: lualatex

\documentclass{article}
\usepackage{mathtools}
\usepackage{unicode-math}
\usepackage{graphicx}

\begin{document}
    \setmathfont{XITS Math}
    \(
    \begin{array}{c}
    \mkern-8.6625mu\reflectbox{\rotatebox{-90}{$\wideangledown$}}\\[-2.2pt]
    \mkern+8.6625mu\rotatebox{90}{$\wideangleup$}
    \end{array}
    \)
    \setmathfont{Asana Math}
    \(
    \begin{array}{c}
    \mkern-3.1425mu\reflectbox{\rotatebox{-90}{$\wideangledown$}}\\[-2.5pt]
    \mkern+3.1425mu\rotatebox{90}{$\wideangleup$}
    \end{array}
    \)
\end{document}

enter image description here

enter image description here

4

A pretty simple solution can be achieved with the tikz package.

\documentclass{article}
\usepackage{tikz}
\newcommand\mysymbol{%
  \tikz[scale=.3]{\draw[very thick] (0,0) to ++(330:.5) to ++(0,-1) to ++(330:.5);}%
} 

\begin{document}
Two single \mysymbol and \mysymbol .
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.