1

Suppose I have a formula like y/x, and I want to say that x must be greater than zero.

In well-printed literature, you'd see something like

y/x ; x > 0

with just the correct amount of spacing between the formula, the semicolon, and the constraint.

I'm keen not to hardcode those spacings and am sure LaTeX can do it for me. But how?

(Currently, I use $$\frac{y}{x} \hspace{0.5in}; x \geq 0$$)

6
  • What do you mean by correct amount of spacing?
    – user11232
    Apr 2, 2015 at 8:52
  • Statistically speaking, the most typographically pleasing. LaTeX is much better than me at doing this.
    – Bathsheba
    Apr 2, 2015 at 8:52
  • Is this OK? \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{aligned} &y/x; && x>0 \end{aligned} \end{equation} \end{document}
    – user11232
    Apr 2, 2015 at 8:55
  • 1
    LaTeX can't guess everything: the most typographically pleasing spacing for LaTeX is perhaps not so pleasing, or not so pleasing to you. Anyway, typical typographical spacings are \quad and \qquad, respectively ‘quadrat’ which lengths depend on the font in use, and ‘double quadrat’. You may use one of them instead of \hspace{0.5in}. Apr 2, 2015 at 10:11
  • 1
    in the example you show, the space around the semicolon looks like the space for a relation. even if it isn't, this input would produce that spacing: $ y/x \mathrel{;} x > 0 $ Apr 2, 2015 at 12:15

1 Answer 1

2

When in doubt, don't hesitate to use natural-language words rather than terse symbolism to express a side condition, a thought, etc. For instance:

enter image description here

(Since x is in the denominator, x>0 seems more appropriate than x\geq 0...)

\documentclass{article} 
\begin{document}
\dots\ $y/x$, with $x > 0$.
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .