TransWikia.com

How to typeset the following equation?

TeX - LaTeX Asked by Yourong 'DZR' Zang on December 6, 2020

How do writers typeset their equations of the form (EQUATION), (WORDS)(EQUATION), where the latter part usually serves as a condition or explanations?

For example,
example

Is the only way of doing this to write something like
$$begin{…};;;text{ for some }gamma…$$?

2 Answers

The idea is that, yes. However it's better to use a predefined spacing command rather than arbitrary rows of ; commands (that are for different things).

You can improve your style by using some personal command: I defined Mat for a set of matrices (with an upright M) and ZZ for the integers.

The reason for the indirect definition is that if you have several number sets to deal with, just changing the main command numberset to use, say, mathbf, you'll get all number sets updated and don't need to change each one of them.

enter image description here

documentclass{article}
usepackage{amsmath,amssymb}

DeclareMathOperator{Mat}{M}
newcommand{numberset}[1]{mathbb{#1}}
newcommand{ZZ}{numberset{Z}}

begin{document}

begin{equation*}
begin{bmatrix} P  Q end{bmatrix}
= gamma begin{bmatrix} omega_1/N + Lambda  omega_2/N + Lambda end{bmatrix}
quadtext{for some $gamma in Mat_2(ZZ/NZZ)$}
end{equation*}

end{document}

Don't use text{M}: it is wrong in this context; for example, the M would be in italic in the statement of a theorem. Also tag is for a very different purpose and should not be abused.

Correct answer by egreg on December 6, 2020

If you meant for the equation to be in display mode, you can use tag*. For example:

documentclass[preview]{standalone}
usepackage{amssymb}
usepackage{amsmath}

begin{document}
This is an equation:
[
begin{bmatrix}
    P 
    Q
end{bmatrix}
= gamma
begin{bmatrix}
    omega_1/N + Lambda 
    omega_2/N + Lambda 
end{bmatrix}
tag*{for some $gamma in text{M}_2(mathbb{Z}/N mathbb{Z})$}
]
end{document}

The above code yields:

Minimal working example

Note that tag* does not include parentheses. To include surrounding parentheses in the tagged remark, remove the asterisk from the command (i.e., use tag).

As an aside, avoid using $$...$$ in display math mode, as it is heavily discouraged. See here and here for very good explanations why.

Answered by John on December 6, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP