public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Table column width in pipe tables
@ 2016-04-07  1:03 news-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA
       [not found] ` <470f5401-a92d-4955-aff6-d7f242b2cbd9-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: news-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA @ 2016-04-07  1:03 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1595 bytes --]

I'm using pipe tables like

| Key combo | Description |
| --- | --- |
| Shift + Cmd + arrows up/down | go through MoneyWiz sections such as 
Accounts, Dashboard, Budgets, Reports, etc. |

quite a bit. 

(1) However I do not understand the logic *how the width of the table 
columns is determined*. In the case above the 2nd column will be extremely 
narrow. 

I can rectify this by longer dash lines like

| --------- | --------- |

But why? And how long do I have to make them? (I would have thought the 
*relative* length would be used; so in the case of the dash line

| --- | --- |

each column would get a max of 50%.)

(2) The documentation says:

If a pipe table contains a row whose printable content is wider than the 
column width (see --columns), then the cell contents will wrap, with the 
relative cell widths determined by the widths of the separator lines.

However elsewhere the doco states that --columns "affects only the 
generated source code". So what's the logic and mechanism here?

Many thanks,
Leo

-- 
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/470f5401-a92d-4955-aff6-d7f242b2cbd9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 3186 bytes --]

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

* Re: Table column width in pipe tables
       [not found] ` <470f5401-a92d-4955-aff6-d7f242b2cbd9-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2016-04-08 22:00   ` John MacFarlane
       [not found]     ` <20160408220003.GC61469-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: John MacFarlane @ 2016-04-08 22:00 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ news-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org [Apr 06 16 18:03 ]:
>   I'm using pipe tables like
>   | Key combo | Description |
>   | --- | --- |
>   | Shift + Cmd + arrows up/down | go through MoneyWiz sections such as
>   Accounts, Dashboard, Budgets, Reports, etc. |
>   quite a bit.
>   (1) However I do not understand the logic how the width of the table
>   columns is determined. In the case above the 2nd column will be
>   extremely narrow.
>   I can rectify this by longer dash lines like
>   | --------- | --------- |
>   But why? And how long do I have to make them? (I would have thought
>   the relative length would be used; so in the case of the dash line
>   | --- | --- |
>   each column would get a max of 50%.)

Column widths are ratios of the line lengths to the overall
column width (see --columns).  That's because people don't
always want their tables to be 100% width.

>   (2) The documentation says:
>   If a pipe table contains a row whose printable content is wider than
>   the column width (see --columns), then the cell contents will wrap,
>   with the relative cell widths determined by the widths of the separator
>   lines.

Yes, this is the part that explains the behavior you're
seeing.  You have a long cell there, that pandoc thinks
will need to wrap.

So it adds the column widths.  If you want bigger column
widths, use bigger separators (-----------).

>   However elsewhere the doco states that --columns "affects only the
>   generated source code". So what's the logic and mechanism here?

This isn't accurate any more, since we also use column width
to determine relative table column width, so the README
should be adjusted.  I will change it.


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

* Re: Table column width in pipe tables
       [not found]     ` <20160408220003.GC61469-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
@ 2016-06-29 17:39       ` Adam Rice
       [not found]         ` <1c7d17cc-62a4-47c5-a7ac-cc3594bdd3fd-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Rice @ 2016-06-29 17:39 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1064 bytes --]

I also use pipe tables a lot, and I've encountered a related issue.

I have a document with a series of similar pipe tables (same column 
headers, different content). I would like for them to all have the same 
column widths for visual consistency. So far, I haven't found the magic 
combination of table separators and/or pandoc command options that will 
force this behavior. I've also started playing with inserting HTML directly 
into the Markdown, but that kind of undermines the point.

-- 
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/1c7d17cc-62a4-47c5-a7ac-cc3594bdd3fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1507 bytes --]

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

* Re: Table column width in pipe tables
       [not found]         ` <1c7d17cc-62a4-47c5-a7ac-cc3594bdd3fd-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2016-06-29 18:06           ` John MACFARLANE
  0 siblings, 0 replies; 4+ messages in thread
From: John MACFARLANE @ 2016-06-29 18:06 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

If you're targeting HTML, you could just use CSS.
If all the tables in your document should have the same
column widths, just set a fixed width for td.

If you want this to affect only some tables, you could
wrap these tables in a div (assuming you're using the
markdown_in_html_blocks or native_divs extension).

Or, use pandoc multiline tables.

+++ Adam Rice [Jun 29 16 10:39 ]:
>   I also use pipe tables a lot, and I've encountered a related issue.
>   I have a document with a series of similar pipe tables (same column
>   headers, different content). I would like for them to all have the same
>   column widths for visual consistency. So far, I haven't found the magic
>   combination of table separators and/or pandoc command options that will
>   force this behavior. I've also started playing with inserting HTML
>   directly into the Markdown, but that kind of undermines the point.
>
>   --
>   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 [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [3]https://groups.google.com/d/msgid/pandoc-discuss/1c7d17cc-62a4-47c5-
>   a7ac-cc3594bdd3fd%40googlegroups.com.
>   For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. https://groups.google.com/d/msgid/pandoc-discuss/1c7d17cc-62a4-47c5-a7ac-cc3594bdd3fd-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout


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

end of thread, other threads:[~2016-06-29 18:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-07  1:03 Table column width in pipe tables news-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA
     [not found] ` <470f5401-a92d-4955-aff6-d7f242b2cbd9-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-04-08 22:00   ` John MacFarlane
     [not found]     ` <20160408220003.GC61469-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
2016-06-29 17:39       ` Adam Rice
     [not found]         ` <1c7d17cc-62a4-47c5-a7ac-cc3594bdd3fd-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-06-29 18:06           ` John MACFARLANE

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