1

A quick question: Is there a way to insert in LaTex a lowercase z, inside $$, with an additional horizontal line between the two existed parallel lines? The desired letter (symbol) looks like enter image description here

Any suggestions?

Schweinebacke
  • 26,336

3 Answers3

3

I would recommend to use a font, that provides such a character. But if you want, you can fake it:

\documentclass{article}
\newcommand*{\specialz}{z\kern\mbox{-}.37em-\relax}
\begin{document}
z vs. \specialz

\large z vs. \specialz

\Large z vs. \specialz

\LARGE z vs. \specialz

\huge z vs. \specialz

\Huge z vs. \specialz

\normalsize
\sffamily

z vs. \specialz

\large z vs. \specialz

\Large z vs. \specialz

\LARGE z vs. \specialz

\huge z vs. \specialz

\Huge z vs. \specialz

\normalfont\normalsize But avoid: $\specialz_{\specialz}$
\end{document}

result

However, this solution is font depending and the math mode should be handled separately. So again: Better use a font that provides the wanted symbol.

Schweinebacke
  • 26,336
3

You could use \ooalign to overlay a rule on the z in math or text mode.

\documentclass{article}

\newcommand{\mathz}{\ooalign{$z$\cr\hfil\rule[.5ex]{.2em}{.06ex}\hfil\cr}}
\newcommand{\textz}{\ooalign{z\cr\hfil\rule[.5ex]{.2em}{.1ex}\hfil\cr}}

\begin{document}
z\textz$z\mathz$
\end{document}

You can adjust the length (.2em), height (.5ex) and thickness (.06ex in math or .1ex in text) of the rule to your liking. Note the em and ex units so the rule will adjust with the size of the character (e.g., using scriptsize).

enter image description here

Sandy G
  • 42,558
2

Draw a rule across the letter, at mid height.

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\newcommand{\cz}{% crossed z
  \mathord{\mathpalette\vaggelis@z{z}}%
}
\newcommand{\cZ}{% crossed Z
  \mathord{\mathpalette\vaggelis@z{Z}}%
}
\newcommand{\vaggelis@z}[2]{%
  \sbox\z@{$\m@th#1#2$}%
  \ooalign{%
    $\m@th#1#2$\cr
    \hidewidth
    \vrule height \dimexpr.5\ht\z@+0.03ex\relax
           depth -\dimexpr.5\ht\z@-0.03ex\relax
           width .5\wd\z@
    \hidewidth\cr
  }%
  \vphantom{\box\z@}
}
\makeatother

\begin{document}

$\cz+z_{\cz}<\cZ+Z_{\cZ}$

\Huge

$\cz+z_{\cz}<\cZ+Z_{\cZ}$

\end{document}

enter image description here

egreg
  • 1,121,712