emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Table latex exporting ignores #+ATTR_LATEX:
@ 2018-03-20 12:43 Peter Mukhachev
  2018-03-25 11:55 ` Eric S Fraga
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Mukhachev @ 2018-03-20 12:43 UTC (permalink / raw)
  To: emacs-orgmode

Hello everyone,

I am making a table using org mode in order to export it to tex file
and insert resulting file to my document.
(org-latex-export-as-latex) does the thing, however, I do not need
header thing that it inserts by default.

(org-table-export) can probably do the thing I want. However,
dispatching it with latex backend ends up with #+ATTR_LATEX: line
ignored and exports bare table only in its tabular environment.
However, I would like to be able to control the alignment either at my
.org file with #+ATTR_LATEX (preferred) or at my top-level .tex file
using tabular environment.

Does anyone have an idea how to do that?

Best,
Petr.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Table latex exporting ignores #+ATTR_LATEX:
  2018-03-20 12:43 Table latex exporting ignores #+ATTR_LATEX: Peter Mukhachev
@ 2018-03-25 11:55 ` Eric S Fraga
  2018-03-25 16:23   ` Peter Mukhachev
  0 siblings, 1 reply; 6+ messages in thread
From: Eric S Fraga @ 2018-03-25 11:55 UTC (permalink / raw)
  To: Peter Mukhachev; +Cc: mukhachev, emacs-orgmode

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

On Tuesday, 20 Mar 2018 at 15:43, Peter Mukhachev wrote:
> (org-table-export) can probably do the thing I want. However,
> dispatching it with latex backend ends up with #+ATTR_LATEX: line
> ignored and exports bare table only in its tabular environment.
> However, I would like to be able to control the alignment either at my
> .org file with #+ATTR_LATEX (preferred) or at my top-level .tex file
> using tabular environment.

Maybe show us a minimal example that does not work?  Ideally, you should
have something along the lines of

#+attr_latex: ...
| a | table |


-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-347-gd73a5e

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Table latex exporting ignores #+ATTR_LATEX:
  2018-03-25 11:55 ` Eric S Fraga
@ 2018-03-25 16:23   ` Peter Mukhachev
  2018-03-26  6:13     ` Robert Klein
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Mukhachev @ 2018-03-25 16:23 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-orgmode

$ cat table-source.org
#+ATTR_LATEX: :align lp{2cm}l
| Name   | Text | Rationale      |
| height | 18 m | ATC requriment |

# Here I export with M-x org-table-export RET org-table-export-
result.tex RET orgtbl-to-latex RET

It gives the following (note the alignment string is "lll")
$ cat org-table-export-result.tex
\begin{tabular}{lll}
Name & Text & Rationale\\
height & 18 m & ATC requriment\\
\end{tabular}

However, when I dispatch it via M-x org-latex-export-to-latex, the
output is the following (alignment stirg is the same as in org file)
$ tail -n 6 table_source.tex
\begin{tabular}{lp{2cm}l}
Name & Text & Rationale\\
height & 18 m & ATC requriment\\
\end{tabular}
\end{center}
\end{document}%



On Sun, 2018-03-25 at 12:55 +0100, Eric S Fraga wrote:
> On Tuesday, 20 Mar 2018 at 15:43, Peter Mukhachev wrote:
> > (org-table-export) can probably do the thing I want. However,
> > dispatching it with latex backend ends up with #+ATTR_LATEX: line
> > ignored and exports bare table only in its tabular environment.
> > However, I would like to be able to control the alignment either at
> > my
> > .org file with #+ATTR_LATEX (preferred) or at my top-level .tex
> > file
> > using tabular environment.
> 
> Maybe show us a minimal example that does not work?  Ideally, you
> should
> have something along the lines of
> 
> #+attr_latex: ...
> > a | table |
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Table latex exporting ignores #+ATTR_LATEX:
  2018-03-25 16:23   ` Peter Mukhachev
@ 2018-03-26  6:13     ` Robert Klein
  2018-04-03 11:14       ` Peter Mukhachev
  2018-04-03 12:07       ` Peter Mukhachev
  0 siblings, 2 replies; 6+ messages in thread
