[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [emacs-humanities] Citations in org-mode
From: |
Juan Manuel Macías |
Subject: |
Re: [emacs-humanities] Citations in org-mode |
Date: |
Thu, 11 Feb 2021 09:42:30 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Hi Greg,
Greg Bognar via Emacs-humanities <emacs-humanities@gnu.org> writes:
> However, in order to use the particular style I had in mind (full citation in
> a
> footnote), I would need to find a .csl file to use. I've looked at the
> suggested link [1], but there are many and no descriptions of what they do;
> the
> closest I found was `chicago-note-bibliography-with-ibid.csl'. But it does
> not
> print the full citation (only author and title) and generates a list of
> references after the main body.
If what you need is to keep your bibTeX styles, you may be interested in this
method
(an alternative to using Pandoc/CSL) that I have developed, although I am
afraid it is
still in a very crude state and as of today it is, above all, a proof of
concept. But it
works reasonably well, I think. It is intended for bibLaTeX/Biber, but it can
be
adapted to bibTeX.
It is intended also for Org --> HTML. From HTML it would not be difficult to
convert to
docx/odt with pandoc. I could even try to adapt my code to direct export to
odt from Org ...
The idea is to compile in the background with make4ht. In your working
directory you need to have two files:
1. A *.tex file, which would contain *only* a very basic preamble for make4ht
process: especially
the bibTeX/bibLaTeX configuration. For example:
\documentclass{article}
\usepackage{fontspec}
\usepackage[<whatever-language>]{babel}
% for bibLaTeX
\usepackage[backend=biber,style=authortitle,dashed=true,sorting=nyt]{biblatex}
%% more code related to bibLaTeX (or bibTeX) ...
...
2. A small lua file that will control the make4ht compilation. If we run
make4ht in draft
mode it will not call Biber. This file can be named (for example) build.lua
(Biber can
be replaced by BibteX):
if mode=="draft" then
Make:htlatex {}
else
Make:htlatex {}
Make:biber {} -- or bibTeX
Make:htlatex {}
end
Here you can download a small Org document for testing that includes all the
code. For this code
to be executed when exporting to HTML, you must have configured the variable
org-export-allow-bind-keywords as non-nil:
https://gitlab.com/-/snippets/2066135
In the function (lines 28 and 29) there are two variables to indicate the *.tex
file name
(for make4ht) and your *.bib source file.
Citations must be written using the same bibTeX / bibLaTeX syntax, between
!!-...-!!
(tested with a full installation of TeX Live 2020).
For more info, you can also visit this thread from the Org Mode mailing list:
https://lists.gnu.org/archive/html/emacs-orgmode/2021-01/msg00395.html
Regards,
Juan Manuel
- Re: [emacs-humanities] Citations in org-mode, (continued)
Re: [emacs-humanities] Citations in org-mode, M . ‘quintus’ Gülker, 2021/02/09
Re: [emacs-humanities] Citations in org-mode, Grant Rosson, 2021/02/09
Re: [emacs-humanities] Citations in org-mode, Greg Bognar, 2021/02/10