emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Tables with line wrapping?
@ 2014-02-22 19:30 Peter Davis
  2014-02-22 21:01 ` Thomas S. Dye
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Peter Davis @ 2014-02-22 19:30 UTC (permalink / raw)
  To: emacs-orgmode

I'm using org-mode to prepare a document that will ultimately be
exported to PDF. Unfortunately, I need to include a table whose contents
will wrap as needed. The options I can see are:

1) Do everything I can in org-mode, then export and edit the
intermediate .tex file, or

2) Create the table with some other tool, and include it as an image
into the org document

Am I missing anything? Are there other (better?) ways? As I expect to be
revising both the table and the rest of the document for a while, the
uni-directional workflow in #1 above would be difficult.

Thanks!

-pd


-- 
  Peter Davis
  www.techcurmudgeon.com

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

* Re: Tables with line wrapping?
  2014-02-22 19:30 Tables with line wrapping? Peter Davis
@ 2014-02-22 21:01 ` Thomas S. Dye
  2014-02-23  4:04   ` Peter Davis
  2014-02-22 21:05 ` Richard Lawrence
  2014-02-23  5:00 ` Jambunathan K
  2 siblings, 1 reply; 10+ messages in thread
From: Thomas S. Dye @ 2014-02-22 21:01 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

Aloha Peter,

Peter Davis <pfd@pfdstudio.com> writes:

> I'm using org-mode to prepare a document that will ultimately be
> exported to PDF. Unfortunately, I need to include a table whose contents
> will wrap as needed. The options I can see are:
>
> 1) Do everything I can in org-mode, then export and edit the
> intermediate .tex file, or
>
> 2) Create the table with some other tool, and include it as an image
> into the org document
>
> Am I missing anything? Are there other (better?) ways? As I expect to be
> revising both the table and the rest of the document for a while, the
> uni-directional workflow in #1 above would be difficult.

You can set the :align attribute.  Something like this will wrap the
second column in the pdf file:

  #+ATTR_LATEX :align lp{6cm}
  | col | wrapcol |

You might also want to look at the LaTeX tabularx environment if you
want the table to be a particular width.

hth,
Tom
-- 
Thomas S. Dye
http://www.tsdye.com

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

* Re: Tables with line wrapping?
  2014-02-22 19:30 Tables with line wrapping? Peter Davis
  2014-02-22 21:01 ` Thomas S. Dye
@ 2014-02-22 21:05 ` Richard Lawrence
  2014-02-23  4:08   ` Peter Davis
  2014-02-23  5:00 ` Jambunathan K
  2 siblings, 1 reply; 10+ messages in thread
From: Richard Lawrence @ 2014-02-22 21:05 UTC (permalink / raw)
  To: emacs-orgmode

Hi Peter,

Peter Davis <pfd@pfdstudio.com> writes:

> I'm using org-mode to prepare a document that will ultimately be
> exported to PDF. Unfortunately, I need to include a table whose contents
> will wrap as needed.

I've run into this problem before too, but I haven't found a good
solution. (Though I haven't looked that hard.)  Maybe someone else will
have a better suggestion than the workaround I've used (see below).

> The options I can see are:
>
> 1) Do everything I can in org-mode, then export and edit the
> intermediate .tex file, or
>
> 2) Create the table with some other tool, and include it as an image
> into the org document
>
> Am I missing anything? Are there other (better?) ways? As I expect to be
> revising both the table and the rest of the document for a while, the
> uni-directional workflow in #1 above would be difficult.

What about just maintaining the table as an embedded LaTeX block? e.g.

... your Org text here ...
#+BEGIN_LATEX
\begin{tabular} % or wrap with \begin{table} if you need, etc.
% ...
\end{tabular}
#+END_LATEX

That way, at least, you can edit your document and the table at the same
time and in the same file, though it means giving up Org's nice table
editing features.
 
Best,
Richard

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

* Re: Tables with line wrapping?
  2014-02-22 21:01 ` Thomas S. Dye
@ 2014-02-23  4:04   ` Peter Davis
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Davis @ 2014-02-23  4:04 UTC (permalink / raw)
  To: emacs-orgmode

On Sat, Feb 22, 2014 at 11:01:45AM -1000, Thomas S. Dye wrote:
> 
> You can set the :align attribute.  Something like this will wrap the
> second column in the pdf file:
> 
>   #+ATTR_LATEX :align lp{6cm}
>   | col | wrapcol |

Hi, Thomas,

Excellent! Sorry I was completely unaware of this. That solves my problem perfectly.

Thank you!

-pd


-- 
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

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

* Re: Tables with line wrapping?
  2014-02-22 21:05 ` Richard Lawrence
@ 2014-02-23  4:08   ` Peter Davis
  2014-03-09  1:08     ` Marcin Borkowski
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Davis @ 2014-02-23  4:08 UTC (permalink / raw)
  To: emacs-orgmode

On Sat, Feb 22, 2014 at 01:05:34PM -0800, Richard Lawrence wrote:
> 
> What about just maintaining the table as an embedded LaTeX block? e.g.
> 
> ... your Org text here ...
> #+BEGIN_LATEX
> \begin{tabular} % or wrap with \begin{table} if you need, etc.
> % ...
> \end{tabular}
> #+END_LATEX
> 
> That way, at least, you can edit your document and the table at the same
> time and in the same file, though it means giving up Org's nice table
> editing features.

