emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Arik Mitschang <arik.mitschang@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Bug: org-table latex export does not honour alignment [7.5]
Date: Wed, 07 Sep 2011 15:01:30 +1000	[thread overview]
Message-ID: <arikm8vq19c9h.fsf@mq.edu.au> (raw)

When exporting a file to latex, the alignment of tables within that file
specified via the in-table <l>,<c> or <r> fields are not honoured. For
example:

|-------------+----------+----------+----------+----------|
|-------------+----------+----------+----------+----------|
| long header | header a | header b | header c | header d |
|-------------+----------+----------+----------+----------|
| <l>         | <l>      |      <r> |      <r> |      <r> |
| 1           | 2        |        3 |        4 |        5 |
| 6           | 7        |        8 |        9 |       10 |
| /           | >        |          |          |          |


should have the first two columns left-aligned and the last three right
aligned. The vertical line in the table above is present. This also is
the case when forcing a table environment via #+CAPTION. The table above
generates the tabular command:

\begin{tabular}{rr|rrr}

Where it should generate:

\begin{tabular}{ll|rrr}

Interestingly, when doing a

M-x org-table-export

The alignment is find, but the vertical line is present. Also, it
appears that ASCII also does not honour the alignment but HTML export
does (including the <c>).


Thanks,
-Arik



Emacs  : GNU Emacs 23.3.1 (x86_64-apple-darwin10.5.0, GTK+ Version 2.18.9)
 of 2011-06-07 on nobunaga.local
Package: Org-mode version 7.5

current state:
==============
(setq
 org-log-done t
 org-export-latex-default-class "simple"
 org-file-apps '((auto-mode . emacs) ("\\.mm\\'" . default) ("\\.x?html'" . system) ("pdf" . system))
 org-export-with-LaTeX-fragments 'dvipng
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-hide-block-startup t
 org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook)
 org-agenda-custom-commands '(("l" "Reading list" tags-todo "L/TODO" nil) ("t" "todo items" tags-todo "-L-P/TODO" nil) ("p" "Project todo items" tags "P/TODO" nil)
			      ("A" "All APPTs" todo "APPT" nil) ("i" "INIT items" todo "INIT" nil))
 org-agenda-files '("~/org/")
 org-agenda-tags-column 95
 org-babel-load-languages '((emacs-lisp . t) (python . t) (ditaa \.t) (R . t) (sh . t))
 org-clock-into-drawer t
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-capture-templates '(("l" "add to reading list" entry (file+headline "~/org/main.org" "Reading list") "* TODO READ: [[%^{Article URL}]] :L:" :immediate-finish t)
			 ("a" "appointment" entry (file+headline "~/org/main.org" "TASKS") "* APPT %^{Task description} %^g\n  %^t\n  Location: %^{Location}"
			  :immediate-finish t)
			 ("r" "reminder (no time)" entry (file+headline "~/org/main.org" "TASKS") "* TODO %^{Task description}" :immediate-finish t)
			 ("n" "README note" entry (function awm-org-capture-get-readme-note) "* %U\n  %?"))
 org-after-todo-state-change-hook '(org-clock-out-if-current awm-org-agenda-to-appt-activate)
 org-babel-tangle-lang-exts '(("python" . "py") ("emacs-lisp" . "el"))
 org-capture-after-finalize-hook '(awm-org-agenda-to-appt-activate)
 org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup)
 org-export-html-postamble t
 org-export-html-style "<link rel='stylesheet' type='text/css' href='./style.css'/>"
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-latex-to-pdf-process '("latex -interaction nonstopmode -output-directory %o %f" "bibtex %b" "latex -interaction nonstopmode -output-directory %o %f"
			    "latex -interaction nonstopmode -output-directory %o %f" "dvipdf %b.dvi" "rm %b.bbl %b.blg %b.tex %b.dvi")
 org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-export-with-toc nil
 org-highlight-sparse-tree-matches nil
 org-todo-keywords '((sequence "TODO(t)" "APPT(a)" "WAIT(w@)" "PROJ(p)" "INIT(i!)" "|" "DONE(d)" "CNCL(c@)"))
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-export-html-postamble-format '(("en" "<p class=\"author\">Author: %a</p>\n<p class=\"date\">Date: %d</p>"))
 org-n-level-faces 4
 org-babel-pre-tangle-hook '(save-buffer)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change)
 org-export-latex-classes '(("article" "\\documentclass[11pt]{article}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}")
			     ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}")
			     ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
			    ("report" "\\documentclass[11pt]{report}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}")
			     ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
			    ("book" "\\documentclass[11pt]{book}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}")
			     ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
			    ("beamer" "\\documentclass{beamer}" org-beamer-sectioning)
			    ("beamerposter" "\\documentclass{beamer}\n[NO-DEFAULT-PACKAGES][PACKAGES]" org-beamer-sectioning)
			    ("simple"
			     "\\documentclass[11pt]{article}\n\n\\setlength{\\oddsidemargin}{0.25in}\n\\setlength{\\evensidemargin}{0.25in}\n\\setlength{\\textwidth}{6in}\n\\setlength{\\topmargin}{0.1in}\n\\setlength{\\headsep}{0.2in}\n\\usepackage{hyperref}\n\\usepackage{graphicx}\n\\usepackage{natbib}\n\\usepackage{astroj}\n[NO-DEFAULT-PACKAGES][PACKAGES]"
			     ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
			     ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
			    )
 org-publish-project-alist '(("MQ-web" :base-directory "~/org/mqweb/" :auto-index t :index-filename "sitemap.org" :recursive t :makeindex t :publishing-directory
			      "/verus.science:~/html/")
			     )
 org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers)
 org-mode-hook '(org-babel-result-hide-spec org-babel-hide-all-hashes auto-fill-mode (lambda nil (local-set-key "\333Z" (quote org-global-cycle))))
 org-cycle-include-plain-lists nil
 org-export-latex-image-default-option "width=\\textwidth"
 org-refile-targets '((org-agenda-files :maxlevel . 900))
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-footnote-auto-adjust t
 org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src org-babel-exp-inline-src-blocks))
 org-link-mailto-program '(vm-mail-to-mailto-url "mailto:%a?subject=%s")
 org-occur-hook '(org-first-headline-recenter)
 org-from-is-user-regexp "\\<Arik Mitschang\\>"
 org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code)
 org-confirm-babel-evaluate nil
 org-tags-column 80
 org-columns-default-format "%8CATEGORY %25ITEM(Description) %TODO(Type) %3PRIORITY %6Effort{:} %6CLOCKSUM(CT) %ALLTAGS"
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc org-beamer-auto-fragile-frames org-beamer-place-default-actions-for-lists)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-export-blocks '((src org-babel-exp-src-block nil) (comment org-export-blocks-format-comment t) (ditaa org-export-blocks-format-ditaa nil)
		     (dot org-export-blocks-format-dot nil))
 )

             reply	other threads:[~2011-09-07  5:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-07  5:01 Arik Mitschang [this message]
2011-09-07  7:46 ` Bug: org-table latex export does not honour alignment [7.5] Eric S Fraga
2011-09-08  7:02   ` Arik Mitschang
2011-09-08  9:02     ` Eric S Fraga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=arikm8vq19c9h.fsf@mq.edu.au \
    --to=arik.mitschang@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).