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

fmt_prop rendering incorrectly for html #59

Open
JeffreyCHoover opened this issue Jul 25, 2022 · 2 comments · May be fixed by #61
Open

fmt_prop rendering incorrectly for html #59

JeffreyCHoover opened this issue Jul 25, 2022 · 2 comments · May be fixed by #61
Assignees
Labels
bug 🪲 Something isn't working

Comments

@JeffreyCHoover
Copy link
Collaborator

fmt_prop is not rendering correctly for html versions of the tech manual, specifically values that become <.01, <.001, etc. It appears that the code for the less than symbol is being misinterpreted when rendering to html output.

@JeffreyCHoover JeffreyCHoover added the bug 🪲 Something isn't working label Jul 25, 2022
@JeffreyCHoover JeffreyCHoover self-assigned this Jul 25, 2022
@wjakethompson
Copy link
Member

I also ran into this. The issue pops up when there is no space between the < and the number. For example, < .01 renders fine, <.01 does not. Here was my work around chapter 6 if it's helpful:

https://github.com/atlas-aai/dlm-tech-manual/blob/a9eccddf1def35f0b2fa0d945d0f89a42cf8e28a/chapters/06-Standard-Setting/ye-adjustment-ss.Rmd#L96

We might just have to update the fmt_small functionality to add a space if the output is html.

@JeffreyCHoover
Copy link
Collaborator Author

@wjakethompson That's interesting that the space (or lack thereof) is throwing everything off. If we don't want to add a space after the < symbol to have as similar as possible format across the pdf and html versions, it appears that replacing < with $\\lt$ for the html output will insert a < in the rendered html output.

I've been trying out some code for doing this in fmt_prop and fmt_prop_pct: https://github.com/atlas-aai/ratlas/blob/fmt-prop-bug/R/formatting.R#L184-L185

@JeffreyCHoover JeffreyCHoover linked a pull request Jul 28, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants