From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KJiaLA1cDWCkXwAA0tVLHw (envelope-from ) for ; Sun, 24 Jan 2021 11:37:49 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id IOmCKA1cDWBFfwAAB5/wlQ (envelope-from ) for ; Sun, 24 Jan 2021 11:37:49 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E71E49403E8 for ; Sun, 24 Jan 2021 11:37:47 +0000 (UTC) Received: from localhost ([::1]:51716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3diE-0006Xt-0u for larch@yhetil.org; Sun, 24 Jan 2021 06:37:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44176) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3dhh-0006Xn-9a for emacs-orgmode@gnu.org; Sun, 24 Jan 2021 06:37:13 -0500 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]:35269) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l3dhf-00087O-8E for emacs-orgmode@gnu.org; Sun, 24 Jan 2021 06:37:12 -0500 Received: by mail-qt1-x82d.google.com with SMTP id t17so7657304qtq.2 for ; Sun, 24 Jan 2021 03:37:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=bA8GiYNJia7ai2Xk5kfkaDOwTDtr/qLQvIPVOnpVYYU=; b=o4gHwSOyQwabLk1N+ugizYpUw6BQKAoLd2O6JStf9NSPM+D2gAxkRr8euV4upi6fE1 QCkwUXU/7mNlBxz3U94QWawWNVk6BRm6DE9XUxUNKF7k/m7PSdedXtYkIBQRIVY2u5Dv lvNQ6/HaC/ez9xjYzFwsuH+WOvkk3idWBEMRQPnwFLpBdY9xrWfd7xuUISQXkYTQEnzg e9IzsXBC+k3Ret5US+ui7CmkKGxjGhMCOgzxee3d5JVt9PME4VqsUZU+tZmnr3o6zc6m etqwkflopksMtyl3Z+jN4TIe7I0Ulb/YXd6lGv6Cr415ZJE51+WI1LbzXtwwJuG6i+f5 XOow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=bA8GiYNJia7ai2Xk5kfkaDOwTDtr/qLQvIPVOnpVYYU=; b=OvKRJNQqIihWIEthiptZ+UAahKXmqh4sx9Gjy6rlGxTpEylI3zSmEidbEVu031Aixo rX1s8LW2e+6Pr0gN4cKgyusl/EdB4c1uGy0gssa+AYaRJ7cODRF4IbqfTAgYXB3TE8ip jy/35LV3w7z9T6hUyG4PqnvpKdci0MC86X7FMwTbyLehnUOteIJT0oOUHeF5c1IHrsWY FthN4fwFMvlqt2X9sFujiZQjkv20a7irOHycPPXDzP41/pU7H3AcDfDIQz6a9ynj5FFE e+I6USk36DHgXFXP9+1ZlvmVhHwWawCLwNID8Yp2fWuEz/QAdK6lhL5AAuxxEsmneqc8 JmFg== X-Gm-Message-State: AOAM532qdTC50dwUqhMRUsj0oz26FjCs5T6pfdfXWh7dd9WZkzP9jkru eUTitX8IQhySz8gOhVsGSsyvXxKj/8K0vg== X-Google-Smtp-Source: ABdhPJydOExmbQUVJ8XFfKhepWKTwqt/ChILJ5c3yZHo+Uehrhj4+lwiADlaNvo+nCV6XRIhUczCHQ== X-Received: by 2002:ac8:383a:: with SMTP id q55mr2288770qtb.273.1611488229674; Sun, 24 Jan 2021 03:37:09 -0800 (PST) Received: from gusbrs-laptop ([143.244.45.26]) by smtp.gmail.com with ESMTPSA id a129sm5125690qkf.95.2021.01.24.03.37.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Jan 2021 03:37:09 -0800 (PST) From: Gustavo Barros To: Juan Manuel =?utf-8?Q?Mac=C3=ADas?= Subject: Re: [Tip] Export a bibliography to HTML with bibLaTeX and make4ht References: <87wnw3oqz1.fsf@posteo.net> Date: Sun, 24 Jan 2021 08:37:05 -0300 In-Reply-To: <87wnw3oqz1.fsf@posteo.net> ("Juan Manuel =?utf-8?Q?Mac=C3=AD?= =?utf-8?Q?as=22's?= message of "Sat, 23 Jan 2021 12:03:14 +0100") Message-ID: <87ft2qlg66.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::82d; envelope-from=gusbrs.2016@gmail.com; helo=mail-qt1-x82d.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.25 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=o4gHwSOy; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: E71E49403E8 X-Spam-Score: -1.25 X-Migadu-Scanner: scn1.migadu.com X-TUID: clrxexpXRyON Hi Juan, that's very interesting. Thanks for sharing. On Sat, 23 Jan 2021 at 12:03, Juan Manuel Mac=C3=ADas wrote: > When I export to LaTeX an Org document that contains a bibliography, I > use bibLaTeX with a very custom style (i.e. quite a few lines of code > related to bibLaTeX in the preamble). I wanted to apply all that > bibLaTeX setting and styles when exporting to HTML too, so I came up > with this method, using make4ht. I share it here, in case it is useful > to someone. > > The idea is to compile with make4ht (see: > https://www.ctan.org/pkg/make4ht) a simple file with *only* the > bibliography, and "embed" the HTML output in the Org document. You need > to create in the working directory a tex file, which will serve as a > minimal preamble and which also includes all code related to bibLaTeX. > We can name it preamble.tex, and it would start like this: Indeed, when one actually needs biblatex-biber to process their bibliography, using Org is really hard. I have some history with this problem, as I initially approached Emacs (once upon a time) trying to use Org as a single source and multiple outputs (mainly pdf and odt). However, as you, I rely on heavily customized styles, which simply won't work with pandoc/CSL, so I got stuck. I eventually stayed in Emacs and use Org for a number of things, but for my more formal writing use AUCTeX + RefTeX, which is great too (alas, no odt..., at least not easily). For a long time I fancied trying something about it, pretty much in the same lines as you are doing here. My idea was to use `preview-latex' for this, which I still think is promising and, as far as I understand, pretty much automates what you are doing, which is to generate a stripped document, with a proper preamble, and run it on a piece of your actual document. It is used by AUCTeX and LyX (Org too, I presume) to generate images, but I don't see why it could not be streamlined to generate a dvi which could then be fed to tex4ht and friends, just as you do too. I thought that this procedure could, in principle, be used to export to other formats, but also to Org itself, generating either a second version of the source document with the citations and bibliography already processed as text (sort of a 'org-biblatex-citeproc'), or as a preview, such as the ones for math. Depending on how far you are willing to take your setup, this might be one path. It should handle two limitations of your procedure, which are: getting the bibliography with the entries actually cited in the document and citation callouts. The first one is easy to handle in your current approach by means of any of the multiple alternatives to generate a bib file with only the cited entries. The second one, much harder, as far as I can see. To my dismay, my own style customizations for biblatex are mainly aimed at citations (primary/archival sources for Economic History). But it was quite interesting to see your approach here. So, again, thank you. Best, Gustavo.