jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.78k stars 3.39k forks source link

multiline tables and grid tables broken #1038

Closed Bercio closed 10 years ago

Bercio commented 11 years ago

I feed pandoc this table (github screws the markdown, consider it properly aligned)

+---------------+------------------------------------------+-----------------------------------------------------------------------------+
| Edzione   | Lingua                   | Contenuto                                   |
+===============+==========================================+=============================================================================+
| Ventitreana   | Toscano con milanesisismi e francesismi  | numerose parti disgressive, quasi libri dentro libri: L'Innominato (qui     |
|       |                      | conte del sagrato), la Monaca di Monza e la Storia della Colonna Infame.    |
|       |                      | E' l'edizione piu' vicina all'Ivanoe di Scott, c'e' molta sensibilita'      |
|       |                      | romantica che indugia sugli aspetti noir e trucculenti, quasi **gotici**.   |
+---------------+------------------------------------------+-----------------------------------------------------------------------------+
| Ventisettana  | Toscano Letterario, depurato d'idiotismi | riduzione delle disgressioni, si comincia a proporre l'assetto polifonico,  |
|       |                      | si raggiunge maggiore equivalenza tra passione e riflessione e si accentua  |
|       |                      | scavo psicologico perdendo molto le parti trucculente. ironia Manzoniana    |
+---------------+------------------------------------------+-----------------------------------------------------------------------------+
| Quarantana    | Toscano colto parlato, lingua universale | edizone ufficiale illustrata, curata da Manzoni stesso,pieno raggiungimento |
|       |                      | impianto polifonico, storia della colonna infame, illustrata,viene messa in |
|       |                      | appendice, l'ironia Manzoniana raggiunge il suo pieno sviluppo      |
+---------------+------------------------------------------+-----------------------------------------------------------------------------+

and get this, and same looking thing for the html output. This also happens when i use a simple multiline table.

jgm commented 11 years ago

I can't reproduce this. Note that it is rendered correctly on try pandoc:

http://johnmacfarlane.net/pandoc/try/?text=%2B---------------%2B------------------------------------------%2B-----------------------------------------------------------------------------%2B%0A|+Edzione+++++++|+Lingua+++++++++++++++++++++++++++++++++++|+Contenuto+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++|%0A%2B%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%2B%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%2B%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%2B%0A|+Ventitreana+++|+Toscano+con+milanesisismi+e+francesismi++|+numerose+parti+disgressive%2C+quasi+libri+dentro+libri%3A+L%27Innominato+%28qui+++++|%0A|+++++++++++++++|++++++++++++++++++++++++++++++++++++++++++|+conte+del+sagrato%29%2C+la+Monaca+di+Monza+e+la+Storia+della+Colonna+Infame.++++|%0A|+++++++++++++++|++++++++++++++++++++++++++++++++++++++++++|+E%27+l%27edizione+piu%27+vicina+all%27Ivanoe+di+Scott%2C+c%27e%27+molta+sensibilita%27++++++|%0A|+++++++++++++++|++++++++++++++++++++++++++++++++++++++++++|+romantica+che+indugia+sugli+aspetti+noir+e+trucculenti%2C+quasi+**gotici**.+++|%0A%2B---------------%2B------------------------------------------%2B-----------------------------------------------------------------------------%2B%0A|+Ventisettana++|+Toscano+Letterario%2C+depurato+d%27idiotismi+|+riduzione+delle+disgressioni%2C+si+comincia+a+proporre+l%27assetto+polifonico%2C++|%0A|+++++++++++++++|++++++++++++++++++++++++++++++++++++++++++|+si+raggiunge+maggiore+equivalenza+tra+passione+e+riflessione+e+si+accentua++|%0A|+++++++++++++++|++++++++++++++++++++++++++++++++++++++++++|+scavo+psicologico+perdendo+molto+le+parti+trucculente.+ironia+Manzoniana++++|%0A%2B---------------%2B------------------------------------------%2B-----------------------------------------------------------------------------%2B%0A|+Quarantana++++|+Toscano+colto+parlato%2C+lingua+universale+|+edizone+ufficiale+illustrata%2C+curata+da+Manzoni+stesso%2Cpieno+raggiungimento+|%0A|+++++++++++++++|++++++++++++++++++++++++++++++++++++++++++|+impianto+polifonico%2C+storia+della+colonna+infame%2C+illustrata%2Cviene+messa+in+|%0A|+++++++++++++++|++++++++++++++++++++++++++++++++++++++++++|+appendice%2C+l%27ironia+Manzoniana+raggiunge+il+suo+pieno+sviluppo++++++++++++++|%0A%2B---------------%2B------------------------------------------%2B-----------------------------------------------------------------------------%2B%0A%0A%0A&from=markdown&to=html

