emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [LaTeX-Export] Longtable and Caption
@ 2009-12-02  7:51 Ulf Stegemann
  2009-12-03 14:37 ` Carsten Dominik
  0 siblings, 1 reply; 6+ messages in thread
From: Ulf Stegemann @ 2009-12-02  7:51 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

is there any good reason why there's always a caption (\caption{})
included whenever a table is exported to LaTeX as longtable environment?
If there isn't, I would strongly prefer to have the same behaviour with
longtable as with ordinary tables, i.e. suppress the caption if
`#+CAPTION:' is not explicitly given.

Ulf

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

* Re: [LaTeX-Export] Longtable and Caption
  2009-12-02  7:51 [LaTeX-Export] Longtable and Caption Ulf Stegemann
@ 2009-12-03 14:37 ` Carsten Dominik
  2009-12-03 15:22   ` Ulf Stegemann
  0 siblings, 1 reply; 6+ messages in thread
From: Carsten Dominik @ 2009-12-03 14:37 UTC (permalink / raw)
  To: Ulf Stegemann; +Cc: emacs-orgmode

Hi Ulf,

it was my understanding that the caption command in longtable is  
different from the caption command in normal tables, in that it is a  
line that is printed over the table on each page - so I thought it  
always needs to be there.  Is that not correct?

- Carsten

On Dec 2, 2009, at 8:51 AM, Ulf Stegemann wrote:

> Hi,
>
> is there any good reason why there's always a caption (\caption{})
> included whenever a table is exported to LaTeX as longtable  
> environment?
> If there isn't, I would strongly prefer to have the same behaviour  
> with
> longtable as with ordinary tables, i.e. suppress the caption if
> `#+CAPTION:' is not explicitly given.
>
> Ulf
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

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

* Re: [LaTeX-Export] Longtable and Caption
  2009-12-03 14:37 ` Carsten Dominik
@ 2009-12-03 15:22   ` Ulf Stegemann
  2009-12-16 23:17     ` Carsten Dominik
  0 siblings, 1 reply; 6+ messages in thread
From: Ulf Stegemann @ 2009-12-03 15:22 UTC (permalink / raw)
  To: emacs-orgmode

Hi Carsten,

Carsten Dominik <carsten.dominik@gmail.com> wrote:

> it was my understanding that the caption command in longtable is different
> from the caption command in normal tables, in that it is a  line that is
> printed over the table on each page - so I thought it  always needs to be
> there.  Is that not correct?

yes, treatment is different but nevertheless the caption is not
mandatory for longtable. I never had any problems with longtable tables
without \caption{}.

Ulf

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

* Re: Re: [LaTeX-Export] Longtable and Caption
  2009-12-03 15:22   ` Ulf Stegemann
@ 2009-12-16 23:17     ` Carsten Dominik
  2009-12-17  7:59       ` Ulf Stegemann
  0 siblings, 1 reply; 6+ messages in thread
From: Carsten Dominik @ 2009-12-16 23:17 UTC (permalink / raw)
  To: Ulf Stegemann; +Cc: emacs-orgmode


On Dec 3, 2009, at 4:22 PM, Ulf Stegemann wrote:

> Hi Carsten,
>
> Carsten Dominik <carsten.dominik@gmail.com> wrote:
>
>> it was my understanding that the caption command in longtable is  
>> different
>> from the caption command in normal tables, in that it is a  line  
>> that is
>> printed over the table on each page - so I thought it  always needs  
>> to be
>> there.  Is that not correct?
>
> yes, treatment is different but nevertheless the caption is not
> mandatory for longtable. I never had any problems with longtable  
> tables
> without \caption{}.

Hi Ulf,

sorry for being so slow to process this request.

I believe this works now as you requested, please verify.

- Carsten

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

* Re: [LaTeX-Export] Longtable and Caption
  2009-12-16 23:17     ` Carsten Dominik
@ 2009-12-17  7:59       ` Ulf Stegemann
  2009-12-17  9:58         ` Carsten Dominik
  0 siblings, 1 reply; 6+ messages in thread
From: Ulf Stegemann @ 2009-12-17  7:59 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi Carsten,

Carsten Dominik <carsten.dominik@gmail.com> wrote:

> On Dec 3, 2009, at 4:22 PM, Ulf Stegemann wrote:
>
>> Carsten Dominik <carsten.dominik@gmail.com> wrote:
>>
>>> it was my understanding that the caption command in longtable is different
>>> from the caption command in normal tables, in that it is a  line that is
>>> printed over the table on each page - so I thought it  always needs to be
>>> there.  Is that not correct?
>>
>> yes, treatment is different but nevertheless the caption is not
>> mandatory for longtable. I never had any problems with longtable tables
>> without \caption{}.
>
> sorry for being so slow to process this request.
>
> I believe this works now as you requested, please verify.

thanks for having a look at it (no need to apologise for the delay, it's
certainly not an urgent matter).

Captions are now suppressed for longtables without caption definition.
However, I've noticed that the extra linebreak (\\) is still inserted in
longtable environments regardless of the presence of a caption. That
linebreak leads to undesired effects when using longtable without a
caption but with vertical lines.

This should fix it:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-latex_table-export.diff --]
[-- Type: text/x-patch, Size: 643 bytes --]

--- org-latex.el.orig	2009-12-17 08:10:19.000000000 +0100
+++ org-latex.el	2009-12-17 08:49:02.000000000 +0100
@@ -1538,7 +1538,7 @@
                              "\\caption{%s%s}"
                              (if label (concat "\\\label{" label "}") "")
                              (or caption "")))
-                        (if longtblp "\\\\\n" "\n")
+                        (if (and longtblp caption) "\\\\\n" "\n")
                         (if (and org-export-latex-tables-centered (not longtblp))
                             "\\begin{center}\n")
                         (if (not longtblp) (concat "\\begin{tabular}{" align "}\n"))

[-- Attachment #3: Type: text/plain, Size: 5 bytes --]


Ulf

[-- Attachment #4: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Re: [LaTeX-Export] Longtable and Caption
  2009-12-17  7:59       ` Ulf Stegemann
@ 2009-12-17  9:58         ` Carsten Dominik
  0 siblings, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2009-12-17  9:58 UTC (permalink / raw)
  To: Ulf Stegemann; +Cc: emacs-orgmode

Applied, thanks.

- Carsten

On Dec 17, 2009, at 8:59 AM, Ulf Stegemann wrote:

> Hi Carsten,
>
> Carsten Dominik <carsten.dominik@gmail.com> wrote:
>
>> On Dec 3, 2009, at 4:22 PM, Ulf Stegemann wrote:
>>
>>> Carsten Dominik <carsten.dominik@gmail.com> wrote:
>>>
>>>> it was my understanding that the caption command in longtable is  
>>>> different
>>>> from the caption command in normal tables, in that it is a  line  
>>>> that is
>>>> printed over the table on each page - so I thought it  always  
>>>> needs to be
>>>> there.  Is that not correct?
>>>
>>> yes, treatment is different but nevertheless the caption is not
>>> mandatory for longtable. I never had any problems with longtable  
>>> tables
>>> without \caption{}.
>>
>> sorry for being so slow to process this request.
>>
>> I believe this works now as you requested, please verify.
>
> thanks for having a look at it (no need to apologise for the delay,  
> it's
> certainly not an urgent matter).
>
> Captions are now suppressed for longtables without caption definition.
> However, I've noticed that the extra linebreak (\\) is still  
> inserted in
> longtable environments regardless of the presence of a caption. That
> linebreak leads to undesired effects when using longtable without a
> caption but with vertical lines.
>
> This should fix it:
>
> --- org-latex.el.orig	2009-12-17 08:10:19.000000000 +0100
> +++ org-latex.el	2009-12-17 08:49:02.000000000 +0100
> @@ -1538,7 +1538,7 @@
>                              "\\caption{%s%s}"
>                              (if label (concat "\\\label{" label  
> "}") "")
>                              (or caption "")))
> -                        (if longtblp "\\\\\n" "\n")
> +                        (if (and longtblp caption) "\\\\\n" "\n")
>                         (if (and org-export-latex-tables-centered  
> (not longtblp))
>                             "\\begin{center}\n")
>                         (if (not longtblp) (concat "\\begin{tabular} 
> {" align "}\n"))
>
> Ulf
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

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

end of thread, other threads:[~2009-12-17 10:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-02  7:51 [LaTeX-Export] Longtable and Caption Ulf Stegemann
2009-12-03 14:37 ` Carsten Dominik
2009-12-03 15:22   ` Ulf Stegemann
2009-12-16 23:17     ` Carsten Dominik
2009-12-17  7:59       ` Ulf Stegemann
2009-12-17  9:58         ` Carsten Dominik

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