From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Justifying a formula Date: Tue, 07 Mar 2017 23:02:03 -0500 Message-ID: <87o9xcpgas.fsf@alphaville.usersys.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36142) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clSnx-0003ky-Ny for emacs-orgmode@gnu.org; Tue, 07 Mar 2017 23:02:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1clSnu-0003Md-L7 for emacs-orgmode@gnu.org; Tue, 07 Mar 2017 23:02:25 -0500 Received: from [195.159.176.226] (port=58717 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1clSnu-0003Lu-Dz for emacs-orgmode@gnu.org; Tue, 07 Mar 2017 23:02:22 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1clSnf-0004ix-QU for emacs-orgmode@gnu.org; Wed, 08 Mar 2017 05:02:07 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Lawrence Bottorff 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