public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* What is recommended way to generate three-line table?
@ 2017-06-20 14:32 jiewuza
       [not found] ` <m2efue91ci.fsf-9Onoh4P/yGk@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: jiewuza @ 2017-06-20 14:32 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

I want to write science paper in markdown.
But as far as I know, it is a weakness to prepare table in markdown.
So I would like to know how to do it and which is recommended for
three-line table.


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

* Re: What is recommended way to generate three-line table?
       [not found] ` <m2efue91ci.fsf-9Onoh4P/yGk@public.gmane.org>
@ 2017-06-20 15:14   ` John Gabriele
  2017-06-22  7:15     ` jiewuza
  0 siblings, 1 reply; 9+ messages in thread
From: John Gabriele @ 2017-06-20 15:14 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Not sure exactly what you mean by "three-line table". A table with only
three rows?
Regardless, Pandoc supports a few different syntaxes for writing tables;
see <http://pandoc.org/MANUAL.html#tables>.


On Tue, Jun 20, 2017, at 10:32 AM, jiewuza wrote:
> I want to write science paper in markdown.
> But as far as I know, it is a weakness to prepare table in markdown.
> So I would like to know how to do it and which is recommended for
> three-line table.
> 
> -- 
> 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/m2efue91ci.fsf%40163.com.
> For more options, visit https://groups.google.com/d/optout.


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

* Re: What is recommended way to generate three-line table?
  2017-06-20 15:14   ` John Gabriele
@ 2017-06-22  7:15     ` jiewuza
       [not found]       ` <m2a8508pdo.fsf-9Onoh4P/yGk@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: jiewuza @ 2017-06-22  7:15 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

John Gabriele <jgabriele-97jfqw80gc6171pxa8y+qA@public.gmane.org>
writes:

> Not sure exactly what you mean by "three-line table". A table with only
> three rows?
> Regardless, Pandoc supports a few different syntaxes for writing tables;
> see <http://pandoc.org/MANUAL.html#tables>.
>

Thanks for your link.
By three-line table, I mean the table shows only three border-lines: one
on the top, one on the bottom, and one between the header and the body,
looks like:

--------------------------
table header
--------------------------
table body



--------------------------

This is quite common in science papers.

>
> On Tue, Jun 20, 2017, at 10:32 AM, jiewuza wrote:
>> I want to write science paper in markdown.
>> But as far as I know, it is a weakness to prepare table in markdown.
>> So I would like to know how to do it and which is recommended for
>> three-line table.
>> 
>> -- 
>> 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/m2efue91ci.fsf%40163.com.
>> For more options, visit https://groups.google.com/d/optout.


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

* Re: What is recommended way to generate three-line table?
       [not found]       ` <m2a8508pdo.fsf-9Onoh4P/yGk@public.gmane.org>
@ 2017-06-22 16:15         ` Daniel Staal
       [not found]           ` <a4e10b09-21e5-bde1-eb02-8729634be98f-Jdbf3xiKgS8@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Staal @ 2017-06-22 16:15 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 6/22/17 3:15 AM, jiewuza wrote:
> John Gabriele<jgabriele-97jfqw80gc6171pxa8y+qA@public.gmane.org>
> writes:
> 
>> Not sure exactly what you mean by "three-line table". A table with only
>> three rows?
>> Regardless, Pandoc supports a few different syntaxes for writing tables;
>> see<http://pandoc.org/MANUAL.html#tables>.
>>
> Thanks for your link.
> By three-line table, I mean the table shows only three border-lines: one
> on the top, one on the bottom, and one between the header and the body,
> looks like:
> 
> --------------------------
> table header
> --------------------------
> table body
> 
> 
> 
> --------------------------
> 
> This is quite common in science papers.
>

You're looking for `multiline_tables`  The line between the header and 
the body will be broken up a little bit.  (To delineate where the 
columns are.)

The manual (already linked to) will tell you how to designate using them 
for output, if you need to.

Daniel T. Staal


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

* Re: What is recommended way to generate three-line table?
       [not found]           ` <a4e10b09-21e5-bde1-eb02-8729634be98f-Jdbf3xiKgS8@public.gmane.org>
@ 2017-06-22 17:39             ` John Gabriele
  2017-06-23 12:40               ` jiewuza
       [not found]               ` <1498153183.3679251.1018154976.5062E1FC-2RFepEojUI2N1INw9kWLP6GC3tUn3ZHUQQ4Iyu8u01E@public.gmane.org>
  0 siblings, 2 replies; 9+ messages in thread
