emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* export latex align to html?
@ 2014-04-22 16:55 Neal Becker
  2014-04-22 17:15 ` Nick Dokos
  2014-04-22 17:37 ` Eric S Fraga
  0 siblings, 2 replies; 3+ messages in thread
From: Neal Becker @ 2014-04-22 16:55 UTC (permalink / raw)
  To: emacs-orgmode

I have an align environment:

#+begin_latex
\begin{align*}
\Lambda= & \max_{k,l}\left|
\sum_{i=0}^{M-1}r_{i+l}x_{i}^{*}e^{j2\pi\Delta_{f}ki}+\sum_{i=M}^{2M-1}r_{i+l}x_{i}^{*}e^{j2\pi\Delta_{f}ki}+\cdots\right|
\\
\approx & \max_{k,l}\left|
\sum_{m}e^{j2\pi\Delta_{f}kmM}\sum_{i=mM}^{(m+1)M-1}r_{i+l}x_{i}^{*}\right|
\end{align*}
#+end_latex

That exports fine to latex, but not html.  Is there a way to do this?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: export latex align to html?
  2014-04-22 16:55 export latex align to html? Neal Becker
@ 2014-04-22 17:15 ` Nick Dokos
  2014-04-22 17:37 ` Eric S Fraga
  1 sibling, 0 replies; 3+ messages in thread
From: Nick Dokos @ 2014-04-22 17:15 UTC (permalink / raw)
  To: emacs-orgmode

Neal Becker <ndbecker2@gmail.com> writes:

> I have an align environment:
>
> #+begin_latex
> \begin{align*}
> \Lambda= & \max_{k,l}\left|
> \sum_{i=0}^{M-1}r_{i+l}x_{i}^{*}e^{j2\pi\Delta_{f}ki}+\sum_{i=M}^{2M-1}r_{i+l}x_{i}^{*}e^{j2\pi\Delta_{f}ki}+\cdots\right|
> \\
> \approx & \max_{k,l}\left|
> \sum_{m}e^{j2\pi\Delta_{f}kmM}\sum_{i=mM}^{(m+1)M-1}r_{i+l}x_{i}^{*}\right|
> \end{align*}
> #+end_latex
>
> That exports fine to latex, but not html.  Is there a way to do this?

Sure - I get perfect output by just leaving out the
#+begin_latex/#+end_latex markers. Underneath, mathjax is being used,
but I don't think I have done any customization: it should work right
out of the box.

Nick

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: export latex align to html?
  2014-04-22 16:55 export latex align to html? Neal Becker
  2014-04-22 17:15 ` Nick Dokos
@ 2014-04-22 17:37 ` Eric S Fraga
  1 sibling, 0 replies; 3+ messages in thread
From: Eric S Fraga @ 2014-04-22 17:37 UTC (permalink / raw)
  To: Neal Becker; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 825 bytes --]

On Tuesday, 22 Apr 2014 at 12:55, Neal Becker wrote:
> I have an align environment:
>
> #+begin_latex
> \begin{align*}
> \Lambda= & \max_{k,l}\left|
> \sum_{i=0}^{M-1}r_{i+l}x_{i}^{*}e^{j2\pi\Delta_{f}ki}+\sum_{i=M}^{2M-1}r_{i+l}x_{i}^{*}e^{j2\pi\Delta_{f}ki}+\cdots\right|
> \\
> \approx & \max_{k,l}\left|
> \sum_{m}e^{j2\pi\Delta_{f}kmM}\sum_{i=mM}^{(m+1)M-1}r_{i+l}x_{i}^{*}\right|
> \end{align*}
> #+end_latex
>
> That exports fine to latex, but not html.  Is there a way to do this?

The attached works for me.  

You can have conditional code on the latex src block to generate raw
latex when exporting to latex and an image when exporting to
html.  Check out

  http://thread.gmane.org/gmane.emacs.orgmode/74474/focus=74762

HTH,
eric
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.5h-1027-g4c0a29

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: x.org --]
[-- Type: text/x-org, Size: 692 bytes --]

* Intro
I have an align environment:

#+begin_src latex :file alignedequation.png :results raw
\begin{align*}
\Lambda= & \max_{k,l}\left|
\sum_{i=0}^{M-1}r_{i+l}x_{i}^{*}e^{j2\pi\Delta_{f}ki}+\sum_{i=M}^{2M-1}r_{i+l}x_{i}^{*}e^{j2\pi\Delta_{f}ki}+\cdots\right|
\\
\approx & \max_{k,l}\left|
\sum_{m}e^{j2\pi\Delta_{f}kmM}\sum_{i=mM}^{(m+1)M-1}r_{i+l}x_{i}^{*}\right|
\end{align*}
#+end_src

That exports fine to latex, but not html.  Is there a way to do this?
* settings

# Local Variables:
# org-export-allow-bind-keywords: t
# org-format-latex-options: (:foreground "black" :background "white" :matchers '("begin") :scale 1.0 )
# org-latex-create-formula-image-program: imagemagick
# End:

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-22 17:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-22 16:55 export latex align to html? Neal Becker
2014-04-22 17:15 ` Nick Dokos
2014-04-22 17:37 ` Eric S Fraga

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).