Closer slanted parallel symbol

by Sebastiano   Last Updated September 11, 2019 22:23 PM

Looking the @egreg's answer where I have deleted some parts of code

\documentclass[12pt]{article}
\newcommand{\parallelsum}{\mathbin{\!/\mkern-5mu/\!}}
\begin{document}
$AB \parallelsum CD$
\end{document}

I would to change the classical symbol of \parallel

enter image description here

to obtain another same symbol of parallel

enter image description here

where the slanted should not be above and below the two red lines, are closer to each other and are in line with the text, in mathematical mode in both subscript and overscript mode. If there's already a symbol like this I'm searching for even better for me.



Answers 1


Raise and scale.

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

\makeatletter
\newcommand{\newparallel}{\mathrel{\mathpalette\[email protected]\relax}}
\newcommand{\[email protected]}[2]{%
  \begingroup
  \sbox\[email protected]{$#1T$}% get the height of an uppercase letter
  \resizebox{!}{\ht\[email protected]}{\raisebox{\depth}{$\[email protected]#1/\mkern-5mu/$}}%
  \endgroup
}
\makeatother

\begin{document}

$AB\newparallel CD$

$\scriptstyle AB\newparallel CD$

\end{document}

enter image description here

egreg
egreg
September 11, 2019 22:15 PM

Related Questions


Redefining symbol midway through a document

Updated March 31, 2019 19:23 PM

an \underhat and \underwidehat

Updated May 02, 2015 22:10 PM

Creating \simrightarrow with ooalign

Updated May 18, 2019 06:23 AM

Custom Math Symbol - Two Sigma Sums

Updated May 01, 2017 17:23 PM

Customized root

Updated December 18, 2017 06:23 AM