[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: should a "wrapped" table result behave differently than one that is
From: |
Berry, Charles |
Subject: |
Re: should a "wrapped" table result behave differently than one that is not? |
Date: |
Tue, 18 Jan 2022 18:43:46 +0000 |
Eric,
> On Jan 18, 2022, at 9:05 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
>
> 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].
>
This is annoying, but I think you can get the product you want by
"pre-wrapping" the results.
Here is an example:
#+begin_src org
Show default:
,#+begin_src emacs-lisp :exports both
org-latex-tables-centered
,#+end_src
,#+name: awrappedtable
,#+header: :exports results
,#+header: :results value
,#+begin_src emacs-lisp
'((1 2) (3 4))
,#+end_src
,#+begin_results
,#+attr_latex: :center nil
,#+RESULTS: awrappedtable
: initial filler
,#+end_results
#+end_src
On export I get
Show default:
\begin{verbatim}
org-latex-tables-centered
\end{verbatim}
\begin{verbatim}
t
\end{verbatim}
\begin{results}
\begin{tabular}{rr}
1 & 2\\
3 & 4\\
\end{tabular}
\end{results}
HTH,
Chuck