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

kable() in LaTeX mode to typeset numeric columns in math mode. #1850

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

krivit
Copy link
Contributor

@krivit krivit commented May 20, 2020

This is a partial fix for #1709, addressing the LaTeX case by typesetting numeric columns in math mode and wrapping commas (as decimal or thousands separators) in braces ({}) for correct spacing. This is, in my opinion, the cleanest option that does not require additional LaTeX packages.

I've looked into the other output types (pandoc, html, md, etc.), but I am not quite sure what should be their output.

I've updated NEWS.md and DESCRIPTION to save time, and apologise for the presumption of adding myself as a contributor and adding "thanks" to myself. If this PR doesn't merit a line in the DESCRIPTION, I'll be happy to remove it.

@krivit
Copy link
Contributor Author

krivit commented May 20, 2020

Looks like the TARGET=integration DISPLAY=:99.0 failed with

The command "sudo add-apt-repository -y "ppa:marutter/rrutter4.0"" failed and exited with 1 during .

I don't think it's anything in the PR.

@krivit
Copy link
Contributor Author

krivit commented Jun 25, 2020

It no looks like the problem is with knitr-examples, which makes sense. I will make a PR for that.

@krivit
Copy link
Contributor Author

krivit commented Jun 25, 2020

I've now updated the knitr-examples to match and opened a PR there, though I haven't been able to get the integration tests to work under Travis-CI, since the repository and branch appear to be hardcoded to yihui/knitr-examples. @yihui, am I doing something wrong?

@CLAassistant
Copy link

CLAassistant commented Sep 22, 2020

CLA assistant check
All committers have signed the CLA.

@krivit krivit force-pushed the kable_latex_minus branch 2 times, most recently from bc82afc to 5ecdc1a Compare February 4, 2021 23:18
krivit added a commit to krivit/knitr-examples that referenced this pull request Feb 4, 2021
krivit added a commit to krivit/knitr-examples that referenced this pull request Feb 4, 2021
@krivit krivit force-pushed the kable_latex_minus branch 2 times, most recently from 88dba01 to aed7640 Compare April 9, 2021 06:26
…looking minus signs. Commas, if present (as decimal or thousands separator), are wrapped in braces to prevent additional space being added after. Improves yihui#1709.
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

Successfully merging this pull request may close these issues.

2 participants