emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Richard H Stanton <rhstanton@berkeley.edu>
To: emacs-orgmode@gnu.org
Subject: How to specify column alignment in LaTeX table output?
Date: Thu, 9 Jan 2025 01:38:48 -0800	[thread overview]
Message-ID: <D08A555A-DF90-4062-A9EE-8B81E6E7EB3B@berkeley.edu> (raw)

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

Here’s a table in my org document:

#+ATTR_LATEX: :align rrrr :options [htbp]
#+begin_table
|-------+--------+-----------+------------|
|  Tier | Number |     Total | % of Total |
|-------+--------+-----------+------------|
|     1 |      4 |  8,700.00 |      57.39 |
|     2 |     19 |  5,398.00 |      35.61 |
|     3 |     24 |  1,061.40 |       7.00 |
|-------+--------+-----------+------------|
| Total |     47 | 15,159.40 |     100.00 |
|-------+--------+-----------+------------|
#+end_table

I want all the columns to be right-aligned (as they are in the org document), but when exported to LaTeX/PDF, the “Total” column in the output table is left aligned instead. Here’s the relevant section of the .tex document generated during PDF export:

\begin{table}[htbp]
\begin{center}
\begin{tabular}{rrlr}
\hline
Tier & Number & Total & \% of Total\\
\hline
1 & 4 & 8,700.00 & 57.39\\
2 & 19 & 5,398.00 & 35.61\\
3 & 24 & 1,061.40 & 7.00\\
\hline
Total & 47 & 15,159.40 & 100.00\\
\hline
\end{tabular}

\end{center}
\end{table}

What am I missing? If relevant, org-version returns

Org mode version 9.8-pre (release_9.7.18-223-g7ef659 @ /Users/stanton/.emacs.d/straight/build/org/)

Thanks for any suggestions.

[-- Attachment #2: Type: text/html, Size: 2967 bytes --]

             reply	other threads:[~2025-01-09  9:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-09  9:38 Richard H Stanton [this message]
2025-01-09 10:17 ` How to specify column alignment in LaTeX table output? Rens Oliemans
2025-01-09 15:02   ` Richard H Stanton

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=D08A555A-DF90-4062-A9EE-8B81E6E7EB3B@berkeley.edu \
    --to=rhstanton@berkeley.edu \
    --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).