What version of pandoc are you using?

+++ Lorenzo Bercelli [Oct 27 13 10:28 ]:

I feed pandoc this table (github screws the markdown, consider it properly aligned)

+---------------+------------------------------------------+-----------------------------------------------------------------------------+ | Edzione | Lingua | Contenuto | +===============+==========================================+=============================================================================+ | Ventitreana | Toscano con milanesisismi e francesismi | numerose parti disgressive, quasi libri dentro libri: L'Innominato (qui | | | | conte del sagrato), la Monaca di Monza e la Storia della Colonna Infame. | | | | E' l'edizione piu' vicina all'Ivanoe di Scott, c'e' molta sensibilita' | | | | romantica che indugia sugli aspetti noir e trucculenti, quasi gotici. | +---------------+------------------------------------------+-----------------------------------------------------------------------------+ | Ventisettana | Toscano Letterario, depurato d'idiotismi | riduzione delle disgressioni, si comincia a proporre l'assetto polifonico, | | | | si raggiunge maggiore equivalenza tra passione e riflessione e si accentua | | | | scavo psicologico perdendo molto le parti trucculente. ironia Manzoniana | +---------------+------------------------------------------+-----------------------------------------------------------------------------+ | Quarantana | Toscano colto parlato, lingua universale | edizone ufficiale illustrata, curata da Manzoni stesso,pieno raggiungimento | | | | impianto polifonico, storia della colonna infame, illustrata,viene messa in | | | | appendice, l'ironia Manzoniana raggiunge il suo pieno sviluppo | +---------------+------------------------------------------+-----------------------------------------------------------------------------+

and get this, and same looking thing for the html output. This also happens when i use a simple multiline table.


Reply to this email directly or view it on GitHub: https://github.com/jgm/pandoc/issues/1038

Bercio commented 11 years ago

thanks for the quick reply ! I'm using pandoc 1.12.0.2 on archlinux, so that shouldn't be an issue. weirdly, this doesnt' render for me on try pandoc either, but i can't see the difference with the one you linked:

http://johnmacfarlane.net/pandoc/try/?text=%0A%2B---------------%2B------------------------------------------%2B-----------------------------------------------------------------------------%2B%0A|+Edzione%09|+Lingua%09%09%09%09+++|+Contenuto+%09%09%09%09%09%09%09%09%09+|%0A%2B%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%2B%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%2B%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%2B%0A|+Ventitreana%09|+Toscano+con+milanesisismi+e+francesismi++|+numerose+parti+disgressive%2C+quasi+libri+dentro+libri%3A+L%27Innominato+%28qui+%09+|%0A|%09%09|%09%09%09%09%09+++|+conte+del+sagrato%29%2C+la+Monaca+di+Monza+e+la+Storia+della+Colonna+Infame.+%09+|%0A|%09%09|%09%09%09%09%09+++|+E%27+l%27edizione+piu%27+vicina+all%27Ivanoe+di+Scott%2C+c%27e%27+molta+sensibilita%27++%09+|%0A|%09%09|%09%09%09%09%09+++|+romantica+che+indugia+sugli+aspetti+noir+e+trucculenti%2C+quasi+**gotici**.%09+|%0A%2B---------------%2B------------------------------------------%2B-----------------------------------------------------------------------------%2B%0A|+Ventisettana++|+Toscano+Letterario%2C+depurato+d%27idiotismi+|+riduzione+delle+disgressioni%2C+si+comincia+a+proporre+l%27assetto+polifonico%2C%09+|%0A|%09%09|%09%09%09%09%09+++|+si+raggiunge+maggiore+equivalenza+tra+passione+e+riflessione+e+si+accentua%09+|%0A|%09%09|%09%09%09%09%09+++|+scavo+psicologico+perdendo+molto+le+parti+trucculente.+ironia+Manzoniana%09+|%0A%2B---------------%2B------------------------------------------%2B-----------------------------------------------------------------------------%2B%0A|+Quarantana%09|+Toscano+colto+parlato%2C+lingua+universale+|+edizone+ufficiale+illustrata%2C+curata+da+Manzoni+stesso%2Cpieno+raggiungimento+|%0A|%09%09|%09%09%09%09%09+++|+impianto+polifonico%2C+storia+della+colonna+infame%2C+illustrata%2Cviene+messa+in+|%0A|%09%09|%09%09%09%09%09+++|+appendice%2C+l%27ironia+Manzoniana+raggiunge+il+suo+pieno+sviluppo%09%09+|%0A%2B---------------%2B------------------------------------------%2B-----------------------------------------------------------------------------%2B%0A&from=markdown&to=html

