public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: "Gabriel Nützi" <gnuetzi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Pandoc: Suggestions for latex table generator
Date: Thu, 19 Nov 2020 12:05:26 -0800	[thread overview]
Message-ID: <m2k0uh3yex.fsf@MacBook-Pro.hsd1.ca.comcast.net> (raw)
In-Reply-To: <277ee96f-10bd-6db4-3c2f-7ee37527d68b-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>


The recommendation to use p columns may be fine for some cases,
but I'm skeptical it will work for all of the block-level
constructions pandoc needs to produce.  I think there was a
reason we used minipage and not p.

Worth experimenting around with it, though.

Gabriel Nützi <gnuetzi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> *Hi all,*
>
> As I realized, styling tables especially for HTML output is a breeze, 
> because of CSS, styling with Latex Output, you need to post-process the 
> pandoc output,
> or write your own writer (really dont want to do this).
>
> The question is why the current writer uses always `minipages` inside 
> `longtable` (if lists are present) and does not use something like this.
> Are there ways to influence the styling better than Regex/Python 
> postprocessing the output of Pandoc. meaning removing wrong `/strut`, 
> changing row definitions etc...
>
> The following table in question: 
> https://tex.stackexchange.com/questions/571329/minipage-in-table-has-strange-inter-row-spacing
> is produced by Pandoc which is not really ideal, nor does it allow any 
> customization in the Tex-Template or so...
> I am not a latex expert, maybe some of them could comment on the below 
> rather parametric approach.
>
> *Thanks a lot*
>
>
> The better output would be along the line (as answered in the question), 
> by using :
>
> |\documentclass{article} \usepackage{array, % new booktabs, longtable, 
> makecell} % new \usepackage{enumitem} % new \usepackage{etoolbox} % new 
> \AtBeginEnvironment{longtable}{% \setlist[itemize]{nosep=0pt, 
> leftmargin=*, label=\textbullet, after=\end{minipage}, % <--- 
> before=\begin{minipage}[t]{\linewidth} % <--- }} \begin{document} 
> \begingroup \setcellgapes{2pt} \makegapedcells \begin{longtable}[]{@{} 
>  >{\raggedright}p{\dimexpr0.45\columnwidth-\tabcolsep} 
>  >{\raggedright}p{\dimexpr0.55\columnwidth-\tabcolsep} @{}} 
> \caption{Title}\tabularnewline \toprule Column A & Column B 
> \tabularnewline \midrule \endfirsthead \toprule|
> |Column A & Column B|
> |\tabularnewline \midrule \endhead Was ist passiert? & \begin{itemize} 
> \item Item 1 \item Item 2 \end{itemize} \tabularnewline Wie fühle ich 
> mich? Und du? & |||\begin{itemize} \item Item 1 \item Item 2 \end{itemize} 
> \tabularnewline|\bottomrule \end{longtable} \endgroup|
>
> -- 
> 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/277ee96f-10bd-6db4-3c2f-7ee37527d68b%40gmail.com.

-- 
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/m2k0uh3yex.fsf%40MacBook-Pro.hsd1.ca.comcast.net.


  parent reply	other threads:[~2020-11-19 20:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11 16:15 Formatting of "ibid" in v2.11.x Joshua
     [not found] ` <965d161d-db68-439f-acab-c035c89ec0dfn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-11 18:01   ` John MacFarlane
     [not found]     ` <m2wnyrlqn0.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-11-11 19:02       ` Joshua
2020-11-11 19:37         ` Denis Maier
     [not found]         ` <557267e8-3f30-45aa-8b58-50fc6ba71531n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-11 19:37           ` 'Denis Maier' via pandoc-discuss
     [not found]             ` <5fac3d7d.1c69fb81.8ceda.81c8SMTPIN_ADDED_MISSING-AJJneosEFeET7FrJB5NJYwC/G2K4zDHf@public.gmane.org>
2020-11-11 19:41               ` 'Denis Maier' via pandoc-discuss
     [not found]                 ` <5fac3e55.1c69fb81.f7f71.1ee3SMTPIN_ADDED_MISSING-AJJneosEFeET7FrJB5NJYwC/G2K4zDHf@public.gmane.org>
2020-11-11 19:57                   ` Joshua
2020-11-11 19:41             ` Denis Maier
2020-11-11 20:12           ` John MacFarlane
     [not found]             ` <m27dqrirf5.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2020-11-11 20:17               ` Joshua
2020-11-15 12:06               ` jcr
     [not found]                 ` <91253106-0a3e-4139-ab0e-2dbbed3f7been-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-15 16:36                   ` AW: " denis.maier-FfwAq0itz3ofv37vnLkPlQ
     [not found]                     ` <6fbe9e68e26342fda7586938e5139882-FfwAq0itz3ofv37vnLkPlQ@public.gmane.org>
2020-11-15 19:12                       ` denis.maier-FfwAq0itz3ofv37vnLkPlQ
2020-11-16 16:46                   ` John MacFarlane
     [not found]                     ` <CAGOSsdkBbvh4jYQbwK9+Ay3nWFEo_cZ0uFN=w6tDoG76hqQGYg@mail.gmail.com>
     [not found]                       ` <m2k0ul82g7.fsf@MacBook-Pro.hsd1.ca.comcast.net>
     [not found]                         ` <m2k0ul82g7.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-11-16 20:37                           ` John MacFarlane
     [not found]                             ` <m2ft5982dm.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-11-18 10:08                               ` Pandoc: Suggestions for latex table generator Gabriel Nützi
     [not found]                                 ` <277ee96f-10bd-6db4-3c2f-7ee37527d68b-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-11-19 20:05                                   ` John MacFarlane [this message]
2020-11-19 20:14                                   ` John MacFarlane
     [not found]                                     ` <m2eekp3y0e.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-11-19 20:18                                       ` John MacFarlane
2020-11-22 18:13                                   ` John MacFarlane

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2k0uh3yex.fsf@MacBook-Pro.hsd1.ca.comcast.net \
    --to=jgm-tvlzxgkolnx2fbvcvol8/a@public.gmane.org \
    --cc=gnuetzi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).