jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.41k stars 3.37k forks source link

Support for decimal alignment in specified columns of a table. #5998

Open phelps-sg opened 4 years ago

phelps-sg commented 4 years ago

For tables containing numeric data, It would be very useful to be able to specify that particularly columns of a markdown table should be aligned on decimal points.

The MultiMarkDown project has a syntax for this.

It is possible to generate html tables with decimal alignment.

mb21 commented 4 years ago

I guess this would require a change to data Alignment in the pandoc document AST... https://github.com/jgm/pandoc-types/blob/master/Text/Pandoc/Definition.hs#L166

jgm commented 4 years ago

Yes, it would require an AST change. Does LaTeX have a syntax for decimal alignment in tables? Word?

mgajda commented 3 years ago

StackOverflow answer indicates that one can \usepackage{siunitx} and then S table alignment option: https://tex.stackexchange.com/questions/298279/dot-aligned-table-column-with-defined-width