Skip to content
This repository has been archived by the owner on Sep 28, 2023. It is now read-only.

Rudimentary binding to BibLaTeX package, and simple example. #102

Merged
merged 1 commit into from Jan 26, 2018

Conversation

leftaroundabout
Copy link
Collaborator

I thought about what commands apart from the inevitable addbibresource and printbibliography should be in the module, but could not decide how deep to go down that rabbit hole.

What I would really like to add is a monad transformer that allows conveniently citing stuff by just giving a DOI and having the Haskell programm automatically look up the bibliography information. This should be doable in the way the DOI package does it. (But I reckon such a feature shouldn't be included in the HaTeX package, since it involves networking etc.?)

@Daniel-Diaz
Copy link
Owner

I think adding that monad transformer is a good idea. I am open to adding new dependencies in order to add some convenience for the user. This could alternatively done by writing the monad transformer in another package (HaTeX-DOI?). Both options seem good to me. What dependencies are you thinking of when you say "networking etc"?

Thanks for the contribution!

@leftaroundabout
Copy link
Collaborator Author

I made a possible implementation of that monad transformer.

https://github.com/leftaroundabout/HaTeX/tree/feature/simple-doi-references

As it stands, this would only incur a dependency on bibtex, no networking, but

documentWithDOIReferences :: (r -> m (Maybe BibTeX.T)) -> ReferenceQueryT r m () -> m ()

gives an easy way to plug in an action that really looks up any DOI from the internet.

What do you think, is that a good compromise between dependecy weight and usefulness?

@Daniel-Diaz
Copy link
Owner

This is great stuff! I think we should go forward with the DOI code. Mind opening a PR for that? Meanwhile, I am merging this one. Thanks a lot!

@Daniel-Diaz Daniel-Diaz merged commit a5e902e into Daniel-Diaz:master Jan 26, 2018
@leftaroundabout
Copy link
Collaborator Author

Sorry I didn't give any heads up to the DOI stuff. Actually I have been using this for some time now, and it works quite well, but I'm not confident it's really the right form for putting in HaTeX. It's kind of hackish and non-obvious, not really following LaTeX but adding something completely new on top. I think it would make more sense to put this and other more idiosyncratic stuff in a separate package... I opened a separate GitHub issue for this.

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

Successfully merging this pull request may close these issues.

None yet

2 participants