public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Customize text on every page for long tables
@ 2023-01-11  0:02 jiewuza
  2023-01-11 20:35 ` BPJ
  0 siblings, 1 reply; 2+ messages in thread
From: jiewuza @ 2023-01-11  0:02 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

I have a long table that takes multiple pages. And my university requires that it shows some text like `Continued on next page` on each page.
I find
`https://tex.stackexchange.com/questions/637517/how-do-i-get-my-latex-table-to-continue-on-the-next-page`, and learn to use `\endhead` to specify rows to appear at the top of every page (under the headline, but before the other lines of the table).

My question is how can I customize the `\endhead` and `\endfoot` part.
I checked the lua filter manual. The Table element seems have no such properties.
-- 


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

* Re: Customize text on every page for long tables
  2023-01-11  0:02 Customize text on every page for long tables jiewuza
@ 2023-01-11 20:35 ` BPJ
  0 siblings, 0 replies; 2+ messages in thread
From: BPJ @ 2023-01-11 20:35 UTC (permalink / raw)
  To: pandoc-discuss

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

If I understand the longtable documentation correctly you'll have to modify
Pandoc's LaTeX output manually, i.e. instead of letting pandoc handle the
LaTeX → PDF step behind the scene you must convert Markdown to a LaTeX file:

``` shell
pandoc document.md -o document.ltx
```

then open the LaTeX file and look for where it says something like

``` latex
\begin{longtable}[]{@{}ll@{}}
\caption{My caption text}\tabularnewline
\toprule()
dolores & culpa \\
\midrule()
\endfirsthead
\toprule()
dolores & culpa \\
\midrule()
\endhead
```

(Typially you would search for the caption text. If that contains lots of
formatting you may want to insert some unique "word" into the caption in
the Markdown source, search for that in the LaTeX source and then delete it
in the LaTeX source.)

and insert

``` latex
\caption[]{(Continued from previous page)}\tabularnewline
```

just below `\endfirsthead`.

then do

``` shell
xelatex document.ltx
```

substituting your LaTeX engine of choice for `xelatex`.

Disclaimer: I don't have any texlive installation to hand to test this on
ATM because I'm 40 km from my laptop. Also it is ages since I needed to do
anything like this manually and I don't remember how I did it. This is my
best shot ATM. Please let me know how it goes!


Den ons 11 jan. 2023 01:03jiewuza <jiewuza-9Onoh4P/yGk@public.gmane.org> skrev:

> I have a long table that takes multiple pages. And my university requires
> that it shows some text like `Continued on next page` on each page.
> I find
> `
> https://tex.stackexchange.com/questions/637517/how-do-i-get-my-latex-table-to-continue-on-the-next-page`
> <https://tex.stackexchange.com/questions/637517/how-do-i-get-my-latex-table-to-continue-on-the-next-page>,
> and learn to use `\endhead` to specify rows to appear at the top of every
> page (under the headline, but before the other lines of the table).
>
> My question is how can I customize the `\endhead` and `\endfoot` part.
> I checked the lua filter manual. The Table element seems have no such
> properties.
> --
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/tpkubc%24dud%241%40ciao.gmane.io
> .
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhBpJ1%2BN49M7pDrGjFFgfeGzzL%3DGNdM9q08MQr4Qmm4ZJA%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 4719 bytes --]

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

end of thread, other threads:[~2023-01-11 20:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-11  0:02 Customize text on every page for long tables jiewuza
2023-01-11 20:35 ` BPJ

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 NNTP newsgroup(s).