Skip to content

Conversation

@cderv
Copy link
Collaborator

@cderv cderv commented Aug 19, 2020

This will close close #315 and resolve #297 (comment)

The renaming happens in several places. Only user facing change that could be strange: when using rmarkdown::draft, one should use only the journal name now.

Before template is the same as the format name

rmarkdown::draft("MyArticle.Rmd", template = "acm_article", package = "rticles")

Now, it is just the journal name

rmarkdown::draft("MyArticle.Rmd", template = "acm", package = "rticles")

It could be a breaking change for some users who scripted their draft creation.

Should we stick to this solution to resolve #297 (comment) ?

@cderv cderv requested a review from yihui August 19, 2020 13:13
Copy link
Contributor

@yihui yihui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. I'm not entirely sure if this breaking change is fine (I tend to say yes). Perhaps it can help a little if we provide a helper function to list the available journal names in this package, e.g., rticles::journals().

BTW, I wonder why there are changes in certain .cls and .bib files. I feel these might be CRLF changes from your GIT client on Windows.

@cderv
Copy link
Collaborator Author

cderv commented Aug 19, 2020

I'm not entirely sure if this breaking change is fine

I had the same thought. Not sure either but I tend to say yes too because it is easy to fix if someone uses this. Just the template name should be changed. I believe people are creating template through RStudio. But I found a few
https://github.com/search?q=rmarkdown%3A%3Adraft+rticles+language%3AR&type=Code

This changes is also not necessary to resolve the note in #297 as we have other solution.

BTW, I wonder why there are changes in certain .cls and .bib files. I feel these might be CRLF changes from your GIT client on Windows.

You may be right, I will check and configure that correctly.

@cderv
Copy link
Collaborator Author

cderv commented Aug 19, 2020

BTW, I wonder why there are changes in certain .cls and .bib files. I feel these might be CRLF changes from your GIT client on Windows.

I believe this is because we have some commited file on the DOS format. My git setup is core.autocrlf true as I often work with cross platform program, and it is good practice on windows. So when I renamed the path to the file, CRLF (dos format) where converted by git to LF (unix format).

I can revert but do we want DOS format file ?

We could use .gitattributes in the repo to insure that it happens the same for everyone. https://docs.github.com/en/github/using-git/configuring-git-to-handle-line-endings

Copy link
Contributor

@yihui yihui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, let's add the .gitattributes so that the line endings will be consistent in the future when contributors submit pull requests. No need to revert the changes this time. Thanks!

@cderv
Copy link
Collaborator Author

cderv commented Aug 20, 2020

@yihui Two new PR are integrating what is discussed here. To be merged in due time.

yihui pushed a commit to rstudio/rmarkdown-book that referenced this pull request Aug 20, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 22, 2021
@cderv cderv deleted the folder-short-name branch July 23, 2021 07:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename template folders to shortten the path

2 participants