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

[Feature Request] Pandoc grid tables #269

Open
gitdramaqueen opened this issue Sep 13, 2022 · 1 comment
Open

[Feature Request] Pandoc grid tables #269

gitdramaqueen opened this issue Sep 13, 2022 · 1 comment

Comments

@gitdramaqueen
Copy link

Hi, thanks for this and for preview enhanced.

This is my feature request to support Pandoc's grid tables. Here's a sample:

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

There's an old feature request for this in the preview-enhanced repo. And one of the developers has suggested a roadmap to add the functionality. I have just started at uni, so I don't have the skills to submit a PR, sorry.

But I did find a markdown-it plug-in that adds the support.

Maybe someone more knowledgeable than me can add it in? I'd very much appreciate it.

@chagmed
Copy link

chagmed commented Oct 8, 2023

@gitdramaqueen Did you try to render a Pandoc grid table with MPE and find that it didn't work?

  • Make sure you have Pandoc installed and in your system PATH.

  • You can test your installation from the command line by pasting the example table below into a file, e.g., grid_test.md.

  • Command: pandoc -f markdown -o grid_test.pdf grid_test.md

  • Open the generated PDF, which should contain a nicely-formatted table, and a caption above it.

  • If the above works, in VSCode's MPE extension settings, enter Pandoc Path (in my case, pandoc).

  • Check (enable) the option Use Pandoc Parser

  • Copy the test file to your VSCode project, open it, preview using MPE. It should look essentially like the PDF you generated via the command line.

: Pandoc-only `grid_tables` extension works with *MPE*

+------------+--------------------------------+
| Name       | Description                    |
+============+================================+
| Betsy      | Excellent coding skills, very  |
|            | hard worker, deserves a bonus. |
|            | Has management potential.      |
+------------+--------------------------------+
| Johnny     | Always late to work. His code  |
|            | is OK, but he works slowly.    |
+------------+--------------------------------+

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

No branches or pull requests

2 participants