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

Column headers not aligned correctly in RStudio #351

Closed
wch opened this issue Jan 4, 2018 · 3 comments
Closed

Column headers not aligned correctly in RStudio #351

wch opened this issue Jan 4, 2018 · 3 comments

Comments

@wch
Copy link
Member

wch commented Jan 4, 2018

Example:

library(tibble)
data_frame(abcdefg = 1:4, hijklmnop = 5:8, qrstuv = 5:8)

When I copy and paste the text here, it looks OK, but it doesn't look correct in RStudio (tested on 1.1.408 and 1.2.226, Mac). Here's a screenshot:

screen shot 2018-01-04 at 3 09 03 pm

The alignment looks OK when I run R in a terminal.

sessioninfo::session_info()
# ─ Session info ────────────────────────────────────────────────────────────────────────────────────────────
#  setting  value                       
#  version  R version 3.4.3 (2017-11-30)
#  os       macOS High Sierra 10.13.1   
#  system   x86_64, darwin15.6.0        
#  ui       RStudio                     
#  language (EN)                        
#  collate  en_US.UTF-8                 
#  tz       America/Chicago             
#  date     2018-01-04                  
# 
# ─ Packages ────────────────────────────────────────────────────────────────────────────────────────────────
#  package     * version    date       source                           
#  assertthat    0.2.0      2017-04-11 CRAN (R 3.4.0)                   
#  cli           1.0.0      2017-11-05 CRAN (R 3.4.2)                   
#  clisymbols    1.2.0      2017-05-21 CRAN (R 3.4.0)                   
#  crayon        1.3.4      2017-09-16 CRAN (R 3.4.1)                   
#  pillar        1.0.1      2017-11-27 CRAN (R 3.4.3)                   
#  rlang         0.1.6      2017-12-21 CRAN (R 3.4.3)                   
#  rstudioapi    0.7        2017-09-07 CRAN (R 3.4.1)                   
#  sessioninfo   1.0.0      2017-06-21 CRAN (R 3.4.1)                   
#  tibble      * 1.4.1.9000 2018-01-04 Github (tidyverse/tibble@f965ac0)
#  utf8          1.1.3      2018-01-03 CRAN (R 3.4.3)                   
#  withr         2.1.1      2017-12-19 CRAN (R 3.4.3)                   
#  yaml          2.1.16     2017-12-12 CRAN (R 3.4.3)                   
   
@iacobus42
Copy link

It seems like the width of the bolded characters is not the same as the width of the non-bolded characters. That appears to be what is causing the lack of alignment in the RStudio console but not when you copy and paste the text. The alignment in the console does not account for the fact that the font isn't truly fixed width after the bold style is applied.

@wch
Copy link
Member Author

wch commented Jan 4, 2018

Wow, I think you're right - I hadn't considered that the bold text might be wider.

It looks like it might be the same issue as this:
rstudio/rstudio#1721

@github-actions
Copy link
Contributor

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants