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

Provide pinp.cls if not present #23

Closed
eddelbuettel opened this Issue Sep 17, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@eddelbuettel
Owner

eddelbuettel commented Sep 17, 2017

I am a little non-plus'ed that adding pinp as the vignette driver leads to two extra files.

I already figured out how to get rid of one---we can just include the content of the Bibtex-rendered .blg file directly in the source Rmd, which frees us from adding a foo.bib file. Down one. (Of course, you want it while you still edit the document. Once done, and included as a more static vignette you do not and the extra file is line noise.)

And I realized that we have a code hook to just copy in pinp.cls from the pinp skeleton directory if it is not present in the current working directory---and tada we also get rid of pinp.cls.

Good idea? Methinks it is.

@eddelbuettel eddelbuettel self-assigned this Sep 17, 2017

@eddelbuettel eddelbuettel changed the title from Provide pinp.cls to Provide pinp.cls if not present Sep 17, 2017

@coatless

This comment has been minimized.

Show comment
Hide comment
@coatless

coatless Sep 17, 2017

Collaborator

Yeah, I was actually toying around with this in: coatless/uiucthemes#4

Basically, the pinp function can call system.file() and create the appropriate linking path. Though, I think some of my earlier tests ran afoul with Windows and spaces in the Program Files path. I'll need to set up a parallel session to test now as the windows box is fried...

Collaborator

coatless commented Sep 17, 2017

Yeah, I was actually toying around with this in: coatless/uiucthemes#4

Basically, the pinp function can call system.file() and create the appropriate linking path. Though, I think some of my earlier tests ran afoul with Windows and spaces in the Program Files path. I'll need to set up a parallel session to test now as the windows box is fried...

@eddelbuettel

This comment has been minimized.

Show comment
Hide comment
@eddelbuettel

eddelbuettel Sep 17, 2017

Owner

It is trivial, and I will commit it:

    if (!file.exists("pinp.cls"))
        file.copy(system.file("rmarkdown", "templates", "pdf", "skeleton", "pinp.cls",
                              package="pinp"),
                  ".")

Has the advantage of copyinig a current pinp.cls in too (if you do a quick rm pre-rendering) when you are making changes.

Owner

eddelbuettel commented Sep 17, 2017

It is trivial, and I will commit it:

    if (!file.exists("pinp.cls"))
        file.copy(system.file("rmarkdown", "templates", "pdf", "skeleton", "pinp.cls",
                              package="pinp"),
                  ".")

Has the advantage of copyinig a current pinp.cls in too (if you do a quick rm pre-rendering) when you are making changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment