Did you know ... Search Documentation:
Packs (add-ons) for SWI-Prolog

Package "orgref_fix"

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

Reviews

No reviews. Create the first review!.

Details by download location

VersionSHA1#DownloadsURL
0.1.07f76c67aa196b675f7e6910be4b3bd0912e9bfcc7https://bitbucket.org/cnngimenez/swi-orgref_fix/get/orgref_fix-0.1.0.zip
0.1.2e735c815cf9446a62e27f6b39acb50009c9dee1c1https://bitbucket.org/cnngimenez/swi-orgref_fix/get/orgref_fix-0.1.2.zip

Referenced packages in this documentation:

org-ref: ![img](https://melpa.org/#/org-ref) ox-twbs (optional): ![img](https://melpa.org/#/ox-twbs)

Org-ref Fix

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:

  • Search for references and citations from an Org-file.
  • Take those citations, the BibTeX file and retrieve their entries.
  • Generate the bibliography section in HTML.
  • Fix all citation reference links to point to the bibliography item properly.
  • Fix all citation reference texts to a proper somewhat simmilar APA label.
  • Fix all references to figures, tables and footnotes (:warning: not yet implemented!).

How to use?

Installation

First, install the package in SWI-Prolog. Run swipl on your terminal and write:

pack_install(orgref_fix).

Export your org document into HTML

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

Use this library

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').

Some problems

Accents and Non-ASCII letters

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

Sorting citations by author name or other criteria is not supported&#x2026; Sorry.

License

!img

This software is under the General Public Licence version 3.

See COPYING.txt file or the GNU GPL Licence page.

Contents of pack "orgref_fix"

Pack contains 17 files holding a total of 103K bytes.