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

Preprints Section of Publications Page #330

Open
goldblum opened this issue Jul 3, 2021 · 9 comments
Open

Preprints Section of Publications Page #330

goldblum opened this issue Jul 3, 2021 · 9 comments

Comments

@goldblum
Copy link

goldblum commented Jul 3, 2021

I want to add a "preprints" section to the publications page. I tried just entering "preprints" as a year, and while this does add the section, the name of the section now overlaps the title (see the picture below). It would be great if there were an easy way to add a preprints section since so many academics have papers they want to highlight which have not been published yet.

Screenshot from 2021-07-02 22-29-49

@sdaza
Copy link
Contributor

sdaza commented Jul 8, 2021

I added:

{% if entry.preprint %} <a href="{{ entry.preprint }}" class="btn btn-sm z-depth-0" role="button" target="_blank">Preprint</a> {% endif %}

To this file https://github.com/sdaza/sdaza.github.com/blob/source/_layouts/bib.html

Then, the bib entries could be included in the preprint field, an example:

@article{voigt2020,
  title = {Trends in {{Education}}-Specific {{Differences}} in {{Disability}}-{{Free Life Expectancy}} in {{Spain}}, 2008-2017},
  author = {Voigt, Mathias and Daza, Sebastian and Ordanovich, Dariya and Palloni, Alberto},
  date = {2020},
  journaltitle = {Working Paper},
  url = {https://osf.io/preprints/socarxiv/mf6n8/},
  urldate = {2020-09-02},
  code = {https://gitlab.com/csic-echo/compression-morbidity},
  preprint = {https://osf.io/preprints/socarxiv/mf6n8/},
  status = {Under review}
}

You can use the same logic to add any field you want (https://sdaza.com/publications/). Using Zotero, you can add those fields in the Extra section:

tex.code= https://github.com/sdaza/reentry-work-lifecourse
tex.preprint = https://osf.io/preprints/socarxiv/k5zyd/
tex.status = Under review
tex.bibtex_show = true

@goldblum
Copy link
Author

goldblum commented Jul 8, 2021

@sdaza Thanks for the suggestion. I do want a separate section for preprints though outside of other years, since those papers are often working papers and don't fall into a specific year nicely.

@sdaza
Copy link
Contributor

sdaza commented Jul 8, 2021

just a short comment, it is a trend that published papers include also a preprint...

@goldblum
Copy link
Author

goldblum commented Jul 8, 2021

Thanks. I do think this is a solution for a different issue.

@sdaza
Copy link
Contributor

sdaza commented Jul 8, 2021

yes, I agree.

@William-N-Havard
Copy link

You can do that quite easily by tweaking the configuration of the jekyll/scholar module

in _config.yml add:
sort_by: year, month
order: descending, descending
type_order: [unpublished, article, inbook, conference, incollections, inproceedings, proceedings, book, misc, techreport]
type_names: {unpublished: Pre-Prints / In Preparation}

in _pages/publications.md file, replace everything by:

<div class="publications">
 {% bibliography --template bib --group_by type,year --group_order ascending,descending %}
</div>

in your bibtex
use @Unpublished instead of @Article

No need to manually group by type/year when jekyll/scholar can already do it!

@goldblum
Copy link
Author

goldblum commented Sep 2, 2021

@William-N-Havard

Thanks so much for your help! I tried this, but it creates a section for "Journal Articles", one for "Conference Articles", and one for "Unpublished". It also leaves weird text near the top. I assume I'm doing something incorrect. Should my full _pages/publications.md file be:

---
layout: page
permalink: /publications/
title: publications
nav: true
---

<div class="publications">
 {% bibliography --template bib --group_by type,year --group_order ascending,descending %}
</div>

@sdaza
Copy link
Contributor

sdaza commented Sep 8, 2021

I was able to use the configuration that @William-N-Havard suggested:

My _config file includes:

sort_by: date
order: descending
type_order: [article, inbook, book, unpublished, misc, report, conference, incollections, inproceedings, proceedings]
type_names: {unpublished: working papers, report: reports, article: journal articles, 
      inproceedings: conference articles & others}

publication.md file (my bib file is sdaza.bib):

---
layout: page
permalink: /publications/
title: publications
nav: true
---

<div class="publications">
 {% bibliography -f sdaza --group_by type %}
</div>

I changed a bit the type headers adding these lines to _base.scss in the publication section:

  h2.bibliography {
    color: $grey-color-light;
    border-top: 1px solid $grey-color-light;
    padding-top: 1rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    text-align: right;
  }

An example here: https://sdaza.com/publications/

@Braghadeeshln
Copy link

You can do that quite easily by tweaking the configuration of the jekyll/scholar module

in _config.yml add: sort_by: year, month order: descending, descending type_order: [unpublished, article, inbook, conference, incollections, inproceedings, proceedings, book, misc, techreport] type_names: {unpublished: Pre-Prints / In Preparation}

in _pages/publications.md file, replace everything by:

<div class="publications">
 {% bibliography --template bib --group_by type,year --group_order ascending,descending %}
</div>

in your bibtex use @Unpublished instead of @Article

No need to manually group by type/year when jekyll/scholar can already do it!

I tried this approach, but I am unable to change Unpublished to Preprints

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

No branches or pull requests

5 participants