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

Alignment of (Pandoc) markdown grid tables #158

Open
robert-winkler opened this issue Jan 11, 2024 · 1 comment
Open

Alignment of (Pandoc) markdown grid tables #158

robert-winkler opened this issue Jan 11, 2024 · 1 comment

Comments

@robert-winkler
Copy link

Hi, the EasyAlign plugin saves me a lot of manual 'spaces' when creating tables.
However, what can I do to correctly align the following table:

+-------------+----------------+--------------------------+-------------------+--------------------------+
| **Crop/**   | **Equipment**  | **Quality trait**        | **Statistical**   | **Reference**                  |
| **plant-**  |                |                          | **determination** |                                |
| **based**   |                |                          | **of biomarker**  |                                |
| **product** |                |                          |                   |                                |
+=============+=====+==========+==========================+===================+==========================+
| **Apple**   | GC-MS          | Post-storage changes,    | PCA-VIP scores    | [@rudell_prestorage_2008       |
|             | LC-UV/vis-MS   | metabolite levels        |                   |                                |
|             |                | associated with ethylene |                   |                                |
|             |                | synphesis, flavonoid     |                   |                                |
|             |                | pigment synphesis, and   |                   |                                |
|             |                | fruit texture            |                   |                                |
| +----------------+--------------------------+-------------------+--------------------------+
|             | UHPLC-DAD-HRMS | Post-harvest quality,    | PCA-VIP scores    | [@sun_composition_2017]        |
|             |                | post-harvest blue mold   |                   |                                |
|             |                | resistance               |                   |                                |
| +----------------+--------------------------+-------------------+--------------------------+
|             | ^1^H NMR       | Post-storage metabolite  | PCA-VIP scores    | [@brizzolara_metabolomics_2017 |
|             | GC-MS          | changes under low-oxygen | PLS               |                                |
|             | HS-SPME-GC-MS  | atmosphere storage       |                   |
+------------------+------------------+------------------+------------------+------------------+

The problem are the lines with | +----------------+--------------------------+-------------------+--------------------------+
The | are aligned with :EasyAlign *|; but the spaces of the 'incomplete' lines are removed.
The result should look like:

+-------------+----------------+--------------------------+-------------------+---------------------------------+
| **Crop/**   | **Equipment**  | **Quality trait**        | **Statistical**   | **Reference**                   |
| **plant-**  |                |                          | **determination** |                                 |
| **based**   |                |                          | **of biomarker**  |                                 |
| **product** |                |                          |                   |                                 |
+=============+=====+==========+==========================+===================+=================================+
| **Apple**   | GC-MS          | Post-storage changes,    | PCA-VIP scores    | [@rudell_prestorage_2008]       |
|             | LC-UV/vis-MS   | metabolite levels        |                   |                                 |
|             |                | associated with ethylene |                   |                                 |
|             |                | synphesis, flavonoid     |                   |                                 |
|             |                | pigment synphesis, and   |                   |                                 |
|             |                | fruit texture            |                   |                                 |
|             +----------------+--------------------------+-------------------+---------------------------------+
|             | UHPLC-DAD-HRMS | Post-harvest quality,    | PCA-VIP scores    | [@sun_composition_2017]         |
|             |                | post-harvest blue mold   |                   |                                 |
|             |                | resistance               |                   |                                 |
|             +----------------+--------------------------+-------------------+---------------------------------+
|             | ^1^H NMR       | Post-storage metabolite  | PCA-VIP scores    | [@brizzolara_metabolomics_2017] |
|             | GC-MS          | changes under low-oxygen | PLS               |                                 |
|             | HS-SPME-GC-MS  | atmosphere storage       |                   |                                 |
+-------------+----------------+--------------------------+-------------------+---------------------------------+

I.e. I want to align the | and +; but the + according to the last column.
Is this possible?

@Konfekt
Copy link

Konfekt commented May 27, 2024

Have you considered the dedicated https://github.com/dhruvasagar/vim-table-mode plug-in?

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