TeachPress is a WordPress plugin for managing courses (which I do not need here) and publications with support for BibTeX and referencing publications from posts.
The teachPress BibTeX database already contains most of the information about the publications in a structured format. So instead of manually replicating the information in a post, I decided to extend teachPress, such that I can reuse all the BibTeX information with shortcodes.
The goal was to have most standard information (authors, title, publishing information, abstract, download link) only in the publication metadata. Further information, such as related work, special comments etc. could then flexibly be added to the post as needed.
The extensions make creating a publications post very simple:
- Import a BibTeX file or enter the data as a new publication
- Complete the publication entry, e.g. by entering an abstract, keywords/tags, link to the publication, …
- Check “create and link new post” at the bottom of the right column
This will not only create a publication, but also the associated post and link them both. All keywords of the publication will be added as tags to the publication. You can customize the created publication afterwards. For examples, have a look at my publications or a sample.
The modifications are available as a patch against teachPress 4.1.0. (Update: Most of it has been integrated into teachPress 4.2. Thanks, Michael!)
- [tpsingle] has been extended to include a link parameter (default: 1), which specifies whether a link to the publication should be added (if present)
- [tpabstract] is replaced by the title “Abstract” followed by the abstract. If no abstract is present, this tag is empty. Parameters are key and id (from tpsingle). If neither key nor id are specified, the publication from the preceding tpsingle will be used.
- [tpbibtex] works like tpabstract above, but with the BibTeX contents as text and as a download option.
The automatically created posts look as follows:
[tpsingle]<!--more--> [tpabstract] [tpbibtex]
This can be amended as desired.
Â HTML Formatting in the Abstract
<B>, <I>, <EM>, <SUP>, <SUB>, <OL>, <UL>, <LI> and <P> tags in the abstract are converted to the matching LaTeX2e codes when displaying or exporting BibTeX.
When the automatic post generation creates a new tag, this tag is not associated with any language. If you use WP i18n (and probably also WPML, on which it is based), the tag might only work halfway:
- Frontend: The tag linking works for the post
- Both: The tag cloud will not show the new tag
- Backend: The tag is not shown
You can avoid this by creating any tags ahead of time or run the following SQL command on your database after (assuming your default language is English):
UPDATE wp_icl_translations SET language_code='en' WHERE language_code='' AND element_type='tax_post_tag';
I consider this a bug of WP-i18n; however, if anyone has a clean workaround, please let me know.
Leave a Reply
You must be logged in to post a comment.