2013/10/28 John MacFarlane notifications@github.com

I can't reproduce this. Note that it is rendered correctly on try pandoc:

http://johnmacfarlane.net/pandoc/try/?text=%2B---------------%2B------------------------------------------%2B-----------------------------------------------------------------------------%2B%0A|+Edzione+++++++|+Lingua+++++++++++++++++++++++++++++++++++|+Contenuto+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++|%0A%2B%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%2B%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%2B%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%2B%0A|+Ventitreana+++|+Toscano+con+milanesisismi+e+francesismi++|+numerose+parti+disgressive%2C+quasi+libri+dentro+libri%3A+L%27Innominato+%28qui+++++|%0A|+++++++++++++++|++++++++++++++++++++++++++++++++++++++++++|+conte+del+sagrato%29%2C+la+Monaca+di+Mhttp://johnmacfarlane.net/pandoc/try/?text=%2B---------------%2B------------------------------------------%2B-----------------------------------------------------------------------------%2B%0A%7C+Edzione+++++++%7C+Lingua+++++++++++++++++++++++++++++++++++%7C+Contenuto+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%7C%0A%2B%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%2B%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%2B%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%2B%0A%7C+Ventitreana+++%7C+Toscano+con+milanesisismi+e+francesismi++%7C+numerose+parti+disgressive%2C+quasi+libri+dentro+libri%3A+L%27Innominato+%28qui+++++%7C%0A%7C+++++++++++++++%7C++++++++++++++++++++++++++++++++++++++++++%7C+conte+del+sagrato%29%2C+la+Monaca+di+Monza+e+la+Storia+della+Colonna+Infame.++++|%0A|+++++++++++++++|++++++++++++++++++++++++++++++++++++++++++|+E%27+l%27edizione+piu%27+vicina+all%27Ivanoe+di+Scott%2C+c%27e%27+molta+sensibilita%27++++++|%0A|+++++++++++++++|++++++++++++++++++++++++++++++++++++++++++|+romantica+che+indugia+sugli+aspetti+noir+e+trucculenti%2C+quasi+**gotici**.+++|%0A%2B---------------%2B------------------------------------------%2B-----------------------------------------------------------------------------%2B%0A|+Ventisettana++|+Toscano+Letterario%2C+depurato+d%27idiotismi+|+riduzione+delle+disgressioni%2C+si+comincia+a+proporre+l%27assetto+polifonico%2C++|%0A|+++++++++++++++|++++++++++++++++++++++++++++++++++++++++++|+si+raggiunge+maggiore+equivalenza+tra+passione+e+riflessione+e+si+accentua++|%0A|+++++++++++++++|++++++++++++++++++++++++++++++++++++++++++|+scavo+psicologico+perdendo+molto+le+parti+trucculente.+ironia+Manzoniana++++|%0A%2B---------------%2B------------------------------------------%2B--- --------------------------------------------------------------------------%2B%0A|+Quarantana++++|+Toscano+colto+parlato%2C+lingua+universale+|+edizone+ufficiale+illustrata%2C+curata+da+Manzoni+stesso%2Cpieno+raggiungimento+|%0A|+++++++++++++++|++++++++++++++++++++++++++++++++++++++++++|+impianto+polifonico%2C+storia+della+colonna+infame%2C+illustrata%2Cviene+messa+in+|%0A|+++++++++++++++|++++++++++++++++++++++++++++++++++++++++++|+appendice%2C+l%27ironia+Manzoniana+raggiunge+il+suo+pieno+sviluppo++++++++++++++|%0A%2B---------------%2B------------------------------------------%2B-----------------------------------------------------------------------------%2B%0A%0A%0A&from=markdown&to=html

What version of pandoc are you using?

+++ Lorenzo Bercelli [Oct 27 13 10:28 ]:

