I want to write something like $|X|||G|$ but it is not clear that order of X divides order of G. How can I make this right?
2 Answers
As someone who would otherwise be using the "divides" symbol all the time in similar situations, I find that it simply isn't a very appropriate symbol to use once you start using other vertical bars. (I use the vertical bar in set comprehension carefully for exactly the same reason.)
Really, you should instead be writing something like $\lvert G \rvert \in \lvert X \rvert \mathbb Z$, or (much better still!) we have $\lvert G \rvert = m \lvert X \rvert$ for some $m \in \mathbb Z$, which after all is what you really mean. There's no need to fight too hard to express everything as compactly as possible if it makes your math difficult to parse.
- 14,253
\documentclass{scrartcl}
\usepackage{mathtools}
\DeclarePairedDelimiter\ord{\lvert}{\rvert}
\providecommand\divides{} % Trick used because \divides is defined with some packages
\renewcommand*\divides{\mathrel{|}} % If you want it bigger by default use \mathrel{\big|}
\begin{document}
$\ord{X} \divides \ord{G}$
\end{document}
In case you want it to be always, by default, a little bit bigger, use \renewcomand*\divides{\mathrel{\big|}}. Now, that's the general case; but what if you want to change it just this time (or in any other particular occasion)? I think the most acceptable way is to use \bigm| (or any size, \biggm|, etc.) instead of \divides.
$\ord{X} \bigm| \ord{G}$
- 27,118
\ord{X} \divides \ord{G}. Once you have that, it's easy to change its behaviour. I would us just the default, or may be enlarge a little bit the “divides” symbol (may be with manual handling in this case\ord{X} \bigm| \ord{G}). – Manuel Apr 13 '15 at 21:12\bigm|. – Name Apr 13 '15 at 21:21