From: John Gabriele @ 2017-06-22 17:39 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On Thu, Jun 22, 2017, at 12:15 PM, Daniel Staal wrote:
> On 6/22/17 3:15 AM, jiewuza wrote:
> > John Gabriele<jgabriele-97jfqw80gc6171pxa8y+qA@public.gmane.org>
> > writes:
> > 
> >> Not sure exactly what you mean by "three-line table". A table with only
> >> three rows?
> >> Regardless, Pandoc supports a few different syntaxes for writing tables;
> >> see<http://pandoc.org/MANUAL.html#tables>.
> >>
> > Thanks for your link.
> > By three-line table, I mean the table shows only three border-lines: one
> > on the top, one on the bottom, and one between the header and the body,
> > looks like:
> > 
> > --------------------------
> > table header
> > --------------------------
> > table body
> > 
> > 
> > 
> > --------------------------
> > 
> > This is quite common in science papers.
> >
> 
> You're looking for `multiline_tables`  The line between the header and 
> the body will be broken up a little bit.  (To delineate where the 
> columns are.)
> 
> The manual (already linked to) will tell you how to designate using them 
> for output, if you need to.
> 
> Daniel T. Staal

Oh, jiewuza may be looking for a way to have the *output html* have no
horizontal lines in between rows.

jiewuza, if that's the case, you might specify whether your output is
html or pdf. I don't know how to get either output format to do that.


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

* Re: What is recommended way to generate three-line table?
  2017-06-22 17:39             ` John Gabriele
@ 2017-06-23 12:40               ` jiewuza
       [not found]                 ` <m260fm98s8.fsf-9Onoh4P/yGk@public.gmane.org>
       [not found]               ` <1498153183.3679251.1018154976.5062E1FC-2RFepEojUI2N1INw9kWLP6GC3tUn3ZHUQQ4Iyu8u01E@public.gmane.org>
  1 sibling, 1 reply; 9+ messages in thread
From: jiewuza @ 2017-06-23 12:40 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

John Gabriele <jgabriele-97jfqw80gc6171pxa8y+qA@public.gmane.org>
writes:

> On Thu, Jun 22, 2017, at 12:15 PM, Daniel Staal wrote:
>> On 6/22/17 3:15 AM, jiewuza wrote:
>> > John Gabriele<jgabriele-97jfqw80gc6171pxa8y+qA@public.gmane.org>
>> > writes:
>> > 
>> >> Not sure exactly what you mean by "three-line table". A table with only
>> >> three rows?
>> >> Regardless, Pandoc supports a few different syntaxes for writing tables;
>> >> see<http://pandoc.org/MANUAL.html#tables>.
>> >>
>> > Thanks for your link.
>> > By three-line table, I mean the table shows only three border-lines: one
>> > on the top, one on the bottom, and one between the header and the body,
>> > looks like:
>> > 
>> > --------------------------
>> > table header
>> > --------------------------
>> > table body
>> > 
>> > 
>> > 
>> > --------------------------
>> > 
>> > This is quite common in science papers.
>> >
>> 
>> You're looking for `multiline_tables`  The line between the header and 
>> the body will be broken up a little bit.  (To delineate where the 
>> columns are.)
>> 
>> The manual (already linked to) will tell you how to designate using them 
>> for output, if you need to.
>> 
>> Daniel T. Staal
>
> Oh, jiewuza may be looking for a way to have the *output html* have no
> horizontal lines in between rows.
>
> jiewuza, if that's the case, you might specify whether your output is
> html or pdf. I don't know how to get either output format to do that.

Yes, that is what I want. Only three horizontal lines (on the top,
bottom and between header and body), no other lines in between rows.

I really hope there is a way for both html and pdf output.


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

* Re: What is recommended way to generate three-line table?
       [not found]               ` <1498153183.3679251.1018154976.5062E1FC-2RFepEojUI2N1INw9kWLP6GC3tUn3ZHUQQ4Iyu8u01E@public.gmane.org>
@ 2017-06-23 14:27                 ` BP Jonsson
  0 siblings, 0 replies; 9+ messages in thread
