2

I refer to my period when I was in University. I think that the usual symbols for writing that a divide b or that a not divide b are those of this compilable example.

\documentclass[a4paper,12pt]{article}
\usepackage{amssymb}
\begin{document}
\[a\mid b, \quad a\nmid b\]
\end{document}

enter image description here

I remember that the vertical bar was drawn longer and with smaller letters like this drawing, all in proportion, of course.

enter image description here

Are there specific packages with LaTeX that automatically create this type of approach different from the standard one?

2

Here is how to do it with package leftidx and, dor the negated version, stackinset from stackengine:

\documentclass{article}
\usepackage{leftidx}
\usepackage{stackengine, graphicx}
\newcommand{\divides}[2]{\leftidx{^{#1}}{\Big\vert}{_{#2}}}
\newcommand{\ndivides}[2]{\leftidx{^{#1}}{\nBigvert}{_{#2}}}

 \newcommand{\nBigvert}{\stackMath\mathord{\stackinset{l}{0.15ex}{c}{0ex}{\rotatebox{45}{$\relbar $}}{\Big\vert}}}

\begin{document}

$\divides{\mathsf{a}\mkern-1.5mu}{\mathsf{b}}\quad \ndivides{\mathsf{b}\mkern-1.5mu}{\mathsf{a}}$

\end{document} 

enter image description here

|improve this answer|||||

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.