2

I have this equation:

$$P^{-1}(C) = \{\vec{x} = (x_{1:n},x_{n+1}) \in \mathbf{R}^{n+1} \mid \frac{x_{1:n}}{x_{n+1}} \in C , x_{n+1} > 0\}$$

but the {} brackets and the | sizes aren't auto adjusted, I found a post which doesn't work, and even $\sfrac$ doesn't work for me.

3
  • 4
    Could you please explain your issue a bit better? The title seems to have nothing to do with the body of the question (IMHO). Nov 9, 2013 at 9:08
  • I think the problem is more general. why something like \usepackage{something} doesn't work
    – 0x90
    Nov 9, 2013 at 9:09
  • 4
    Delimiters aren't scaled automatically by default, have you added any packages that are supposed to make that happen? (e.g. nath) Also, don't use $$ ... $$, see e.g. Why is \[ … \] preferable to $$? Nov 9, 2013 at 9:18

1 Answer 1

5

The size of curly braces and the vertical bar is not automatically adjusted because you're not using \left and \right (and \middle, here). Try this and I think it will work as you want it (you should consider inserting some horizontal space, see @Mico's comment):

\[
P^{-1}(C) = \left\{
              \vec{x} = (x_{1:n},x_{n+1}) \in \mathbf{R}^{n+1}
            \middle|
              \frac{x_{1:n}}{x_{n+1}} \in C , x_{n+1} > 0
            \right\}
\]

result

I don't think that the packages you have installed are related to your problem. In any case, if you want to see the exact packages that your latex file uses, you have to look at the log file.

If you want to use \sfrac you will have to use the xfrac package. Add the following line to your preamble:

\usepackage{xfrac}
7
  • 5
    I would recommend inserting at least a "thin space" (\,) on each side of \middle|. Also, don't use the $$ display math switch in LaTeX documents; see Why is [ ... ] preferable to $$ ... $$? for reasons for not using $$.
    – Mico
    Nov 9, 2013 at 9:37
  • indeed that solves my small problem, but why \sfrac doesn't compile.
    – 0x90
    Nov 9, 2013 at 9:55
  • 1
    @0x90 Did you load the xfrac package? Nov 9, 2013 at 10:00
  • 3
    @0x90 Simply \usepackage{xfrac} Nov 9, 2013 at 10:01
  • 3
    The right space around \middle| is \;: \;\middle|\;
    – egreg
    Nov 9, 2013 at 10:49

You must log in to answer this question.

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