emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: Emacs Org mode mailing list <emacs-orgmode@gnu.org>
Subject: should a "wrapped" table result behave differently than one that is not?
Date: Tue, 18 Jan 2022 17:05:37 +0000	[thread overview]
Message-ID: <877dax6kke.fsf@ucl.ac.uk> (raw)

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

Dear all,

Should the export of a table that is the result of a code block and has
been wrapped in a RESULTS special block be different than one that is
not wrapped (beyond the wrapping, of course)?  Specifically, wrapping
the results seems to cause org to ignore that ATTR_LATEX :center toggle
[1].  A minimal example, both org and resulting LaTeX, attached.

I guess it makes sense in that the attr line will probably be applied to
the results special block.  I am not sure how to get around this.
Suggestions very welcome indeed!  I do need to wrap the results in a
block of some type so I can control the formatting in the resulting PDF
export but I do not want the table centred necessarily [2].

Thank you,
eric

Footnotes:
[1] describing this as a toggle (in the info manual) does not really
     make much sense to me as it implies a known initial state which is
     not specified in the manual.  I would prefer to have to say
     ":center no" (or nil) which then allows for ":center t"...?

[2] centring should happen by request, not by default, in my opinion, as
     it is trivial to enclose a table in a centring environment
     explicitly but difficult to remove otherwise.

-- 
: Eric S Fraga, with org release_9.5.2-306-g9623da in Emacs 29.0.50


[-- Attachment #2: t.org --]
[-- Type: application/vnd.lotus-organizer, Size: 623 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: t.tex --]
[-- Type: text/x-tex, Size: 1165 bytes --]

% Created 2022-01-18 Tue 16:52
% Intended LaTeX compiler: pdflatex
\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage{soul}
\usepackage{listings}
\usepackage[version=3]{mhchem}
\usepackage{doi}
\usepackage{amsmath}
\usepackage[british, english]{babel}
\author{Eric S Fraga}
\date{\today}
\title{}
\hypersetup{
 pdfauthor={Eric S Fraga},
 pdftitle={},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 29.0.50 (Org mode 9.5.2)}, 
 pdflang={English}}
\begin{document}

\tableofcontents

A bare table gets exported properly:

\begin{tabular}{rr}
1 & 2\\
3 & 4\\
\end{tabular}

Now a table that is the result of some code:

\begin{tabular}{rr}
1 & 2\\
3 & 4\\
\end{tabular}

and finally a table from some code but wrapped:

\begin{results}
\begin{center}
\begin{tabular}{rr}
1 & 2\\
3 & 4\\
\end{tabular}
\end{center}
\end{results}

The last table is centred unfortunately.
\end{document}

             reply	other threads:[~2022-01-18 17:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18 17:05 Eric S Fraga [this message]
2022-01-18 18:43 ` should a "wrapped" table result behave differently than one that is not? Berry, Charles
2022-01-19  7:15   ` 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=877dax6kke.fsf@ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --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).