Re: [O] unexpected appearance of x^2 in pdf file
Paul Stansell writes: > Yes, I tried that, but as I understand it I need to > \usepackage{amsmath} to access the latex equation* environment. Usually amsmath is good to have (and Nicolas answered on how to include it), but if you wish to avoid it for some reason, the {displaymath} environment does the same thing. -- N.
Re: [O] unexpected appearance of x^2 in pdf file
>>> \[ x = y >>> +1 \] >>> >>> \[ x = y >>> + 1 \] >> >> This is to be expected. In the second case, the second line defines >> a list item, which has precedence over any LaTeX snippet. > > Okay, I realised it was switching to the itemise environment, but I > didn't know it took precedence over the latex environment. Technically, this is a latex fragment, not a latex environment (which is what I suggested to use). The difference is that the former is inline (i.e. it is contained in a paragraph) whereas the latter isn't. Non-inline elements always have precedence over inline ones. >>> \[ x = \begin{array}{cc} >>> y & u \\ >>> z & v >>> \end{array} \] >>> >>> \[ x = >>>\begin{array}{cc} >>> y & u \\ >>> z & v >>>\end{array} \] >> >> I think this is because of a limitation on the number of lines a LaTeX >> snippet can span across (IIRC, 3 is the maximum). > > Maybe, but I see the same problem with the following two line example > > \[ x = >\begin{array}{cc} z & v \end{array} \] I see. This should be fixed. Thanks for insisting. >> In both cases, I suggest to use LaTeX environments instead: >> >> \begin{equation*} >> x = y >> + 1 >> \end{equation*} > > Yes, I tried that, but as I understand it I need to > \usepackage{amsmath} to access the latex equation* environment. But > then I get an error about "Command \iint already defined." I tried > the solution described at > http://www.tex.ac.uk/cgi-bin/texfaq2html?label=alreadydef, but it > didn't work for me. A package is conflicting with "amsmath", probably "wasysym". Try to add "nointegrals" option to "wasysym" in `org-latex-default-packages-alist'. Regards, -- Nicolas Goaziou
Re: [O] unexpected appearance of x^2 in pdf file
Nicolas, >> \[ x = y >> +1 \] >> >> \[ x = y >> + 1 \] > > This is to be expected. In the second case, the second line defines > a list item, which has precedence over any LaTeX snippet. Okay, I realised it was switching to the itemise environment, but I didn't know it took precedence over the latex environment. >> \[ x = \begin{array}{cc} >> y & u \\ >> z & v >> \end{array} \] >> >> \[ x = >>\begin{array}{cc} >> y & u \\ >> z & v >>\end{array} \] > > I think this is because of a limitation on the number of lines a LaTeX > snippet can span across (IIRC, 3 is the maximum). Maybe, but I see the same problem with the following two line example \[ x = \begin{array}{cc} z & v \end{array} \] > In both cases, I suggest to use LaTeX environments instead: > > \begin{equation*} > x = y > + 1 > \end{equation*} Yes, I tried that, but as I understand it I need to \usepackage{amsmath} to access the latex equation* environment. But then I get an error about "Command \iint already defined." I tried the solution described at http://www.tex.ac.uk/cgi-bin/texfaq2html?label=alreadydef, but it didn't work for me. Anyway, never mind, these are all quite trivial points. Thanks very much for your help, Paul
Re: [O] unexpected appearance of x^2 in pdf file
Hello, Paul Stansell writes: > I've also come across a couple of other unexpected results exporting > other latex equations to pdf. Examples are given in the attached org > file. Both are quite trivial with easy work-arounds. In both cases, > because the embedded png equations (displayed by C-c C-x C-l) are > formatted correctly, the problem in the exported pdf file might go > unnoticed. > \[ x = y > +1 \] > > \[ x = y > + 1 \] This is to be expected. In the second case, the second line defines a list item, which has precedence over any LaTeX snippet. > \[ x = \begin{array}{cc} > y & u \\ > z & v > \end{array} \] > > \[ x = >\begin{array}{cc} > y & u \\ > z & v >\end{array} \] I think this is because of a limitation on the number of lines a LaTeX snippet can span across (IIRC, 3 is the maximum). In both cases, I suggest to use LaTeX environments instead: \begin{equation*} x = y + 1 \end{equation*} and \begin{equation*} x = \begin{array}{cc} y & u \\ z & v \end{array} \end{equation*} Regards, -- Nicolas Goaziou
Re: [O] unexpected appearance of x^2 in pdf file
Hi Nicolas, Thanks for fixing that last problem, that's great! I've also come across a couple of other unexpected results exporting other latex equations to pdf. Examples are given in the attached org file. Both are quite trivial with easy work-arounds. In both cases, because the embedded png equations (displayed by C-c C-x C-l) are formatted correctly, the problem in the exported pdf file might go unnoticed. Regards, Paul equation_line_breaks.org Description: Binary data
Re: [O] unexpected appearance of x^2 in pdf file
Hello, Paul Stansell writes: > I may be under a misapprehension, but I expected the pdf output > (created by C-c C-e l p) from the attached org file to show similar > results for both lines. Instead, however, the simple > > x^2 > > outside of the verbatim environment puts the caret above the 2 even > though I have set > > #+OPTIONS: ^:nil > > This seems to be because org-mode exports x^2 as x\^2 in the tex file. > I think exporting it as x\^{}2 would give a better result. This should be now fixed. Thank you for reporting this. Regards, -- Nicolas Goaziou
Re: [O] unexpected appearance of x^2 in pdf file
Paul Stansell writes: > I may be under a misapprehension, but I expected the pdf output > (created by C-c C-e l p) from the attached org file to show similar > results for both lines. Instead, however, the simple > > x^2 > Try =x^2= or ~x^2~ instead? > outside of the verbatim environment puts the caret above the 2 even > though I have set > > #+OPTIONS: ^:nil > > This seems to be because org-mode exports x^2 as x\^2 in the tex file. > I think exporting it as x\^{}2 would give a better result. Is there > another way to get the appearance I'm looking for without using the > verbatim environment? > > Thanks for your advice, > > Paul > > PS. I'm using Emacs 24.2.1 with Org mode 8.0.2. > > #+OPTIONS: ^:nil toc:nil > > x^2 > > \begin{verbatim} > x^2 > \end{verbatim} -- Nick
[O] unexpected appearance of x^2 in pdf file
Dear list, I may be under a misapprehension, but I expected the pdf output (created by C-c C-e l p) from the attached org file to show similar results for both lines. Instead, however, the simple x^2 outside of the verbatim environment puts the caret above the 2 even though I have set #+OPTIONS: ^:nil This seems to be because org-mode exports x^2 as x\^2 in the tex file. I think exporting it as x\^{}2 would give a better result. Is there another way to get the appearance I'm looking for without using the verbatim environment? Thanks for your advice, Paul PS. I'm using Emacs 24.2.1 with Org mode 8.0.2. caret_symbol.org Description: Binary data