* Justifying a formula
@ 2017-03-07 20:20 Lawrence Bottorff
2017-03-08 4:02 ` Nick Dokos
0 siblings, 1 reply; 2+ messages in thread
From: Lawrence Bottorff @ 2017-03-07 20:20 UTC (permalink / raw)
To: emacs-orgmode Mailinglist
[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]
Here's what I have in a buffer:
* This basic pseudo-code tells of an internally-defined variable that
holds, /accumulates/ as the recursion drills down:
\begin{align*}
sumprod(x) \equiv if \; eq(x,NIL) \; then \; 2.list(s,p) \\
else \\
\{let \; z = sumprod(cdr(x)) \\
2.list(car(z) + car(x), car(cdr(z) \cdot car(x))\}
\end{align*}
which produces this as HTML:
sumprod(x) ≡ if eq(x,NIL) then 2.list(s,p)
else
{let z = sumprod(cdr(x))
2.list(car(z) + car(x), car(cdr(z) ⋅ car(x))}
which seems to be right justified. How can I get normal left justification?
BTW,
#+HTML_MATHJAX: align: left indent: 5em tagside: left font: Neo-Euler
seems to be ignored. Latex seems to have
\usepackage[fleqn]{amsmath}
but I'm assuming org-mode HTML export doesn't really use this. (Actually,
Latex export ignores
#+LaTeX_HEADER: \usepackage{mathtools}
#+LaTeX_HEADER: \usepackage[fleqn]{mathtools}
as well.)
Latest, greatest everything.
LB
[-- Attachment #2: Type: text/html, Size: 1619 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Justifying a formula
2017-03-07 20:20 Justifying a formula Lawrence Bottorff
@ 2017-03-08 4:02 ` Nick Dokos
0 siblings, 0 replies; 2+ messages in thread
From: Nick Dokos @ 2017-03-08 4:02 UTC (permalink / raw)
To: emacs-orgmode
Lawrence Bottorff <borgauf@gmail.com> writes:
> Here's what I have in a buffer:
>
> * This basic pseudo-code tells of an internally-defined variable that holds, /accumulates/ as the recursion drills down:
>
> \begin{align*}
> sumprod(x) \equiv if \; eq(x,NIL) \; then \; 2.list(s,p) \\
> else \\
> \{let \; z = sumprod(cdr(x)) \\
> 2.list(car(z) + car(x), car(cdr(z) \cdot car(x))\}
> \end{align*}
>
> which produces this as HTML:
>
> sumprod(x) ≡ if eq(x,NIL) then 2.list(s,p)
> else
> {let z = sumprod(cdr(x))
> 2.list(car(z) + car(x), car(cdr(z) ⋅ car(x))}
>
> which seems to be right justified. How can I get normal left justification?
pdflatex produces the same thing I believe, so I doubt that the HTML
exporter or MathJax is to blame. I imagine you are going to have to
find something more appropriate than an align`* environment. In any
case, you need some ampersands to tell it where to align. See e.g.
https://fr.sharelatex.com/learn/Aligning_equations_with_amsmath
>
> BTW,
>
> #+HTML_MATHJAX: align: left indent: 5em tagside: left font: Neo-Euler
>
> seems to be ignored. Latex seems to have
>
> \usepackage[fleqn]{amsmath}
>
> but I'm assuming org-mode HTML export doesn't really use this. (Actually, Latex export ignores
>
> #+LaTeX_HEADER: \usepackage{mathtools}
> #+LaTeX_HEADER: \usepackage[fleqn]{mathtools}
>
> as well.)
>
Not here, it doesn't: I kept the second one in my org file, and latex export
produces this partial output:
,----
| % Created 2017-03-07 Tue 22:58
| % Intended LaTeX compiler: pdflatex
| \documentclass[11pt]{article}
| \usepackage[utf8]{inputenc}
| \usepackage[T1]{fontenc}
| \usepackage{graphicx}
| \usepackage{grffile}
| \usepackage{longtable}
| \usepackage{wrapfig}
| \usepackage{rotating}
| \usepackage[normalem]{ulem}
| \usepackage{amsmath}
| \usepackage{textcomp}
| \usepackage{amssymb}
| \usepackage{capt-of}
| \usepackage{hyperref}
| \usepackage{minted}
| \usepackage[fleqn]{mathtools}
| \author{Nick Dokos}
| \date{\today}
| \title{}
| \hypersetup{
| pdfauthor={Nick Dokos},
| pdftitle={},
| pdfkeywords={},
| pdfsubject={},
| pdfcreator={Emacs 26.0.50.2 (Org mode 9.0.5)},
| pdflang={English}}
| \begin{document}
|
| \tableofcontents
`----
> Latest, greatest everything.
>
> LB
>
>
>
--
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-08 4:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-07 20:20 Justifying a formula Lawrence Bottorff
2017-03-08 4:02 ` Nick Dokos
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).