eddelbuettel / pinp

Pinp Is Not PNAS -- Two-Column PDF Template
147 stars 25 forks source link

Update pinp.cls #86

Closed ikashnitsky closed 3 years ago

ikashnitsky commented 3 years ago

Changing the style of URL to normal text so that it looks the same as DOI links in the reference list.

Here is how it looked before. Note, I changes the fonts in my document.

And this is after the fix

eddelbuettel commented 3 years ago

Nice -- I like this too.

This may be due to us adding \doi initially as a one-off from JSS or RJournal. Can't imagine PNAS messed that up so it is good that that gets squared away.

eddelbuettel commented 3 years ago

But the assignment is somewhat "global". Is UrlFont used anywhere else? Possible side effects?

eddelbuettel commented 3 years ago

I am against this change. Here is what it does eg to the URL in the bottom left:

image

I agree that something is not right in the bibliography listed above -- but something else must be going on / you may have changed fonts locally. In a standard vignette (this one for nanotime) I get (under the existing setting)

image

ikashnitsky commented 3 years ago

Yes, the standard JSS reference style uses sans font for references. I changes the fonts with

header-includes: \usepackage{fontspec} \setmainfont{Cormorant Garamond} \setsansfont{Futura} 

It seems to me that changing fonts and citation styles via .csl may be an attractive feature for many people in academia since the standards are so different across disciplines. Here is how I use .csl with pinp

output: 
  bookdown::pdf_book:
    toc: false
    latex_engine: xelatex
    base_format: pinp::pinp
    citation_package: none
    pandoc_args: [ "--csl", "psp.csl" ]
eddelbuettel commented 3 years ago

Sure. But let's straighten out two things:

With that I think we should close this one.

ikashnitsky commented 3 years ago

I realise that my use of pinp pushes it a bit further (or maybe sideways) that the standard use-case. Sorry, I had no idea that an unannounced PR with a small change is something unwelcome, will start with an issue next time.

Maybe there is a way to declare the font family of URLs only in the reference list so that they match the main font of the text in the reference list?

eddelbuettel commented 3 years ago

The idea of the PR was fine. It just turns out that is has a side effect :-/ Which makes it a no-go as it is no longer a "small effect". Stuff happens.

The best preventions is just to plan and test a little more. Issues are a good way.

I also thought about the font family idea but maybe that is carrying us a little further than we want to go as it may keeping up with PNAS changes harder. To be seen.

I will close this one now. Was a good idea but didn't pan out.