etiennebacher / altdoc

Alternative to pkgdown to document R packages
https://altdoc.etiennebacher.com
Other
62 stars 9 forks source link

Do not vertically align text in tables from Rd files #265

Open etiennebacher opened 4 months ago

etiennebacher commented 4 months ago

https://grantmcdermott.com/tinyplot/man/tpar.html#additional-graphical-parameters

I'd rather have the arg names not vertically centered, it makes it harder to distinguish to which argument the text corresponds when there are big paragraphs:

image

Not sure what role altdoc has in this (and it's very low priority) but I wanted to store this somewhere

vincentarelbundock commented 4 months ago

The intention is to top-align, and it seems to work here: https://marginaleffects.com/man/predictions.html

This is the line in altdoc which is responsible for this: https://github.com/etiennebacher/altdoc/blob/main/R/rd2qmd.R#L22

I'm not sure what is going on. Maybe there a semicolon missing? Not sure...

vincentarelbundock commented 1 month ago

This does not appear to be an altdoc problem. The issue is that @grantmcdermott is using a special tabular environment. A better way to handle this would be to enable markdown formatting in roxygen2, and to put the extra parameters in a markdown/ASCII table (ex: via tinytable)