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

Start a customstyle for bibliographic references #1043

Merged
merged 1 commit into from
Jun 14, 2018
Merged

Conversation

mwtoews
Copy link
Member

@mwtoews mwtoews commented Jun 14, 2018

This PR follows on from #1041

Modifies reference label to use BibTeX key name, as it was last week. There is a check to ensure the BibTeX key name is just letters and numbers, for the RST link. Also, it's my preference to format names in References section with lastfirst, e.g. switch from "F. W. Bessel" to "Bessel, F. W." However, if anyone has a strong preference to keep it plain (as it is right now), I can do this before merge.

TODO (if we get there) is to modify the reference style to be more Harvard-like, with year after name(s). This looks to be much more work, but it could be put into bibstyle.py too, or potentially committed upstream to Pybtex.

Other misc. minor additions in this commit is to fix an uppercase title for an entry, and add a few more file types to .gitignore. The *.bak is from JabRef.

raise KeyError(
'BibTeX key must contain only letters and numbers '
'(found {0!r})'.format(label))
return label
Copy link
Member

Choose a reason for hiding this comment

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

There's a tab before return label which trips up my Python:

(base) C:\dev\proj\docs>make html
sphinx-build -b html -d build/doctrees   source build/html
Running Sphinx v1.6.6

Configuration error:
There is a syntax error in your configuration file: inconsistent use of tabs and spaces in indentation (bibstyle.py, line 51)
Did you change the syntax from 2.x to 3.x?
Makefile:56: recipe for target 'html' failed
make: *** [html] Error 1

@kbevers
Copy link
Member

kbevers commented Jun 14, 2018

Also, it's my preference to format names in References section with lastfirst, e.g. switch from "F. W. Bessel" to "Bessel, F. W." However, if anyone has a strong preference to keep it plain (as it is right now), I can do this before merge.

+1 to this!

Modifies label to use BibTeX key name, and format names with lastfirst
@mwtoews
Copy link
Member Author

mwtoews commented Jun 14, 2018

I've fixed up the white space error, and it looks set to merge now.

@kbevers
Copy link
Member

kbevers commented Jun 14, 2018

Great. Thank you.

@kbevers kbevers merged commit b9b5767 into OSGeo:master Jun 14, 2018
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.

2 participants