WestCoastProjects
WestCoastProjects

Reputation: 63162

Nested indention levels within a Pandoc flavored Markdown table

Given the following attempt to obtain nested indentions within a Markdown table: pay special attention to the -Methods and its nested items of - data sources, - study eligibility criteria etc:

| Component | Description | Our Approach |
|---|---|---|
| Title |  Identify the report as a systematic review incorporating a network meta-analysis (or related form of meta-analysis). | A Network Meta-Analysis of Treatments for Recurrent GBM |
| Abstract / Structured Summary | - _Background_ : main objectives  |
|     | - _Methods_ | 
|     |    - data sources | 
|     |    - study eligibility criteria | 
|     |    - participants | 
|     |    - interventions | 
|     |    - study appriasal | 
|     |    - synthesis methods such as NMA | 
|     | - _Results_ | 
|     |   - number of studies and participants identified | 
|     |   - summary estimates with corresponding confidence/credible intervals | 
|     |   - treatment rankings may also be discussed | 
|     |   - Authors may choose to summarize pairwsie comparisons against a chosen treatment | 
|     |      included in their analyses for brevity | 

The result of this after passing through pandoc is not bad but does lose the nested indention levels:

enter image description here

So specifically for the following lines - is there any way to preserve/support the nested indentions?

|     | - _Methods_ | 
|     |    - data sources | 
|     |    - study eligibility criteria | 
|     |    - participants | 

Upvotes: 0

Views: 225

Answers (2)

WestCoastProjects
WestCoastProjects

Reputation: 63162

A rather awkward - but not unworkable - approach can be to add non-breaking-spaces  .

| Abstract / Structured Summary | - _Background_ : main objectives  |
|     | - _Methods_ | 
|     |        - data sources | 
|     |        - study eligibility criteria | 

enter image description here

What I will do is add the multiple  's to a paste buffer in my editor that can then be consistently added by a single paste-from-buffer operation

Upvotes: 0

mrhd
mrhd

Reputation: 1076

One way to achieve that is by using grid_tables:

+-------------------------------+--------------------------------------------+------------------------------+
| Component                     | Description                                | Our Approach                 |
+===============================+============================================+==============================+
| Title                         | Identify the report as a systematic review | A Network Meta-Analysis of   |
|                               | incorporating a network meta-analysis      | Treatments for Recurrent GBM |
|                               | (or related form of meta-analysis).        |                              |
+-------------------------------+--------------------------------------------+------------------------------+
| Abstract /                    | - _Background_ : main objectives           |                              |
| Structured Summary            | - _Methods_                                |                              |
|                               |   - data sources                           |                              |
|                               |   - study eligibility criteria             |                              |
|                               |   - participants                           |                              |
|                               |   - interventions                          |                              |
|                               |   - study appraisal                        |                              |
|                               |   - synthesis methods such as NMA          |                              |
|                               | - _Results_                                |                              |
|                               |   - ...                                    |                              |
+-------------------------------+--------------------------------------------+------------------------------+

It's a bit tedious, but it does what you want: enter image description here

For reference, I used this command to convert from Markdown to PDF:

 cat tbl.md | pandoc -f markdown -t latex -V geometry:landscape -o tbl.pdf

Upvotes: 3

Related Questions