react-component-academic-reference v1.0.5
react-component-academic-reference
A react component library for using and displaying academic references.
:exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation:
:exclamation::exclamation::exclamation:THIS IS CURRENTLY A WORK IN PROGRESS :exclamation::exclamation::exclamation:
:exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation::exclamation:
GET IN TOUCH if you're interested in this component :smile:
Usage
import {
citation,
References,
REFERENCE_STYLES
} from "react-component-academic-reference";
const myReferences = [
{
citationKey: 'SAMPLE1',
entryType: 'ARTICLE',
entryTags: { title: 'sample title', author: 'sample author' },
},
{
citationKey: 'SAMPLE2',
entryType: 'ARTICLE',
entryTags: { title: 'sample title', author: 'sample author' },
},
{
citationKey: 'SAMPLE3',
entryType: 'ARTICLE',
entryTags: { title: 'sample title', author: 'sample author' },
},
];
const Cite = citation(myReferences);
const Article = props => (
<main>
Lorem ipsem dolor sit <Cite identifier="SAMPLE1" />.
<br />
<References
referenceStyle={REFERENCE_STYLES.harvard}
references={myReferences}
/>
</main>
);
As time goes on I hope I / the open-source community will add support for multiple reference and citation formats.
Compatibility
This is compatible with bibtex-parse-js, which converts bibtex to a JSON object. Usage of this component with bibtex-parse-js can be seen in the example app code here.
Contributing
If you're interested in this project, please get in touch. I will add details on how to contribute directly once I have implemented the basic features.
Future Work
- Fix reference style to match Harvard specification
- Add different styles for Citations (ie
CITATION_STYLES
) so that citations can appear in a different format to[3]
. - Anything else you can think of 😉
- Add support for multiple identifiers per citation (to output
Some cited text [14, 20].
)