I feed pandoc this table (github screws the markdown, consider it properly aligned)

+---------------+------------------------------------------+-----------------------------------------------------------------------------+

| Edzione | Lingua | Contenuto |

+===============+==========================================+=============================================================================+

| Ventitreana | Toscano con milanesisismi e francesismi | numerose parti disgressive, quasi libri dentro libri: L'Innominato (qui | | | | conte del sagrato), la Monaca di Monza e la Storia della Colonna Infame. | | | | E' l'edizione piu' vicina all'Ivanoe di Scott, c'e' molta sensibilita' | | | | romantica che indugia sugli aspetti noir e trucculenti, quasi gotici. |

+---------------+------------------------------------------+-----------------------------------------------------------------------------+

| Ventisettana | Toscano Letterario, depurato d'idiotismi | riduzione delle disgressioni, si comincia a proporre l'assetto polifonico, | | | | si raggiunge maggiore equivalenza tra passione e riflessione e si accentua | | | | scavo psicologico perdendo molto le parti trucculente. ironia Manzoniana |

+---------------+------------------------------------------+-----------------------------------------------------------------------------+

| Quarantana | Toscano colto parlato, lingua universale | edizone ufficiale illustrata, curata da Manzoni stesso,pieno raggiungimento | | | | impianto polifonico, storia della colonna infame, illustrata,viene messa in | | | | appendice, l'ironia Manzoniana raggiunge il suo pieno sviluppo |

+---------------+------------------------------------------+-----------------------------------------------------------------------------+

and get this, and same looking thing for the html output. This also happens when i use a simple multiline table.


Reply to this email directly or view it on GitHub: https://github.com/jgm/pandoc/issues/1038

— Reply to this email directly or view it on GitHubhttps://github.com/jgm/pandoc/issues/1038#issuecomment-27186801 .

jgm commented 11 years ago

I can't explain why you're getting different results. Perhaps you could attach or link to a file that you have confirmed gives the bad result, instead of pasting text.

+++ Lorenzo Bercelli [Oct 28 13 08:59 ]:

thanks for the quick reply ! I'm using pandoc 1.12.0.2 on archlinux

Bercio commented 11 years ago

Sure thing. Here they are, the full file (actually ust the interested chapter) and the table set apart, they both five me the same output.

Lorenzo Bercelli

On Mon, Oct 28, 2013 at 5:17 PM, John MacFarlane notifications@github.comwrote:

I can't explain why you're getting different results. Perhaps you could attach or link to a file that you have confirmed gives the bad result, instead of pasting text.

+++ Lorenzo Bercelli [Oct 28 13 08:59 ]:

thanks for the quick reply ! I'm using pandoc 1.12.0.2 on archlinux

Reply to this email directly or view it on GitHubhttps://github.com/jgm/pandoc/issues/1038#issuecomment-27226613 .

jgm commented 11 years ago

I don't see any attachments.

Bercio commented 11 years ago

oh, github dropped them from the email, here the links: the full file (actually just the relevant chapter): https://raw.github.com/Bercio/Scuola/master/Lettere/full-file.md , and just the table: https://raw.github.com/Bercio/Scuola/master/Lettere/table.md

jgm commented 11 years ago

Ah, you're using tabs. That's the problem. Markdown processors convert tabs to spaces with a tab stop of 4. That messes up your alignment, if you're assuming a tab stop of 8.

+++ Lorenzo Bercelli [Oct 28 13 11:23 ]:

oh, github dropped them from the email, here the links: the full file (actually just the relevant chapter): [1]https://raw.github.com/Bercio/Scuola/master/Lettere/full-file.md , and ust the table: [2]https://raw.github.com/Bercio/Scuola/master/Lettere/table.md

— Reply to this email directly or [3]view it on GitHub. [xJAuenYDiIoVt3LF3y68423MoT7dwIZazfuRDb_rTW1_IRL2-3a1dNNbkUHZ2coc.gif]

References

  1. https://raw.github.com/Bercio/Scuola/master/Lettere/full-file.md
  2. https://raw.github.com/Bercio/Scuola/master/Lettere/table.md
  3. https://github.com/jgm/pandoc/issues/1038#issuecomment-27240223
Bercio commented 11 years ago

oh, I see, another sneaky attack from the tabs-haters, eh ? ;-) Seriously though, thanks a lot for the help and sorry for wasting your time on such a silly mistake.