Pigpen-like symbol for =

You can use pict2e. I took the parameters from pigpen.mf.

\documentclass{article}
\usepackage{pigpen,pict2e}

\DeclareRobustCommand{\pigpenver}{%
  \begingroup\pigpenfont
  \setlength{\unitlength}{1em}%
  \begin{picture}(1,1)
  \linethickness{0.09\unitlength}
  \roundcap
  \polyline(0.16667,0.16667)(0.16667,0.83333)
  \polyline(0.83333,0.16667)(0.83333,0.83333)
  \end{picture}%
  \endgroup
}
\DeclareRobustCommand{\pigpenhor}{%
  \begingroup\pigpenfont
  \setlength{\unitlength}{1em}%
  \begin{picture}(1,1)
  \roundcap
  \linethickness{0.09\unitlength}
  \polyline(0.16667,0.16667)(0.83333,0.16667)
  \polyline(0.16667,0.83333)(0.83333,0.83333)
  \end{picture}%
  \endgroup
}

\begin{document}

X{\pigpenfont E}X\pigpenhor\pigpenver X

{\pigpenfont E}

\pigpenhor{\pigpenfont BC}

\pigpenver{\pigpenfont BC}

\end{document}

enter image description here

A possibly better interface:

\documentclass{article}
\usepackage{pigpen,pict2e,xparse}

\NewDocumentCommand{\pigpenver}{}{%
  \begingroup\pigpenfont
  \setlength{\unitlength}{1em}%
  \begin{picture}(1,1)
  \linethickness{0.09\unitlength}
  \roundcap
  \polyline(0.16667,0.16667)(0.16667,0.83333)  
  \polyline(0.83333,0.16667)(0.83333,0.83333)
  \end{picture}%
  \endgroup
}
\NewDocumentCommand{\pigpenhor}{}{%
  \begingroup\pigpenfont
  \setlength{\unitlength}{1em}%
  \begin{picture}(1,1)
  \roundcap
  \linethickness{0.09\unitlength}
  \polyline(0.16667,0.16667)(0.83333,0.16667)  
  \polyline(0.16667,0.83333)(0.83333,0.83333)
  \end{picture}%
  \endgroup
}

