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

Add ceil and floor symbols #33

Closed
AntoineSoetewey opened this issue Oct 27, 2021 · 5 comments
Closed

Add ceil and floor symbols #33

AntoineSoetewey opened this issue Oct 27, 2021 · 5 comments

Comments

@AntoineSoetewey
Copy link

Hello,

Unless I'm mistaken, \lceil, \rceil, \lfloor and \rfloor symbols are not supported (see section "Supported LaTeX" in this vignette).

I would like to use the \rceil symbol in the axis label of my plot, would you mind adding these symbols?

Thanks in advance for your help and for building this package.

Regards,
Antoine

@stefano-meschiari
Copy link
Owner

Hi Antoine,

Sorry for taking so long to address this FR. Would you be able to try this pre-release version (0.9.0) and test \lceil / \lfloor?

https://github.com/stefano-meschiari/latex2exp/tree/0.9.0

@stefano-meschiari
Copy link
Owner

As an example,

TeX(r"($\lceil a+b \rceil$)")

currently renders as
image
in the new version.

@AntoineSoetewey
Copy link
Author

AntoineSoetewey commented Jan 21, 2022

Thanks for your reply.

I have tried but without success.

Here is a reprex:

devtools::install_github('stefano-meschiari/latex2exp', ref = 'v0.9.0')
library(latex2exp)
plot(x = rnorm(10),
     y = rnorm(10),
     ylab = TeX(r"($\lceil a+b \rceil$)"))

Screenshot 2022-01-21 at 16 46 39

Am I missing something?

@stefano-meschiari
Copy link
Owner

stefano-meschiari commented Jan 21, 2022

Interesting, the same reprex on my system appears to work correctly:

image

(note that with default margins, the leftmost few pixels y-axis label gets cut off a bit -- that's an issue with base graphics, not latex2exp; increasing margins fixes it).

Could you double-check the version of latex2exp loaded is indeed 0.9.0, and paste the output of sessionInfo() here?

@AntoineSoetewey
Copy link
Author

I updated everything and now it works fine.

Thanks again !

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