Thank you, Richard! I was not aware of this, but it seems like it would have a slew of uses. (My first thought it to embed pstricks graphics into my documents, but then I'd have to bypass pdflatex and use xelatex or something instead.)

Thank you!

-pd


-- 
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

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

* Re: Tables with line wrapping?
  2014-02-22 19:30 Tables with line wrapping? Peter Davis
  2014-02-22 21:01 ` Thomas S. Dye
  2014-02-22 21:05 ` Richard Lawrence
@ 2014-02-23  5:00 ` Jambunathan K
  2014-02-23 12:39   ` Peter Davis
  2 siblings, 1 reply; 10+ messages in thread
From: Jambunathan K @ 2014-02-23  5:00 UTC (permalink / raw)
  Cc: emacs-orgmode

Peter Davis <pfd@pfdstudio.com> writes:

> I'm using org-mode to prepare a document that will ultimately be
> exported to PDF. Unfortunately, I need to include a table whose contents
> will wrap as needed.

You can export to PDF via ODT.  Use list tables.  See the links at the
end of the following post.

    https://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg01101.html

The list items (that you see below) is not limited to single lines but
can be multi-line, multi-paragraph (including inline image links).  The
Hrules are optional.

Some of the attributes you see below won't work on Org trunk but will
work on my ELPA package.

    http://cauvery.nfshost.com/wiki.pl/ODT_Exporter

--8<---------------cut here---------------start------------->8---
#+ATTR_ODT: :widths 1,2,4,8
#+ATTR_ODT: :rel-width 80
#+ATTR_ODT: :list-table t
- -----
- Row 1
  - 1.1
  - 1.2
  - 1.3
- -----
- Row 2
  - 2.1
  - 2.2
  - 2.3
- -----
--8<---------------cut here---------------end--------------->8---

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

* Re: Tables with line wrapping?
  2014-02-23  5:00 ` Jambunathan K
@ 2014-02-23 12:39   ` Peter Davis
  2014-03-01  8:09     ` Bastien
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Davis @ 2014-02-23 12:39 UTC (permalink / raw)
  To: emacs-orgmode

On Sun, Feb 23, 2014 at 10:30:57AM +0530, Jambunathan K wrote:
> Peter Davis <pfd@pfdstudio.com> writes:
> 
> > I'm using org-mode to prepare a document that will ultimately be
> > exported to PDF. Unfortunately, I need to include a table whose contents
> > will wrap as needed.
> 
> You can export to PDF via ODT.  Use list tables.  See the links at the
> end of the following post.
> 

Hi, Jambunathan,

This looks really interesting also. Is this feature going to fund its way to the trunk at some point?

Thanks!
-pd


-- 
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

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

* Re: Tables with line wrapping?
  2014-02-23 12:39   ` Peter Davis
@ 2014-03-01  8:09     ` Bastien
  0 siblings, 0 replies; 10+ messages in thread
From: Bastien @ 2014-03-01  8:09 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

Hi Peter,

Peter Davis <pfd@pfdstudio.com> writes:

> This looks really interesting also. Is this feature going to fund
> its way to the trunk at some point?

Sadly no, because Jambunathan does not want to sign the copyright
agreement that would be requested for this.

-- 
 Bastien

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

* Re: Tables with line wrapping?
  2014-02-23  4:08   ` Peter Davis
@ 2014-03-09  1:08     ` Marcin Borkowski
  2014-03-09  3:02       ` Peter Davis
  0 siblings, 1 reply; 10+ messages in thread
From: Marcin Borkowski @ 2014-03-09  1:08 UTC (permalink / raw)
  To: emacs-orgmode

Dnia 2014-02-22, o godz. 23:08:23
Peter Davis <pfd@pfdstudio.com> napisał(a):

> [...] but then I'd have to bypass pdflatex and
> use xelatex or something instead.)

Or not.  http://www.ctan.org/pkg/pdftricks

Hth,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University

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

* Re: Tables with line wrapping?
  2014-03-09  1:08     ` Marcin Borkowski
@ 2014-03-09  3:02       ` Peter Davis
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Davis @ 2014-03-09  3:02 UTC (permalink / raw)
  To: emacs-orgmode


On Sat, Mar 8, 2014, at 08:08 PM, Marcin Borkowski wrote:
> Dnia 2014-02-22, o godz. 23:08:23
> Peter Davis <pfd@pfdstudio.com> napisał(a):
> 
> > [...] but then I'd have to bypass pdflatex and
> > use xelatex or something instead.)
> 
> Or not.  http://www.ctan.org/pkg/pdftricks
> 

Interesting! I'll definitely have a look at this.

Thank you!

-pd


-- 
  Peter Davis
  www.techcurmudgeon.com
  www.timebums.com

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

end of thread, other threads:[~2014-03-09  3:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-22 19:30 Tables with line wrapping? Peter Davis
2014-02-22 21:01 ` Thomas S. Dye
2014-02-23  4:04   ` Peter Davis
2014-02-22 21:05 ` Richard Lawrence
2014-02-23  4:08   ` Peter Davis
2014-03-09  1:08     ` Marcin Borkowski
2014-03-09  3:02       ` Peter Davis
2014-02-23  5:00 ` Jambunathan K
2014-02-23 12:39   ` Peter Davis
2014-03-01  8:09     ` Bastien

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