Did you know ... | Search Documentation: |
Packs (add-ons) for SWI-Prolog |
Title: | Fix Org-ref citations. |
---|---|
Rating: | Not rated. Create the first rating! |
Latest version: | 0.1.2 |
SHA1 sum: | e735c815cf9446a62e27f6b39acb50009c9dee1c |
Author: | Christian Gimenez <christian.gimenez@fi.uncoma.edu.ar> |
Home page: | https://bitbucket.org/cnngimenez/swi-orgref_fix |
Download URL: | https://bitbucket.org/cnngimenez/swi-orgref_fix/get/orgref_fix-*.zip |
Requires: | bibtex |
No reviews. Create the first review!.
Version | SHA1 | #Downloads | URL |
---|---|---|---|
0.1.2 | e735c815cf9446a62e27f6b39acb50009c9dee1c | 1 | https://bitbucket.org/cnngimenez/swi-orgref_fix/get/orgref_fix-0.1.2.zip |
0.1.0 | 7f76c67aa196b675f7e6910be4b3bd0912e9bfcc | 7 | https://bitbucket.org/cnngimenez/swi-orgref_fix/get/orgref_fix-0.1.0.zip |
Referenced packages in this documentation:
org-ref: ![img](https://melpa.org/#/org-ref) ox-twbs (optional): ![img](https://melpa.org/#/ox-twbs)
When using Org-mode with org-ref, beautiful references are generated on LaTeX exports. But what about HTML? References and citations are exported as broken links, specially if you use the ox-twbs package (from Melpa) or ox-html (included in Org-mode and Emacs).
So, this package provides predicates to fix this and more. This is what this package can do for you:
First, install the package in SWI-Prolog. Run swipl
on your terminal and write:
pack_install(orgref_fix).
Use Emacs to export your org document into HTML. Use `C-c C-e h h` for HTML or `C-c C-e w h` for TWBS export.
Ensure that \printbibliography
string is where you want the bibliography or references in your HTML. It will be replaced by the HTML code with the author and titles. If it is not exported in your HTML code, add it by hand or try the following in your org file and export to HTML again:
#+HTML: \printbibliography
Load the orgref_fixes
library and execute fix_all/4 predicate. For example, to fix the citations, references and to add the bibliography to the HTML export file from org_file.org
, write the following:
use_module(library(orgref_fixes)). fix_all('org_file.org', 'bibtex_file.bib', 'exported_html_file.html', 'output_file.html').
Author names and titles may have non-ascii letters. This prolog code tries to recognise some of LaTeX commands that generates these characters, such as: `\'{a}` for á, `\'{e}` for é, and others: íóúñäëïöüçßÅåæ. Any LaTeX commands that were not interpreted by the code, are leaved as it is without curly bracket ("{" and "}") characters.
To add more support, you can download this code and add more accents by modifying the accent//1 and accented_vowel//2 DCG rules. The first one, interpret the command (accent("'") --> [39].
interpret the `\'{X}` command). The second one, parse its value (accented_vowel("'", `á`) --> "a".
parses the `\'{a}` LaTeX code).
Sorting citations by author name or other criteria is not supported… Sorry.
!img
This software is under the General Public Licence version 3.
See COPYING.txt file or the GNU GPL Licence page.
Pack contains 17 files holding a total of 103K bytes.