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

toLatex.escape.tex option as argument #30

Closed
schoonees opened this issue Oct 9, 2017 · 1 comment
Closed

toLatex.escape.tex option as argument #30

schoonees opened this issue Oct 9, 2017 · 1 comment

Comments

@schoonees
Copy link
Contributor

schoonees commented Oct 9, 2017

Thanks for the nice package. I just had an issue with a new improvement that you listed in the NEWS file for 0.99 under Improvements, namely:

toLatex() methods optionally escape dollar, subscript and superscript symbols.

This is great for some cases I am sure, but for my case it meant that my paper written a while ago (which has math symbols in table headers) could not be knitted without error anymore. It also seems that this is set via a global argument

toLatex.escape.tex

but the toLatex() method (in this case for an ftable) does not expose this as an argument. I was able to fix the issue with

options(toLatex.escape.tex = FALSE)

after debugging a few times. However, it would be much nicer if this argument was directly accessible in the function toLatex() itself, and documented there.

So the proposal is to have an argument in the toLatex() methods for changing this behavior, together with documentation.

For backwards compatibility, would it be an option to have toLatex.escape.tex = FALSE by default?

Sorry for not submitting a patch, but I need to work on the referenced paper now....

Thanks!

Pieter

@melff
Copy link
Owner

melff commented Oct 11, 2017

You are making a good point and your requested change is very reasonable. Sorry for the inconvenience caused by the missing documentation of the toLatex.escape.tex option. All toLatex() methods in the package now have an optional toLatex.escape.tex argument which defaults to FALSE in release 0.99.14.4. The documentation now indicates the existence of the global option.

@melff melff closed this as completed Oct 11, 2017
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

No branches or pull requests

2 participants