Forum How do I...?

Table caption and page break

syllogism
I'm working on a M.A. thesis and have a specific requirement for tables.

They should ideally be on one page but, if they must break, must repeat the table number and the word "continued".

So:

Table 1: Some random caption

----- break -----

Table 1: Continued


I'm aware that <thead> allows a header row to span page breaks, but <caption> does not function correctly when used as a child within it nor does this method provide for the automated addition of "Continued."

I could float the table to the top of the page, but the table must appear after an in-text explanation and floating it is not accurate enough.

Any ideas?
mikeday
It is not currently possible to create a repeated table caption that is different on following pages.

You could however create a repeated table caption that is the same on every page by placing the caption in a cell in the table header that spans all the table columns, like this:

<table>
<thead>
<tr>
<td colspan="3">Table 1: caption goes here</td>
</tr>
<tr>
<td>Actual</td><td>Column</td><td>Headings</td>
</tr>
</thead>
<tbody>
...
</tbody>
</table>
StoneCypher
You can effectively fake it. Set the page at the beginning of the table, and toy with headers to imitate a table caption.

John Haugeland is http://fullof.bs/

mikeday
Today we've released Prince 6.0 rev 5, which includes a new prince-caption-page property for controlling whether a table caption is repeated or not. This allows you to do something like this:
<table>
<caption style="prince-caption-page: first">Table 1</caption>
<caption style="prince-caption-page: following">Table 1 (cont.)</caption>
...
pkj
Mike,

I am interested in this too.

I may be incorrect but I thought you were only allowed one caption for a table?

If so, would it be better to have the option of whether to repeat the caption as a property of a table?

Regards

Peter
mikeday
HTML limits you to one caption per table, but CSS doesn't. If you want to be really tricky, you could add the second caption using CSS generated content, thereby still conforming to the HTML DTDs.
burkejam71
The caption property does not work. I am running Prince version 6.0 rev 5 for Solaris. Both captions are displayed in the PDF.
mikeday
Can you paste or email me (mikeday@yeslogic.com) a sample of your document?
burkejam71
Mike,
I listed the URL that I import into Prince.

https://www.thedacs.com/admin/gp/practices/html/gp_2.php
mikeday
It seems to work for me; I get "Table 1" displayed on page 4 and "Table 1 (cont.)" displayed on page 5 on subsequent pages. However, the markup does look a bit strange, there seems to be a stray <table> tag on line 82.
burkejam71
I tried the code on my windows box and it worked also. The machine I am having a problem with is running the Linux statis version on Fedora.
mikeday
Recently we have released Prince 6.0 rev 7, does the issue still appear with this new version?
burkejam71
I download the latest version and I am still experiencing the problem. Like I mentioned, it's strange because it works perfectly using it on my Windows Box but fails on the Linux Box( Fedora 6 ) and installed the latest Linux (static) version ( Prince 6.0 rev 7 )