From: BP Jonsson @ 2017-06-23 14:27 UTC (permalink / raw)
  To: pandoc-discuss

Den 2017-06-22 kl. 19:39, skrev John Gabriele:
> Oh, jiewuza may be looking for a way to have the*output html*  have no
> horizontal lines in between rows.
> 
> jiewuza, if that's the case, you might specify whether your output is
> html or pdf. I don't know how to get either output format to do that.

As far as I know (I checked two minutes ago! :-) Pandoc already 
produces the table format desired by the OP in LaTeX output.

To get similar-looking tables in HTML output I use CSS like the 
following:

````css
/*  Save this as pandoc-table.css
  *    and include it with --css=pandoc-table.css
  *  Remember to always use relative units
  *    to scale well in different media/devices!
  *  Let the user decide their root font size
  *    -- their eyesight may be different from yours!
  */

table {
     /* centered tables look bad on wide screens!
      * We just make sure the table is gracefully indented.
      */
     margin: 1rem 2rem;
     border-top: 0.15rem solid black;
     border-bottom: 0.15rem solid black;
     border-collapse: collapse;
}

th, td { /* header cells and ordinary cells */
     padding: 0.25em 0.5em; /* space between rows & columns */
}

th { /* header cells only */
     font-weight: normal; /* not bold */
}

table tr:first-of-type th { /* header cells in top row only,
                              * just in case the table was not
                              * produced by pandoc!
                              */
     border-bottom: 0.1rem solid black; /* separator line */
}
````

/bpj



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

* Re: What is recommended way to generate three-line table?
       [not found]                 ` <m260fm98s8.fsf-9Onoh4P/yGk@public.gmane.org>
@ 2017-06-23 14:32                   ` John MacFarlane
  2017-06-24  1:39                     ` jiewuza
  0 siblings, 1 reply; 9+ messages in thread
From: John MacFarlane @ 2017-06-23 14:32 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


>Yes, that is what I want. Only three horizontal lines (on the top,
>bottom and between header and body), no other lines in between rows.
>
>I really hope there is a way for both html and pdf output.

That's the default for PDF output.

For HTML output, you don't get any lines by default.
You can add these with CSS.  Something like:

    table { border-top: 1px black; border-bottom: 1px black; }
    tr.header { border-bottom: 1px black; }


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

* Re: What is recommended way to generate three-line table?
  2017-06-23 14:32                   ` John MacFarlane
@ 2017-06-24  1:39                     ` jiewuza
  0 siblings, 0 replies; 9+ messages in thread
From: jiewuza @ 2017-06-24  1:39 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes:

>>Yes, that is what I want. Only three horizontal lines (on the top,
>>bottom and between header and body), no other lines in between rows.
>>
>>I really hope there is a way for both html and pdf output.
>
> That's the default for PDF output.
>
> For HTML output, you don't get any lines by default.
> You can add these with CSS.  Something like:
>
>    table { border-top: 1px black; border-bottom: 1px black; }
>    tr.header { border-bottom: 1px black; }

Nice.
Thank you.


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

end of thread, other threads:[~2017-06-24  1:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-20 14:32 What is recommended way to generate three-line table? jiewuza
     [not found] ` <m2efue91ci.fsf-9Onoh4P/yGk@public.gmane.org>
2017-06-20 15:14   ` John Gabriele
2017-06-22  7:15     ` jiewuza
     [not found]       ` <m2a8508pdo.fsf-9Onoh4P/yGk@public.gmane.org>
2017-06-22 16:15         ` Daniel Staal
     [not found]           ` <a4e10b09-21e5-bde1-eb02-8729634be98f-Jdbf3xiKgS8@public.gmane.org>
2017-06-22 17:39             ` John Gabriele
2017-06-23 12:40               ` jiewuza
     [not found]                 ` <m260fm98s8.fsf-9Onoh4P/yGk@public.gmane.org>
2017-06-23 14:32                   ` John MacFarlane
2017-06-24  1:39                     ` jiewuza
     [not found]               ` <1498153183.3679251.1018154976.5062E1FC-2RFepEojUI2N1INw9kWLP6GC3tUn3ZHUQQ4Iyu8u01E@public.gmane.org>
2017-06-23 14:27                 ` BP Jonsson

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