Re: [O] LaTeX equation align in orgmode?

2015-09-30 Thread Nicolas Goaziou
Hello,

Rainer M Krug  writes:

> I would need in a document several equations which are aligned as in 
> http://tex.stackexchange.com/a/167908/6941
>
> How can I use the following latex formula in orgmode?
>
> \begin{proof} The proof is a follows: 
> \begin{align}
> (x+y)^3&=(x+y)(x+y)^2\\
>&=(x+y)(x^2+2xy+y^2)\\
>&=x^3+3x^2y+3xy^3+x^3.\qedhere
> \end{align}
> \end{proof}
>
> I have effectrively
>
> #+LATEX_HEADER: \usepackage{amsmath}
>
> * The equations
>
> \begin{equation}
> \begin{align}
> (x+y)^3&=(x+y)(x+y)^2\\
>&=(x+y)(x^2+2xy+y^2)\\
>&=x^3+3x^2y+3xy^3+x^3.\qedhere
> \end{align}
> \end{equation}
>
> but with latex fragment preview (C-c C-x C-l) I only get an empty frame.
>
> How can use this align environment in org?

Make sure to C-c C-c on the keyword.

Regards,

-- 
Nicolas Goaziou



Re: [O] LaTeX equation align in orgmode?

2015-09-29 Thread Eric S Fraga
On Monday, 28 Sep 2015 at 21:10, Rainer M Krug wrote:
> Hi
>
> I would need in a document several equations which are aligned as in 
> http://tex.stackexchange.com/a/167908/6941

I use align all the time.

> How can I use the following latex formula in orgmode?
>
> \begin{proof} The proof is a follows: 
> \begin{align}
> (x+y)^3&=(x+y)(x+y)^2\\
>&=(x+y)(x^2+2xy+y^2)\\
>&=x^3+3x^2y+3xy^3+x^3.\qedhere
> \end{align}
> \end{proof}

Where is proof defined? You may need to add specific packages to
org-latex-packages-alist.

In any case, I find that it is safer generally to enclose all LaTeX
fragments in a LaTeX block: #+begin_latex ... #+end_latex.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.1-203-g4ca3d3



Re: [O] LaTeX equation align in orgmode?

2015-09-29 Thread Ken Mankoff
Nested align in equation is incorrect format. 

  -k. 

Please excuse brevity. Sent from pocket computer with tiny non-haptic feedback 
keyboard. 

On Sep 29, 2015, at 00:06, Andreas Leha  
wrote:

>> 
>> \begin{equation}
>> \begin{align}



Re: [O] LaTeX equation align in orgmode?

2015-09-29 Thread Rasmus
Rainer,

Eric S Fraga  writes:

> On Monday, 28 Sep 2015 at 21:10, Rainer M Krug wrote:
>> I would need in a document several equations which are aligned as in 
>> http://tex.stackexchange.com/a/167908/6941
>
> I use align all the time.

align is defined in amsmath.  amsmath is loaded by default by org.  I use
amsmath extensively and there's no problem.  I don't escape my math
environments and IMO you shouldn't as they would then be ignored by ox-odt
and ox-html.

As Eric point out you'd typically use amsthm for proofs.  You need to add
this to your document.  The proof env. is predefined in amsthm, though.

Hope it helps,
Rasmus

-- 
Sådan en god dansk lagereddike kan man slet ikke bruge mere




Re: [O] LaTeX equation align in orgmode?

2015-09-28 Thread Andreas Leha
Hi Rainer,

Rainer M Krug  writes:
> Hi
>
> I would need in a document several equations which are aligned as in 
> http://tex.stackexchange.com/a/167908/6941
>
> How can I use the following latex formula in orgmode?
>
> \begin{proof} The proof is a follows: 
> \begin{align}
> (x+y)^3&=(x+y)(x+y)^2\\
>&=(x+y)(x^2+2xy+y^2)\\
>&=x^3+3x^2y+3xy^3+x^3.\qedhere
> \end{align}
> \end{proof}
>
>
> I have effectrively
>
> #+LATEX_HEADER: \usepackage{amsmath}
>
> * The equations
>
> \begin{equation}
> \begin{align}
> (x+y)^3&=(x+y)(x+y)^2\\
>&=(x+y)(x^2+2xy+y^2)\\
>&=x^3+3x^2y+3xy^3+x^3.\qedhere
> \end{align}
> \end{equation}
>
>
> but with latex fragment preview (C-c C-x C-l) I only get an empty frame.
>
> How can use this align environment in org?

This seems to a problem with your setup of preview latex.  It
should work just fine.

For me the following org file works as expected -- also with
previewing the equation.

--8<---cut here---start->8---
#+LaTeX_header: \usepackage{amsmath} %% needed explicitely for org-preview-latex


* Test align

\begin{align}
(x+y)^3&=(x+y)(x+y)^2\\
   &=(x+y)(x^2+2xy+y^2)\\
   &=x^3+3x^2y+3xy^3+x^3.\qedhere
\end{align}
--8<---cut here---end--->8---

I do not seem to have any special setup for previewing latex,
though...

Sorry to be of no further help.

Regards,
Andreas




[O] LaTeX equation align in orgmode?

2015-09-28 Thread Rainer M Krug

Hi

I would need in a document several equations which are aligned as in 
http://tex.stackexchange.com/a/167908/6941

How can I use the following latex formula in orgmode?

--8<---cut here---start->8---
\begin{proof} The proof is a follows: 
\begin{align}
(x+y)^3&=(x+y)(x+y)^2\\
   &=(x+y)(x^2+2xy+y^2)\\
   &=x^3+3x^2y+3xy^3+x^3.\qedhere
\end{align}
\end{proof}
--8<---cut here---end--->8---

I have effectrively

--8<---cut here---start->8---
#+LATEX_HEADER: \usepackage{amsmath}

* The equations

\begin{equation}
\begin{align}
(x+y)^3&=(x+y)(x+y)^2\\
   &=(x+y)(x^2+2xy+y^2)\\
   &=x^3+3x^2y+3xy^3+x^3.\qedhere
\end{align}
\end{equation}
--8<---cut here---end--->8---

but with latex fragment preview (C-c C-x C-l) I only get an empty frame.

How can use this align environment in org?

I could use


--8<---cut here---start->8---
\begin{eqnarray*}
\hat{f}(x) & \propto & \sum_{\nu} \frac{|F(\nu)H(\nu)|^2}{|N(\nu)|^2}  
   \frac{G(\nu)}{H(\nu)} e^{\frac{2 \pi i \nu x}{N}}\\
   & \propto & \sum_{\nu} \frac{|F(\nu)|^2}{|N(\nu)|^2} H(\nu) H^*(\nu) 
   \frac{G(\nu)}{H(\nu)} e^{\frac{2 \pi i \nu x}{N}}\\
   & \propto & \sum_{\nu} H^*(\nu) G(\nu) e^{\frac{2 \pi i \nu x}{N}}
\end{eqnarray*}
--8<---cut here---end--->8---

but eqnarray is apparently bad (see link above).

Thanks,

Rainer

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


signature.asc
Description: PGP signature