2
$\begingroup$

In a recent answer I typeset the following expression:

$$\cos x\left.\right|_{-\pi/4}^0$$

(I used \cos x\left.\right|_{-\pi/4}^0)

I thought it looked funny on the page, but I wasn't sure it would look funny to anyone else, and I couldn't articulate to myself what about it looked bad. I think it has something to do with the way the lower limit sticks out. But I'm sure that using \frac\pi4 there instead would be much worse.

Clarification: I don't think MathJax is the culprit here; I think it did just what I asked for. My question is whether I asked for the right thing, in the same sense that $\cos x\left.\right|_{-\pi/4}^0$ is closer to the right thing than $\cos x\left.\right|_{-\frac\pi4}^0$ is.

Does anyone have any thoughts about this?

$\endgroup$
  • $\begingroup$ Can you provide a link please? $\endgroup$ – Asaf Karagila Nov 26 '13 at 20:48
  • $\begingroup$ Yes, but it occurs to me that I may not have made my question clear. I am not suggesting that MathJax messed up here; I'm asking how I should tell MathJax to typeset this kind of expression. $\endgroup$ – MJD Nov 26 '13 at 20:50
  • 1
    $\begingroup$ This doesn't address the main question (placement of limits) but it might be better to use \left[ and \right] for these expressions, in terms of both typesetting and clarity. Using a \right something without a \left of the same thing is abusive, in my opinion. $\endgroup$ – Trevor Wilson Nov 27 '13 at 3:54
  • $\begingroup$ The folks at tex.stackexchange.com may have some useful opinions on this. In my experience they have a good eye for aesthetics as well as technical correctness. $\endgroup$ – Rahul Nov 28 '13 at 17:02
3
$\begingroup$

In extreme cases like this, I think it is okay to be a bit hackish. You could make the bar taller and space the $0$ out a bit further: $$ \cos(x)\Big|_{-\pi/4}^{\ \ \ \ 0} $$ using \cos(x)\Big|_{-\pi/4}^{\ \ \ \ 0}.

A bit less hackish is $$ \cos(x)\Big|_{-\pi/4}^{\hphantom{-}0} $$ using \cos(x)\Big|_{-\pi/4}^{\hphantom{-}0}.

$\endgroup$
  • 1
    $\begingroup$ That huge space before the $0$ looks very strange to me. $\endgroup$ – dfeuer Nov 28 '13 at 6:45
  • $\begingroup$ @dfeuer: you can adjust the number of spaces to fit your taste. I had thought the OP did not like the look with no added space. $\endgroup$ – robjohn Nov 28 '13 at 8:44
3
$\begingroup$

Does this look better?

$$\cos x\Big|^{\kern{.4em}0}_{\raise{-1ex}{\kern{-.3em}-\pi/4}}$$

$\endgroup$
  • 5
    $\begingroup$ No, in my opinion it's much worse. $\endgroup$ – MJD Nov 26 '13 at 21:08
  • 1
    $\begingroup$ Why?$\vphantom{filler}$ $\endgroup$ – Asaf Karagila Nov 26 '13 at 21:16
  • $\begingroup$ The $\frac\pi4$ is too small and hangs down too low. $\endgroup$ – MJD Nov 26 '13 at 21:40
  • $\begingroup$ Fine, then. What about now? $\endgroup$ – Asaf Karagila Nov 26 '13 at 21:50
  • $\begingroup$ I'm not sure; I've been looking at these too long. What do you think? $\endgroup$ – MJD Nov 26 '13 at 21:51
  • $\begingroup$ I don't know. I've got the same problem. $\endgroup$ – Asaf Karagila Nov 26 '13 at 21:58
1
$\begingroup$

Your original code abuses left and right rather horribly. The logically correct way to use them would be $$\left.\cos x\right|_{-\pi/4}^0,$$ \left.\cos x\right|_{-\pi/4}^0, which gives the same bad result you started with but at least makes sense. Since you don't like it, let's try a very slight modification: $$\cos x\hskip 0.03em\bigr|_{-\pi/4}^0,$$ \cos x\hskip 0.03em\bigr|_{-\pi/4}^0. How do you like that version?

$\endgroup$
  • $\begingroup$ That wasn't intentional abuse; it was just a mistake. Had someone asked me, I would have said that the \left. was before the cosine, not after it. I'll look at the rest of your reply tomorrow. $\endgroup$ – MJD Nov 28 '13 at 2:06
  • $\begingroup$ @MJD, everyone makes mistakes. The reason I think it may make sense to add a bit of space before the bar (less than \,, but perhaps a tiny drop more than I put) is that without it, the bar seems to bind to the $x$ rather than to the whole expression. $\endgroup$ – dfeuer Nov 28 '13 at 2:37
1
$\begingroup$

I had to check what you meant. In these parts we use a totally different notation. May be limited to a small geographic area?

$$\mathop{\Big/}\nolimits_{\hspace{-2mm}-\pi/4}^{\hspace{1mm}0}\cos x$$

Needs a bit of hacking for the spacing look good. That slash should have the same slope as the integral sign. At least that's how it was typeset in my old (=pre-TeX) high school books: $$ \int_{-\pi/4}^0(-\sin x)\,dx=\mathop{\Big/}\nolimits_{\hspace{-2mm}-\pi/4}^{\hspace{1mm}0}\cos x $$ so both the slope and height of that slash are a bit wrong here IMHO.

Somehow I thought that (what I learned last night while searching the net) that it is just author's choice of notation, but your way of having that vertical line after the function seems to be nearly universal?? Wonder how I avoided learning about this while in grad school. I guess I never had to calculate a definite integral on the chalk board :-).

Sorry about veering off-topic. This just puzzles me.

$\endgroup$
  • $\begingroup$ This managed to collect an undelete vote, so I let it be visible to all. I asked colleagues who are currently writing a calculus textbook, and they confided to me to using hacks liks the above. Also you need to define separate macros for display and in-line modes. $\endgroup$ – Jyrki Lahtonen Nov 28 '13 at 5:19

You must log in to answer this question.

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