From: Robert Klein @ 2018-03-26  6:13 UTC (permalink / raw)
  To: Peter Mukhachev; +Cc: emacs-orgmode

Hi,

On Sun, 25 Mar 2018 19:23:53 +0300
Peter Mukhachev <mukhachev@phystech.edu> wrote:

> $ cat table-source.org
> #+ATTR_LATEX: :align lp{2cm}l
> | Name   | Text | Rationale      |
> | height | 18 m | ATC requriment |
> 
> # Here I export with M-x org-table-export RET org-table-export-
> result.tex RET orgtbl-to-latex RET
> 
> It gives the following (note the alignment string is "lll")
> $ cat org-table-export-result.tex
> \begin{tabular}{lll}
> Name & Text & Rationale\\
> height & 18 m & ATC requriment\\
> \end{tabular}
> 
> However, when I dispatch it via M-x org-latex-export-to-latex, the
> output is the following (alignment stirg is the same as in org file)
> $ tail -n 6 table_source.tex
> \begin{tabular}{lp{2cm}l}
> Name & Text & Rationale\\
> height & 18 m & ATC requriment\\
> \end{tabular}
> \end{center}
> \end{document}%
> 
> 

Can you use body-only export?  (That is, is your table the only content
of your document?)

In elisp (org-latex-export-to-latex nil nil nil t), or interactively
C-c C-e C-b <ENTER>.



Best regards
Robert



> 
> On Sun, 2018-03-25 at 12:55 +0100, Eric S Fraga wrote:
> > On Tuesday, 20 Mar 2018 at 15:43, Peter Mukhachev wrote:  
> > > (org-table-export) can probably do the thing I want. However,
> > > dispatching it with latex backend ends up with #+ATTR_LATEX: line
> > > ignored and exports bare table only in its tabular environment.
> > > However, I would like to be able to control the alignment either
> > > at my
> > > .org file with #+ATTR_LATEX (preferred) or at my top-level .tex
> > > file
> > > using tabular environment.  
> > 
> > Maybe show us a minimal example that does not work?  Ideally, you
> > should
> > have something along the lines of
> > 
> > #+attr_latex: ...  
> > > a | table |  
> > 
> >   
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Table latex exporting ignores #+ATTR_LATEX:
  2018-03-26  6:13     ` Robert Klein
@ 2018-04-03 11:14       ` Peter Mukhachev
  2018-04-03 12:07       ` Peter Mukhachev
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Mukhachev @ 2018-04-03 11:14 UTC (permalink / raw)
  To: Robert Klein; +Cc: emacs-orgmode

Hi, Robert,

On Mon, 2018-03-26 at 08:13 +0200, Robert Klein wrote:
> Can you use body-only export?  (That is, is your table the only
> content
> of your document?)

Thanks, that works as expected.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Table latex exporting ignores #+ATTR_LATEX:
  2018-03-26  6:13     ` Robert Klein
  2018-04-03 11:14       ` Peter Mukhachev
@ 2018-04-03 12:07       ` Peter Mukhachev
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Mukhachev @ 2018-04-03 12:07 UTC (permalink / raw)
  To: Robert Klein; +Cc: emacs-orgmode

On Mon, 2018-03-26 at 08:13 +0200, Robert Klein wrote:
> Can you use body-only export?  (That is, is your table the only
> content
> of your document?)
However, still, that way the table is exported inside "center"
environment, which is kind of okay for me.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-04-03 12:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-20 12:43 Table latex exporting ignores #+ATTR_LATEX: Peter Mukhachev
2018-03-25 11:55 ` Eric S Fraga
2018-03-25 16:23   ` Peter Mukhachev
2018-03-26  6:13     ` Robert Klein
2018-04-03 11:14       ` Peter Mukhachev
2018-04-03 12:07       ` Peter Mukhachev

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).