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

CSL style: always add space after title #158

Closed
wants to merge 1 commit into from
Closed

CSL style: always add space after title #158

wants to merge 1 commit into from

Conversation

vincerubinetti
Copy link
Collaborator

@vincerubinetti vincerubinetti commented Jan 18, 2019

Fix missing space between title and rest of citation when no author present.

Closes #155

@dhimmel dhimmel changed the title fix citation style csl to always add space after title (issue #155) CSL style: always add space after title Jan 18, 2019
@dhimmel
Copy link
Member

dhimmel commented Jan 18, 2019

Confirming that c234d49 fixes the issue with the reference mentioned in #155 (comment).

Before

manubot cite --render \
  --csl=https://github.com/greenelab/manubot-rootstock/raw/4103ad39859e2d0e02e72ec204fbd7b80d12aeb4/build/assets/style.csl \
  url:https://blog.dhimmel.com/irreproducible-timestamps/
1. Satoshi Villagehttps://blog.dhimmel.com/irreproducible-timestamps/

After

manubot cite --render \
  --csl=https://github.com/greenelab/manubot-rootstock/raw/c234d496f2d1ac0ce314329edcc1d7be5c6baffb/build/assets/style.csl \
  url:https://blog.dhimmel.com/irreproducible-timestamps/
1. Satoshi Village https://blog.dhimmel.com/irreproducible-timestamps/

@dhimmel
Copy link
Member

dhimmel commented Jan 18, 2019

More tests

Before

1. **Opportunities and obstacles for deep learning in biology and medicine**  
Travers Ching, Daniel S. Himmelstein, Brett K. Beaulieu-Jones, Alexandr A. Kalinin, Brian T. Do, Gregory P. Way, Enrico Ferrero, Paul-Michael Agapow, Michael Zietz, Michael M. Hoffman, … Casey S. Greene  
*Journal of The Royal Society Interface* (2018-04) <https://doi.org/gddkhn>  
DOI: [10.1098/rsif.2017.0387](https://doi.org/10.1098/rsif.2017.0387) · PMID: [29618526](https://www.ncbi.nlm.nih.gov/pubmed/29618526) · PMCID: [PMC5938574](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5938574)

2. **Sci-Hub provides access to nearly all scholarly literature.**  
Daniel S Himmelstein, Ariel Rodriguez Romero, Jacob G Levernier, Thomas Anthony Munro, Stephen Reid McLaughlin, Bastian Greshake Tzovaras, Casey S Greene  
*eLife* (2018-03-01) <https://www.ncbi.nlm.nih.gov/pubmed/29424689>  
DOI: [10.7554/elife.32822](https://doi.org/10.7554/elife.32822) · PMID: [29424689](https://www.ncbi.nlm.nih.gov/pubmed/29424689) · PMCID: [PMC5832410](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5832410)

3. **Systematic integration of biomedical knowledge prioritizes drugs for repurposing**  
Daniel Scott Himmelstein, Antoine Lizee, Christine Hessler, Leo Brueggeman, Sabrina L Chen, Dexter Hadley, Ari Green, Pouya Khankhanian, Sergio E Baranzini  
*eLife* (2017-09-22) <https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5640425/>  
DOI: [10.7554/elife.26726](https://doi.org/10.7554/eLife.26726) · PMID: [28936969](https://www.ncbi.nlm.nih.gov/pubmed/28936969) · PMCID: [PMC5640425](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5640425)

4. **Generalization of the Fermi Pseudopotential**  
Trang T. Le, Zach Osman, D. K. Watson, Martin Dunn, B. A. McKinney  
*arXiv* (2018-06-14) <https://arxiv.org/abs/1806.05726v1>

After

manubot cite --render --format=markdown \
  --csl=https://github.com/greenelab/manubot-rootstock/raw/c234d496f2d1ac0ce314329edcc1d7be5c6baffb/build/assets/style.csl \
  doi:10.1098/rsif.2017.0387 pmid:29424689 pmcid:PMC5640425 arxiv:1806.05726
1. **Opportunities and obstacles for deep learning in biology and medicine**   
Travers Ching, Daniel S. Himmelstein, Brett K. Beaulieu-Jones, Alexandr A. Kalinin, Brian T. Do, Gregory P. Way, Enrico Ferrero, Paul-Michael Agapow, Michael Zietz, Michael M. Hoffman, … Casey S. Greene  
*Journal of The Royal Society Interface* (2018-04) <https://doi.org/gddkhn>   
DOI: [10.1098/rsif.2017.0387](https://doi.org/10.1098/rsif.2017.0387) · PMID: [29618526](https://www.ncbi.nlm.nih.gov/pubmed/29618526) · PMCID: [PMC5938574](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5938574)

2. **Sci-Hub provides access to nearly all scholarly literature.**   
Daniel S Himmelstein, Ariel Rodriguez Romero, Jacob G Levernier, Thomas Anthony Munro, Stephen Reid McLaughlin, Bastian Greshake Tzovaras, Casey S Greene  
*eLife* (2018-03-01) <https://www.ncbi.nlm.nih.gov/pubmed/29424689>   
DOI: [10.7554/elife.32822](https://doi.org/10.7554/elife.32822) · PMID: [29424689](https://www.ncbi.nlm.nih.gov/pubmed/29424689) · PMCID: [PMC5832410](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5832410)

3. **Systematic integration of biomedical knowledge prioritizes drugs for repurposing**   
Daniel Scott Himmelstein, Antoine Lizee, Christine Hessler, Leo Brueggeman, Sabrina L Chen, Dexter Hadley, Ari Green, Pouya Khankhanian, Sergio E Baranzini  
*eLife* (2017-09-22) <https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5640425/>   
DOI: [10.7554/elife.26726](https://doi.org/10.7554/eLife.26726) · PMID: [28936969](https://www.ncbi.nlm.nih.gov/pubmed/28936969) · PMCID: [PMC5640425](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5640425)

4. **Generalization of the Fermi Pseudopotential**   
Trang T. Le, Zach Osman, D. K. Watson, Martin Dunn, B. A. McKinney  
*arXiv* (2018-06-14) <https://arxiv.org/abs/1806.05726v1>

It looks like this change has added an extra trailing space in the markdown output following the title (from 2 to 3 spaces).

@dhimmel
Copy link
Member

dhimmel commented Jan 18, 2019

BTW I fixed the citation metadata on my Satoshi Village blog, so the URL https://blog.dhimmel.com/irreproducible-timestamps/ will no longer return such scant metadata. Now getting:

1. The most interesting case of scientific irreproducibility?
Daniel Himmelstein
Satoshi Village (2017-03-08) https://blog.dhimmel.com/irreproducible-timestamps/

So no longer a good test case for #155

@slochower
Copy link
Collaborator

I just peeked at the latest PDF @vincerubinetti posted in #159 and realized there's an ellipsis in the Deep Review citation. Checking back here, I see it must have been around for a little while. Was there a particular reason you chose an ellipsis over "et al." and to include the final author? I don't have a specific issue, but I do think it's an unusual style choice. For web consumption, I don't mind listing all authors for a given citation. Of course this is easy to override with another CSL style file.

@dhimmel
Copy link
Member

dhimmel commented Jan 22, 2019

Was there a particular reason you chose an ellipsis over "et al." and to include the final author?

I thought that the et-al-use-last=true option of CSL was useful since oftentimes the last author(s) play a large role in the study. Obviously, this varies by field and study. Here's the full CSL configuration related to this currently:

https://github.com/greenelab/manubot-rootstock/blob/eb4cb3efef46af8bfff1e391853006777cef373c/build/assets/style.csl#L17-L19

Some studies have 100s or 1000s of authors, so I do like setting a max. Let's move additional discussion to #53 or a new issue.

@dhimmel
Copy link
Member

dhimmel commented Apr 12, 2019

Possibly related is dhimmel@12b4783

@vincerubinetti
Copy link
Collaborator Author

vincerubinetti commented Apr 12, 2019

What was the reason for wanting to do more tests on this? It seems pretty straightforward.

@dhimmel

dhimmel added a commit that referenced this pull request May 14, 2019
Merges #219

Ensures there is a newline between the title and venue,
when authors are missing.
Closes #218
Supersedes #158

Substitutes editors for authors when authors are missing.
Editors are labeled like "Sönke Bartling, Sascha Friesike (editors)".
@dhimmel
Copy link
Member

dhimmel commented May 14, 2019

The issue of a missing newline after title when no author is present should be fixed by #219.

@dhimmel dhimmel closed this May 14, 2019
dhimmel added a commit that referenced this pull request May 14, 2019
This build is based on
5da1d32.

This commit was created by the following Travis CI build and job:
https://travis-ci.com/manubot/rootstock/builds/111763307
https://travis-ci.com/manubot/rootstock/jobs/200071500

[ci skip]

The full commit message that triggered this build is copied below:

CSL author macro: substitute editor/venue

Merges #219

Ensures there is a newline between the title and venue,
when authors are missing.
Closes #218
Supersedes #158

Substitutes editors for authors when authors are missing.
Editors are labeled like "Sönke Bartling, Sascha Friesike (editors)".
dhimmel added a commit that referenced this pull request May 14, 2019
This build is based on
5da1d32.

This commit was created by the following Travis CI build and job:
https://travis-ci.com/manubot/rootstock/builds/111763307
https://travis-ci.com/manubot/rootstock/jobs/200071500

[ci skip]

The full commit message that triggered this build is copied below:

CSL author macro: substitute editor/venue

Merges #219

Ensures there is a newline between the title and venue,
when authors are missing.
Closes #218
Supersedes #158

Substitutes editors for authors when authors are missing.
Editors are labeled like "Sönke Bartling, Sascha Friesike (editors)".
slochower added a commit to slochower/smirnoff-host-guest-manuscript that referenced this pull request May 15, 2019
* webpage.py: note to ignore error in versions checkout

Merges manubot/rootstock#211
Closes manubot/rootstock#183

* Use Athena to build PDF, if Docker installed

Merges manubot/rootstock#210
Closes manubot/rootstock#170

More information about Athena is available at
https://github.com/arachnys/athenapdf

Based on meta-review commit:
greenelab/meta-review@cffcfea

* Add meta review link to readme

Merges manubot/rootstock#217
Closes manubot/rootstock#216

* Increase shared memory of athenapdf container

Merges manubot/rootstock#220
Closes arachnys/athenapdf#195

Increase --shm-size from the default value of 64m to 1g when
running the athenapdf Docker image. Resolves athena issue:
`The renderer process has crashed`

Switch to using equal sign to separate Docker arguments
and values for consistency.
https://stackoverflow.com/q/50319060/4651668

* CSL author macro: substitute editor/venue

Merges manubot/rootstock#219

Ensures there is a newline between the title and venue,
when authors are missing.
Closes manubot/rootstock#218
Supersedes manubot/rootstock#158

Substitutes editors for authors when authors are missing.
Editors are labeled like "Sönke Bartling, Sascha Friesike (editors)".
slochower added a commit to slochower/smirnoff-host-guest-manuscript that referenced this pull request May 15, 2019
This build is based on
d62afc4.

This commit was created by the following Travis CI build and job:
https://travis-ci.com/slochower/smirnoff-host-guest-manuscript/builds/532938787
https://travis-ci.com/slochower/smirnoff-host-guest-manuscript/jobs/532938788

[ci skip]

The full commit message that triggered this build is copied below:

Rootstock 2019 05 15 (#36)

* webpage.py: note to ignore error in versions checkout

Merges manubot/rootstock#211
Closes manubot/rootstock#183

* Use Athena to build PDF, if Docker installed

Merges manubot/rootstock#210
Closes manubot/rootstock#170

More information about Athena is available at
https://github.com/arachnys/athenapdf

Based on meta-review commit:
greenelab/meta-review@cffcfea

* Add meta review link to readme

Merges manubot/rootstock#217
Closes manubot/rootstock#216

* Increase shared memory of athenapdf container

Merges manubot/rootstock#220
Closes arachnys/athenapdf#195

Increase --shm-size from the default value of 64m to 1g when
running the athenapdf Docker image. Resolves athena issue:
`The renderer process has crashed`

Switch to using equal sign to separate Docker arguments
and values for consistency.
https://stackoverflow.com/q/50319060/4651668

* CSL author macro: substitute editor/venue

Merges manubot/rootstock#219

Ensures there is a newline between the title and venue,
when authors are missing.
Closes manubot/rootstock#218
Supersedes manubot/rootstock#158

Substitutes editors for authors when authors are missing.
Editors are labeled like "Sönke Bartling, Sascha Friesike (editors)".
slochower added a commit to slochower/smirnoff-host-guest-manuscript that referenced this pull request May 15, 2019
This build is based on
d62afc4.

This commit was created by the following Travis CI build and job:
https://travis-ci.com/slochower/smirnoff-host-guest-manuscript/builds/532938787
https://travis-ci.com/slochower/smirnoff-host-guest-manuscript/jobs/532938788

[ci skip]

The full commit message that triggered this build is copied below:

Rootstock 2019 05 15 (#36)

* webpage.py: note to ignore error in versions checkout

Merges manubot/rootstock#211
Closes manubot/rootstock#183

* Use Athena to build PDF, if Docker installed

Merges manubot/rootstock#210
Closes manubot/rootstock#170

More information about Athena is available at
https://github.com/arachnys/athenapdf

Based on meta-review commit:
greenelab/meta-review@cffcfea

* Add meta review link to readme

Merges manubot/rootstock#217
Closes manubot/rootstock#216

* Increase shared memory of athenapdf container

Merges manubot/rootstock#220
Closes arachnys/athenapdf#195

Increase --shm-size from the default value of 64m to 1g when
running the athenapdf Docker image. Resolves athena issue:
`The renderer process has crashed`

Switch to using equal sign to separate Docker arguments
and values for consistency.
https://stackoverflow.com/q/50319060/4651668

* CSL author macro: substitute editor/venue

Merges manubot/rootstock#219

Ensures there is a newline between the title and venue,
when authors are missing.
Closes manubot/rootstock#218
Supersedes manubot/rootstock#158

Substitutes editors for authors when authors are missing.
Editors are labeled like "Sönke Bartling, Sascha Friesike (editors)".
@vincerubinetti vincerubinetti deleted the csl-delimiter branch September 10, 2019 22:01
adebali pushed a commit to CompGenomeLab/lemur-manuscript-archive that referenced this pull request Mar 4, 2020
Merges manubot/rootstock#219

Ensures there is a newline between the title and venue,
when authors are missing.
Closes manubot/rootstock#218
Supersedes manubot/rootstock#158

Substitutes editors for authors when authors are missing.
Editors are labeled like "Sönke Bartling, Sascha Friesike (editors)".
dhimmel pushed a commit that referenced this pull request Jun 11, 2020
merges #346
closes #155
supersedes #158
tested via manubot/manubot#110
refs https://twitter.com/csl_styles/status/1270049414200074243

Add a space delimiter across the style.
Fixes some references where there is a missing space after the title,
when authors are missing.

Set second-field-align="flush"
This option is not supported by pandoc yet, but it more closely resembles
hanging-indent="true", which pandoc is currently using to layout the
bibliography.

Co-authored-by: Rintze M. Zelle <[email protected]>
cthoyt added a commit to chemical-roles/manuscript that referenced this pull request Jun 30, 2020
* CSL: add space delimiter across the style

merges manubot/rootstock#346
closes manubot/rootstock#155
supersedes manubot/rootstock#158
tested via manubot/manubot#110
refs https://twitter.com/csl_styles/status/1270049414200074243

Add a space delimiter across the style.
Fixes some references where there is a missing space after the title,
when authors are missing.

Set second-field-align="flush"
This option is not supported by pandoc yet, but it more closely resembles
hanging-indent="true", which pandoc is currently using to layout the
bibliography.

Co-authored-by: Rintze M. Zelle <[email protected]>

* Improve themes for DOCX output

merges manubot/rootstock#348
closes manubot/rootstock#344

Update docx files that can be supplied to Pandoc via --reference-doc.

Recreate build/themes/default.docx from scratch (via a blank pandoc output).
Improves aesthetic and fixes issues like invisible table gridlines.

Add build/themes/nih-grant.docx that produces documents that adhere
to many of the National Institutes of Health (NIH) formatting requirements.
https://grants.nih.gov/grants/how-to-apply-application-guide/format-and-write/format-attachments.htm

Co-authored-by: Sebastian Karcher <[email protected]>
Co-authored-by: Rintze M. Zelle <[email protected]>
Co-authored-by: Vincent Rubinetti <[email protected]>
ploegieku added a commit to ploegieku/2023-functional-homology-paper that referenced this pull request Aug 6, 2024
Merges manubot/rootstock#219

Ensures there is a newline between the title and venue,
when authors are missing.
Closes manubot/rootstock#218
Supersedes manubot/rootstock#158

Substitutes editors for authors when authors are missing.
Editors are labeled like "Sönke Bartling, Sascha Friesike (editors)".
ploegieku added a commit to ploegieku/2023-functional-homology-paper that referenced this pull request Aug 6, 2024
merges manubot/rootstock#346
closes manubot/rootstock#155
supersedes manubot/rootstock#158
tested via manubot/manubot#110
refs https://twitter.com/csl_styles/status/1270049414200074243

Add a space delimiter across the style.
Fixes some references where there is a missing space after the title,
when authors are missing.

Set second-field-align="flush"
This option is not supported by pandoc yet, but it more closely resembles
hanging-indent="true", which pandoc is currently using to layout the
bibliography.

Co-authored-by: Rintze M. Zelle <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(minor html display issue) <strong> tags in refs occasionally missing following space or line break
3 participants