\ExplSyntaxOn
\NewDocumentCommand{\pp}{m}
 {
  \group_begin:
  \pigpenfont
  \tl_map_inline:nn { #1 }
   {
    \str_case:nnF { ##1 }
     {
      {h}{\pigpenhor}
      {v}{\pigpenver}
     }
     {##1}
   }
  \group_end:
 }
\ExplSyntaxOff



\begin{document}

\pp{ABCDEFGHIJKLMNOPQRSTUVWXYZhv}

\pp{hLUCASv}

\verb|\pp{h}| $\to$ \pp{h}

\verb|\pp{v}| $\to$ \pp{v}

\end{document}

enter image description here

Just to show the result is as expected (maybe up to some pixels), here's what I get from

\pp{E}\llap{\color{red}\pp{h}}

\pp{h}\llap{\color{red}\pp{E}}

enter image description here

If you need the symbol are at the baseline (the font designer decided to have them raised), change the definition of \pp in the last code to

\NewDocumentCommand{\pp}{m}
 {
  \group_begin:
  \pigpenfont
  \raisebox{-0.16667em}
   {
    \tl_map_inline:nn { #1 }
     {
      \str_case:nnF { ##1 }
       {
        {h}{\pigpenhor}
        {v}{\pigpenver}
       }
       {##1}
     }
  }
  \group_end:
 }

so the input

ABC\pp{hLUCASv}DEF

would produce

enter image description here

You can also define a different syntax for the symbols; I use the order “right-bottom-left-top”, so rb means “right-bottom” filled and “left-top” empty. This way, you don't need to remember the letter corresponding to a given combination.

\documentclass{article}
\usepackage{pigpen,pict2e,xparse}

\NewDocumentCommand{\pigpenver}{}{%
  \begingroup\pigpenfont
  \setlength{\unitlength}{1em}%
  \begin{picture}(1,1)
  \linethickness{0.09\unitlength}
  \roundcap
  \polyline(0.16667,0.16667)(0.16667,0.83333)  
  \polyline(0.83333,0.16667)(0.83333,0.83333)
  \end{picture}%
  \endgroup
}
\NewDocumentCommand{\pigpenhor}{}{%
  \begingroup\pigpenfont
  \setlength{\unitlength}{1em}%
  \begin{picture}(1,1)
  \roundcap
  \linethickness{0.09\unitlength}
  \polyline(0.16667,0.16667)(0.83333,0.16667)  
  \polyline(0.16667,0.83333)(0.83333,0.83333)
  \end{picture}%
  \endgroup
}

\ExplSyntaxOn
\NewDocumentCommand{\pp}{m}
 {% 'l b r t' is the order
  \group_begin:
  \pigpenfont
  \raisebox{-0.16667em}
   {
    \clist_map_inline:nn { #1 }
     {
      \str_case:nn { ##1 }
       {
        {bt}{\pigpenhor}
        {lr}{\pigpenver}
        {br}{A}
        {lbr}{B}
        {lb}{C}
        {brt}{D}
        {lbrt}{E}
        {lbt}{F}
        {rt}{G}
        {lrt}{H}
        {lt}{I}
       }
     }
  }
  \group_end:
 }
\ExplSyntaxOff

\begin{document}

ABC\pp{lr,br,lrt,lt,bt}DEF

\end{document}

enter image description here


Here, I introduce \pigpenXXXX where XXXX is some combination of 0 and 1 that signify strokes on the left, top, right, bottom (i.e., clockwise starting on left). Stroke length and width are defined by \rlln and \rlwd, respectively. The symbols are defined to sit on the baseline.

Naturally, one could define letters like \def\ppA{\pigpen0011}, etc.

EDITED to make suitable for use in math mode, though it will also function in text mode.

\documentclass{article}
\usepackage{stackengine}
\newlength\rlln
\newlength\rlwd
\newlength\brlwd
\newlength\trlwd
\newlength\lrlwd
\newlength\rrlwd

\rlwd=.5pt
\rlln=5pt
\def\bstr{\rule{\rlln}{\brlwd}\rule{0pt}{\rlwd}}
\def\tstr{\rule{\rlln}{\trlwd}\rule{0pt}{\rlwd}}
\def\lstr{\ooalign{\rule{\lrlwd}{\rlln}\cr\rule{\rlwd}{0pt}}}
\def\rstr{\ooalign{\rule{\rrlwd}{\rlln}\cr\rule{\rlwd}{0pt}}}
\def\gap{\rule{\dimexpr\rlln-2\rlwd}{0pt}}
\def\pigpen#1#2#3#4{\kern1pt% FOUR ARGUMENTS ARE LEFT, TOP, RIGHT, BOTTOM STROKES
  \brlwd=#4\rlwd\relax%
  \trlwd=#2\rlwd\relax%
  \lrlwd=#1\rlwd\relax%
  \rrlwd=#3\rlwd\relax%
  \stackengine{\dimexpr\rlln-\rlwd}{%
    \stackengine{0pt}{\bstr}{\lstr\gap\rstr}{O}{c}{F}{F}{L}%
  }{\tstr}{O}{c}{F}{F}{L}\kern1pt%
}
\begin{document}
$x\pigpen0011 \pigpen1011 \pigpen1001 \pigpen0111
\pigpen1111 \pigpen1101 \pigpen0110 \pigpen1110
\pigpen1100 \pigpen1010 \pigpen0101 y$
\end{document}

enter image description here

UPDATE:

The OP requested a version with rounded endcaps. To do so, I use my custom style file roundrule.sty, found exclusively at the end of this answer:

Is there such a thing as a `\mathrule`? (rounded endcaps)

I then modify my above answer to use round rules instead of rules. I probably need to update roundrule.sty, because I found that if one of the rule dimensions is 0pt, it still outputs a thin line. To circumvent that problem for this answer, I perform a check on the roundrule dimensions.

\documentclass{article}
\usepackage{stackengine,roundrule}
\newlength\rlln
\newlength\rlwd
\newlength\brlwd
\newlength\trlwd
\newlength\lrlwd
\newlength\rrlwd
\newcommand\rrule[2]{\ifdim#1>0pt\relax\ifdim#2>0pt\relax\roundrule{#1}{#2}\else\fi\else\fi}

\rlwd=.5pt
\rlln=5pt
\def\bstr{\rrule{\rlln}{\brlwd}\rule{0pt}{\rlwd}}
\def\tstr{\rrule{\rlln}{\trlwd}\rule{0pt}{\rlwd}}
\def\lstr{\ooalign{\rrule{\lrlwd}{\rlln}\cr\rule{\rlwd}{0pt}}}
\def\rstr{\ooalign{\rrule{\rrlwd}{\rlln}\cr\rule{\rlwd}{0pt}}}
\def\gap{\rule{\dimexpr\rlln-2\rlwd}{0pt}}
\def\pigpen#1#2#3#4{\kern1pt% FOUR ARGUMENTS ARE LEFT, TOP, RIGHT, BOTTOM STROKES
  \brlwd=#4\rlwd\relax%
  \trlwd=#2\rlwd\relax%
  \lrlwd=#1\rlwd\relax%
  \rrlwd=#3\rlwd\relax%
  \stackengine{\dimexpr\rlln-\rlwd}{%
    \stackengine{0pt}{\bstr}{\lstr\gap\rstr}{O}{c}{F}{F}{L}%
  }{\tstr}{O}{c}{F}{F}{L}\kern1pt%
}
\begin{document}
$x\pigpen0011 \pigpen1011 \pigpen1001 \pigpen0111
\pigpen1111 \pigpen1101 \pigpen0110 \pigpen1110
\pigpen1100 \pigpen1010 \pigpen0101 y$
\end{document}

enter image description here


I assume the symbol you look for doesn't exist. From this topic \bot like symbol with two horizontal lines, I build your expected symbol:

\documentclass{article}
\usepackage{amsmath,trimclip}

\makeatletter
\DeclareRobustCommand{\Equ}{%
  \mathord{\vphantom{\textendash}\mathpalette\mich@Equ\relax}%
}
\newcommand{\mich@Equ}[2]{%
  \ooalign{%
    $\m@th#1\textendash$\cr
    {\raisebox{1.\height}{$\m@th#1\textendash$}}\cr
  }%
}
\makeatother

\begin{document}

$\Equ$

$\scriptstyle \Equ$

$\scriptscriptstyle \Equ$

\end{document}

Edit:

This update permits to have the same lines for all the symbols you need. It uses MnSymbol package where some of these symbols are already implemented

Symbols

\documentclass{article}
\usepackage{amsmath,trimclip}
\usepackage{MnSymbol}

\makeatletter
\DeclareRobustCommand{\Equ}{%
  \mathord{\vphantom{\textendash}\mathpalette\mich@Equ\relax}%
}
\newcommand{\mich@Equ}[2]{%
  \ooalign{%
    {\raisebox{.5\height}{$\m@th#1\minus$}}\cr
    {\raisebox{-.5\height}{$\m@th#1\minus$}}\cr
  }%
}
\DeclareRobustCommand{\Ver}{%
  \mathord{\vphantom{\medvert}\mathpalette\mich@Ver\relax}%
}
\newcommand{\mich@Ver}[2]{%
  \ooalign{%
    $\m@th#1\,\:\medvert\!\medvert$
  }%
}
\makeatother

\begin{document}

\begin{equation}
\begin{array}{cl}
\lefthalfcap & \verb|\lefthalfcap| \\
\lefthalfcup & \verb|\lefthalfcup| \\
\righthalfcap & \verb|\righthalfcap| \\
\righthalfcup & \verb|\righthalfcup| \\
\sqcup & \verb|\sqcup| \\
\sqcap & \verb|\sqcap| \\
\Equ & \verb|\Equ| \\
\Ver & \verb|\Ver| \\
\end{array}
\end{equation}

\end{document}

Tags:

Fonts

Symbols