Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header horizontal character style customization #37

Open
GoogleCodeExporter opened this issue Jun 4, 2015 · 9 comments
Open

Header horizontal character style customization #37

GoogleCodeExporter opened this issue Jun 4, 2015 · 9 comments

Comments

@GoogleCodeExporter
Copy link

Hello,

I would like to create Pandoc Markdown compliant grid tables. For this I just 
need to be able to change the header horizontal character to '=' while leaving 
the table borders and column separators at '-' 

I think this small change would be an excellent addition. Thanks very much for 
your great library. 

Original issue reported on code.google.com by [email protected] on 25 Sep 2013 at 6:57

@GoogleCodeExporter
Copy link
Author

Hi there,

Thanks for your feature request.  I've been looking at the Pandoc Markdown 
documentation, and it seems like one of the options for a table is the 
following:

  Right     Left     Center     Default
-------     ------ ----------   -------
     12     12        12            12
    123     123       123          123
      1     1          1             1

(the specs call this "simple table syntax").  I believe it's possible to get 
tables of this kind out of PrettyTable 0.7 and above by setting:

table.vrules = prettytable.NONE
table.hrules = prettytable.FRAME

Can you please let me know if this works for you in Pandoc?

If it does work, I'll make a PANDOC pre-define style (like the MSWORD_FRIENDLY 
one) so future Pandoc users don't need to figure this out for themselves.

Thanks again,
Luke

Original comment by [email protected] on 6 Oct 2013 at 11:12

@GoogleCodeExporter
Copy link
Author

[deleted comment]

1 similar comment
@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Got it, but it makes tables like this:

---------------------------------------
  Right     Left     Center     Default
---------------------------------------
     12     12        12            12
    123     123       123          123
      1     1          1             1
---------------------------------------

Which I don't think will work.

Original comment by [email protected] on 11 Oct 2013 at 2:53

@GoogleCodeExporter
Copy link
Author

Confirmed that it does NOT work. 

Pandoc is looking for separations between columns otherwise it can't figure out 
that it's a table. 

I think the best is still adding an option to the original table because it's 
the nicest looking IMHO: 

+---------------+---------------+--------------------+
| Fruit         | Price         | Advantages         |
+===============+===============+====================+
| Bananas       | $1.34         | - built-in wrapper |
|               |               | - bright color     |
+---------------+---------------+--------------------+
| Oranges       | $2.10         | - cures scurvy     |
|               |               | - tasty            |
+---------------+---------------+--------------------+

BUT this would also work I think:

---------------------------------------
  Right     Left     Center     Default
--------- -------- ---------- ---------
     12     12        12            12
    123     123       123          123
      1     1          1             1
---------------------------------------


Original comment by [email protected] on 11 Oct 2013 at 3:05

@GoogleCodeExporter
Copy link
Author

How about:

table.hrules=HEADER
table.junction_char=" "
table.vertical_char=" "

This will produce:

  foo   bar   baz  
 ----- ----- ----- 
   1     2     3   
   1     2     3   
   1     2     3 

Which should work according to the Pandoc docs.

Original comment by [email protected] on 13 Oct 2013 at 5:53

@GoogleCodeExporter
Copy link
Author

There we go, that works great with pandoc! Thanks for the help.

Original comment by [email protected] on 13 Oct 2013 at 6:09

@GoogleCodeExporter
Copy link
Author

Wonderful!  Glad it works.  I will make sure that in the next release there is 
a PANDOC preset which makes this easy.  Thanks for letting me know about the 
Pandoc compatibility issue.

Original comment by [email protected] on 13 Oct 2013 at 6:24

@GoogleCodeExporter
Copy link
Author

No problem, you might want to call it PANDOC_MARKDOWN or something similar
to indicate that this is for Pandoc markdown parsing.

Thanks for the very useful work!

Original comment by [email protected] on 13 Oct 2013 at 6:28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant