# Formatting of coordinates?

In case I want to describe the pixels of a picture with cartesian coordinates, how would I properly typeset the coordinates? Is p_\mathrm{x}, p_\mathrm{y} correct or rather c_x, c_y? x and y represent the global cartesian coordinates -- again: italic or not?

• Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. – doncherry Jun 11 '12 at 22:38
• Related Question: Typesetting coordinates. – Peter Grill Jun 11 '12 at 22:38
• I think this is a matter of style, but I think the x and y should be italic (as in $c_x$) as then the association with $x$ is clear. – Peter Grill Jun 11 '12 at 22:41

I’ll always set them in italic since they are kind of variables. The upright font is used for constant values like Euler’s e etc., functions like the Sine or texts like “min”, “max” which are available as macros (\min and \max)*, “start” or “eff[ective]” In the latter case I recommend to use the \text macro from amsmath (or via mathtools).

* See Count Zero’s comment

Some examples

p_x = 3.5
p_\text{max} = 4
p_{x,\text{max}} = 5
p_\text{min} = \mathrm{e}
p_0 = \sin(\pi)
t_\text{start} = 2\,\mathrm{s}% better use siuntix!
U_\text{eff} = U_0/\sqrt{2}% I recommend to define \newcommand{\eff}{\text{eff}} to use
u_\eff = U_0/\sqrt{2} Just a thought: I wonder why you need the p? I’d use $x=1$ and $y=2$ or $\vec{p}=(1,2)$ if using p as a vector I’d “access” it’s coordinates–like you did–with p_x and p_y.

• Thank you for your answer. Programatically this is what I actually do. But I am visualizing my approach and there it is necessary to depict a second coordinate system. My thought was to put 'x' and 'y' upright in the indexes, since they serve more as a comment and less as a variable. – Peter Pablo Jun 12 '12 at 7:17
• @PeterPablo: Hm … if they are comments and if this is clearly for the reader I guess it’s possible to set them upright, but I’d prefer the in italic though. In my eyes they are always kinde of variable. I’d even type  the $xy$ coordinate system not the xy coordinate system – Tobi Jun 12 '12 at 7:35
• I think this is more of a nitpicker's comment, but I'd rather use \max, \min, etc. in the indices instead of \text{max}, \text{min}. Typographically it may be the same, but from a markup point of view, I think it's rather different. Hope you don't mind... :) – Count Zero Jun 12 '12 at 8:08
• @CountZero: Thanks. I didn’t know these commands ... – Tobi Jun 12 '12 at 8:18