1

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?

emmett
  • 113
  • Welcome to TeX.SX! Can you provide more information on the context? I don't know this way of noting –  Apr 13 '15 at 21:12
  • 1
    What's important is that you use correct commands, so your source looks like \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
  • As suggested in http://tex.stackexchange.com/a/117035/39306 use \bigm|. – Name Apr 13 '15 at 21:21
  • @Name I was trying to add an expression to a prezi presentation and to make this happen I wrote latex to a site and get image url.I had tried \bigm| before asking but it was too big. I didnt understand why it does work now :) – emmett Apr 13 '15 at 21:38

2 Answers2

1

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.

0
\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}$
Manuel
  • 27,118