kaushalmodi / ox-hugo

A carefully crafted Org exporter back-end for Hugo
https://ox-hugo.scripter.co
GNU General Public License v3.0
867 stars 130 forks source link

Subtree-based flow: Org-cite: `#+print_biblioliography:` in one post does not fetch citation references from other post subtrees in the same file #664

Closed tsdye closed 1 year ago

tsdye commented 1 year ago

Actual Behavior

In-text citations are fine, but there are no items in References.

Expected Behavior

Items in References. My Org-mode file exports correctly to both html and markdown.

How to Reproduce the Issue

I haven't made a MWE. M-x org-version indicates the installation is not mixed.

Example Org File

#+TITLE: Syllabus for ANTH 382, How Archaeology Works
#+hugo_base_dir: .
#+bibliography: ~/Library/texmf/tsd-bib/tsd.bib
#+cite_export: csl ~/Library/csl/chicago-author-date.csl
#+hugo_pandoc_citations: nil
#+OPTIONS: todo:nil

* ANTH 382
  :PROPERTIES:
   :EXPORT_HUGO_SECTION: docs
  :END:
** Schedule
   :PROPERTIES:
   :EXPORT_FILE_NAME: anth-382-f22-schedule
   :EXPORT_TITLE: Fall 2022 Schedule
   :EXPORT_HUGO_WEIGHT: auto
   :EXPORT_HUGO_MENU: :menu main
   :EXPORT_OPTIONS: toc:nil 
   :EXPORT_DATE: 2022-08-04
   :END:

*** August
**** DONE August 22
CLOSED: [2022-06-19 Sun 16:13]
- Course Introduction
- Lecture: Foundations
- Assignment: [cite: @murphy:_archaeol;] (Course reserve, Hamilton Library Circulation Desk)
** Readings
   :PROPERTIES:
   :EXPORT_FILE_NAME: anth-382-f22-readings
   :EXPORT_TITLE: Fall 2022 Readings
   :EXPORT_HUGO_WEIGHT: auto
   :EXPORT_HUGO_MENU: :menu main
   :EXPORT_OPTIONS: toc:nil
   :EXPORT_DATE: 2022-08-04
   :END:

#+print_bibliography:

Generated Markdown File or Error

+++
title = "Fall 2022 Readings"
author = ["Thomas S. Dye"]
date = 2022-08-04
draft = false
weight = 2007
[menu]
  [menu.main]
    weight = 2007
    identifier = "fall-2022-readings"
+++

## References

<style>.csl-entry{text-indent: -1.5em; margin-left: 1.5em;}</style><div class="csl-bib-body">
</div>

Ox-Hugo Debug Information

Debug Info # Debug information for `ox-hugo` ## Emacs Version GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cairo version 1.16.0) of 2021-01-18, modified by Debian ## Org Version Org mode version 9.5.4 (9.5.4-ge0b05b @ /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/) ## Hugo Version Hugo Static Site Generator v0.80.0/extended linux/amd64 BuildDate: 2021-02-09T18:47:48Z (ubuntu 0.80.0-6) ### Org `load-path` shadows **Warning**: Possible mixed installation of Org /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-eval hides /usr/share/emacs/27.1/lisp/org/ob-eval /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-crypt hides /usr/share/emacs/27.1/lisp/org/org-crypt /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org hides /usr/share/emacs/27.1/lisp/org/org /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ox-md hides /usr/share/emacs/27.1/lisp/org/ox-md /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-habit hides /usr/share/emacs/27.1/lisp/org/org-habit /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-archive hides /usr/share/emacs/27.1/lisp/org/org-archive /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-tempo hides /usr/share/emacs/27.1/lisp/org/org-tempo /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-sed hides /usr/share/emacs/27.1/lisp/org/ob-sed /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-capture hides /usr/share/emacs/27.1/lisp/org/org-capture /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-gnuplot hides /usr/share/emacs/27.1/lisp/org/ob-gnuplot /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ol-w3m hides /usr/share/emacs/27.1/lisp/org/ol-w3m /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-list hides /usr/share/emacs/27.1/lisp/org/org-list /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ol-rmail hides /usr/share/emacs/27.1/lisp/org/ol-rmail /home/dk/.emacs.d/elpa/27.1/develop/org-contrib-0.4/ob-mscgen hides /usr/share/emacs/27.1/lisp/org/ob-mscgen /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-lilypond hides /usr/share/emacs/27.1/lisp/org/ob-lilypond /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-python hides /usr/share/emacs/27.1/lisp/org/ob-python /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-footnote hides /usr/share/emacs/27.1/lisp/org/org-footnote /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-attach hides /usr/share/emacs/27.1/lisp/org/org-attach /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-mobile hides /usr/share/emacs/27.1/lisp/org/org-mobile /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ol-eww hides /usr/share/emacs/27.1/lisp/org/ol-eww /home/dk/.emacs.d/elpa/27.1/develop/org-contrib-0.4/ob-shen hides /usr/share/emacs/27.1/lisp/org/ob-shen /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-latex hides /usr/share/emacs/27.1/lisp/org/ob-latex /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-sql hides /usr/share/emacs/27.1/lisp/org/ob-sql /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-ocaml hides /usr/share/emacs/27.1/lisp/org/ob-ocaml /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-element hides /usr/share/emacs/27.1/lisp/org/org-element /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-screen hides /usr/share/emacs/27.1/lisp/org/ob-screen /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ox-publish hides /usr/share/emacs/27.1/lisp/org/ox-publish /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-ref hides /usr/share/emacs/27.1/lisp/org/ob-ref /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-plot hides /usr/share/emacs/27.1/lisp/org/org-plot /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ol-info hides /usr/share/emacs/27.1/lisp/org/ol-info /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-js hides /usr/share/emacs/27.1/lisp/org/ob-js /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ox-org hides /usr/share/emacs/27.1/lisp/org/ox-org /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-maxima hides /usr/share/emacs/27.1/lisp/org/ob-maxima /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ol-bibtex hides /usr/share/emacs/27.1/lisp/org/ol-bibtex /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-eshell hides /usr/share/emacs/27.1/lisp/org/ob-eshell /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-dot hides /usr/share/emacs/27.1/lisp/org/ob-dot /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-emacs-lisp hides /usr/share/emacs/27.1/lisp/org/ob-emacs-lisp /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-shell hides /usr/share/emacs/27.1/lisp/org/ob-shell /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-fortran hides /usr/share/emacs/27.1/lisp/org/ob-fortran /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-num hides /usr/share/emacs/27.1/lisp/org/org-num /home/dk/.emacs.d/elpa/27.1/develop/org-contrib-0.4/ob-io hides /usr/share/emacs/27.1/lisp/org/ob-io /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-perl hides /usr/share/emacs/27.1/lisp/org/ob-perl /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-R hides /usr/share/emacs/27.1/lisp/org/ob-R /home/dk/.emacs.d/elpa/27.1/develop/org-contrib-0.4/ob-abc hides /usr/share/emacs/27.1/lisp/org/ob-abc /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-id hides /usr/share/emacs/27.1/lisp/org/org-id /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-agenda hides /usr/share/emacs/27.1/lisp/org/org-agenda /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-goto hides /usr/share/emacs/27.1/lisp/org/org-goto /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-forth hides /usr/share/emacs/27.1/lisp/org/ob-forth /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-feed hides /usr/share/emacs/27.1/lisp/org/org-feed /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-C hides /usr/share/emacs/27.1/lisp/org/ob-C /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ol hides /usr/share/emacs/27.1/lisp/org/ol /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-keys hides /usr/share/emacs/27.1/lisp/org/org-keys /home/dk/.emacs.d/elpa/27.1/develop/org-contrib-0.4/ob-vala hides /usr/share/emacs/27.1/lisp/org/ob-vala /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-protocol hides /usr/share/emacs/27.1/lisp/org/org-protocol /home/dk/.emacs.d/elpa/27.1/develop/org-contrib-0.4/ob-coq hides /usr/share/emacs/27.1/lisp/org/ob-coq /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-lob hides /usr/share/emacs/27.1/lisp/org/ob-lob /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-pcomplete hides /usr/share/emacs/27.1/lisp/org/org-pcomplete /home/dk/.emacs.d/elpa/27.1/develop/org-contrib-0.4/ob-ebnf hides /usr/share/emacs/27.1/lisp/org/ob-ebnf /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ol-eshell hides /usr/share/emacs/27.1/lisp/org/ol-eshell /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ol-gnus hides /usr/share/emacs/27.1/lisp/org/ol-gnus /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-haskell hides /usr/share/emacs/27.1/lisp/org/ob-haskell /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-groovy hides /usr/share/emacs/27.1/lisp/org/ob-groovy /home/dk/.emacs.d/elpa/27.1/develop/org-contrib-0.4/ob-hledger hides /usr/share/emacs/27.1/lisp/org/ob-hledger /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ol-mhe hides /usr/share/emacs/27.1/lisp/org/ol-mhe /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-sqlite hides /usr/share/emacs/27.1/lisp/org/ob-sqlite /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-matlab hides /usr/share/emacs/27.1/lisp/org/ob-matlab /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-exp hides /usr/share/emacs/27.1/lisp/org/ob-exp /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-attach-git hides /usr/share/emacs/27.1/lisp/org/org-attach-git /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ox-latex hides /usr/share/emacs/27.1/lisp/org/ox-latex /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-clock hides /usr/share/emacs/27.1/lisp/org/org-clock /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-awk hides /usr/share/emacs/27.1/lisp/org/ob-awk /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob hides /usr/share/emacs/27.1/lisp/org/ob /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-macro hides /usr/share/emacs/27.1/lisp/org/org-macro /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-macs hides /usr/share/emacs/27.1/lisp/org/org-macs /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-faces hides /usr/share/emacs/27.1/lisp/org/org-faces /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ox-ascii hides /usr/share/emacs/27.1/lisp/org/ox-ascii /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-compat hides /usr/share/emacs/27.1/lisp/org/org-compat /home/dk/.emacs.d/elpa/27.1/develop/org-contrib-0.4/ob-ledger hides /usr/share/emacs/27.1/lisp/org/ob-ledger /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ox-odt hides /usr/share/emacs/27.1/lisp/org/ox-odt /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-plantuml hides /usr/share/emacs/27.1/lisp/org/ob-plantuml /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ol-irc hides /usr/share/emacs/27.1/lisp/org/ol-irc /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-table hides /usr/share/emacs/27.1/lisp/org/org-table /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-ctags hides /usr/share/emacs/27.1/lisp/org/org-ctags /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-inlinetask hides /usr/share/emacs/27.1/lisp/org/org-inlinetask /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-makefile hides /usr/share/emacs/27.1/lisp/org/ob-makefile /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-timer hides /usr/share/emacs/27.1/lisp/org/org-timer /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ol-bbdb hides /usr/share/emacs/27.1/lisp/org/ol-bbdb /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ox-beamer hides /usr/share/emacs/27.1/lisp/org/ox-beamer /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-processing hides /usr/share/emacs/27.1/lisp/org/ob-processing /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-lisp hides /usr/share/emacs/27.1/lisp/org/ob-lisp /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-calc hides /usr/share/emacs/27.1/lisp/org/ob-calc /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ox hides /usr/share/emacs/27.1/lisp/org/ox /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-loaddefs hides /usr/share/emacs/27.1/lisp/org/org-loaddefs /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-clojure hides /usr/share/emacs/27.1/lisp/org/ob-clojure /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-colview hides /usr/share/emacs/27.1/lisp/org/org-colview /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-tangle hides /usr/share/emacs/27.1/lisp/org/ob-tangle /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-scheme hides /usr/share/emacs/27.1/lisp/org/ob-scheme /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-version hides /usr/share/emacs/27.1/lisp/org/org-version /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-indent hides /usr/share/emacs/27.1/lisp/org/org-indent /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-datetree hides /usr/share/emacs/27.1/lisp/org/org-datetree /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-java hides /usr/share/emacs/27.1/lisp/org/ob-java /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ox-icalendar hides /usr/share/emacs/27.1/lisp/org/ox-icalendar /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-entities hides /usr/share/emacs/27.1/lisp/org/org-entities /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-core hides /usr/share/emacs/27.1/lisp/org/ob-core /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-lint hides /usr/share/emacs/27.1/lisp/org/org-lint /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-sass hides /usr/share/emacs/27.1/lisp/org/ob-sass /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ol-docview hides /usr/share/emacs/27.1/lisp/org/ol-docview /home/dk/.emacs.d/elpa/27.1/develop/org-contrib-0.4/ob-J hides /usr/share/emacs/27.1/lisp/org/ob-J /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ox-html hides /usr/share/emacs/27.1/lisp/org/ox-html /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-css hides /usr/share/emacs/27.1/lisp/org/ob-css /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-src hides /usr/share/emacs/27.1/lisp/org/org-src /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-lua hides /usr/share/emacs/27.1/lisp/org/ob-lua /home/dk/.emacs.d/elpa/27.1/develop/org-contrib-0.4/ob-picolisp hides /usr/share/emacs/27.1/lisp/org/ob-picolisp /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-mouse hides /usr/share/emacs/27.1/lisp/org/org-mouse /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ox-texinfo hides /usr/share/emacs/27.1/lisp/org/ox-texinfo /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-ditaa hides /usr/share/emacs/27.1/lisp/org/ob-ditaa /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-comint hides /usr/share/emacs/27.1/lisp/org/ob-comint /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-org hides /usr/share/emacs/27.1/lisp/org/ob-org /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ox-man hides /usr/share/emacs/27.1/lisp/org/ox-man /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-ruby hides /usr/share/emacs/27.1/lisp/org/ob-ruby /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/org-duration hides /usr/share/emacs/27.1/lisp/org/org-duration /home/dk/.emacs.d/elpa/27.1/develop/org-contrib-0.4/ob-asymptote hides /usr/share/emacs/27.1/lisp/org/ob-asymptote /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-table hides /usr/share/emacs/27.1/lisp/org/ob-table /home/dk/.emacs.d/elpa/27.1/develop/org-9.5.4/ob-octave hides /usr/share/emacs/27.1/lisp/org/ob-octave Study the output of `M-x list-load-path-shadows`. ## `ox-hugo` defcustoms
org-hugo-section "posts"
org-hugo-use-code-for-kbd nil
org-hugo-preserve-filling t
org-hugo-delete-trailing-ws t
org-hugo-prefer-hyphen-in-tags t
org-hugo-allow-spaces-in-tags t
org-hugo-tag-processing-functions (org-hugo–tag-processing-fn-replace-with-spaces-maybe org-hugo–tag-processing-fn-replace-with-hyphens-maybe)
org-hugo-auto-set-lastmod nil
org-hugo-export-with-toc nil
org-hugo-export-with-section-numbers nil
org-hugo-front-matter-format "toml"
org-hugo-default-static-subdirectory-for-externals "ox-hugo"
org-hugo-external-file-extensions-allowed-for-copying ("jpg" "jpeg" "tiff" "png" "svg" "gif" "mp4" "pdf" "odt" "doc" "ppt" "xls" "docx" "pptx" "xlsx")
org-hugo-date-format "%Y-%m-%dT%T%z"
org-hugo-paired-shortcodes ""
org-hugo-suppress-lastmod-period 0.0
org-hugo-front-matter-format "toml"
kaushalmodi commented 1 year ago

Hello, I took the liberty to edit your post so that your Org and Markdown code blocks are rendered correctly.

I see that ox-hugo does insert the References heading as expected. But that the extent of involvement of ox-hugo with the citation feature.

The bibliography content is provided by the Org library oc-basic, and the HTML rendering of the bibliography is done by the external library citeproc.

I have tests for Org Cite that use syntax like [cite:@KEY]. But your citations look different as they have the :, _ and ; characters in them : [cite: @murphy:_archaeol;]. If you can provide a test .bib to match that Org file I can test it out.

But I think that you should see the same issue if you export it to other formats like HTML too. Can you please do the following:

  1. Confirm if this issue exists if you export using ox-html as well?
  2. If that doesn't show the same problem, please share your test .bib and .csl files too.
  3. If HTML export has the same issue, please report it on the Org mailing list.
tsdye commented 1 year ago

Thanks for the editorial assistance. I missed the Preview tab.

My org-mode file exports correctly to LaTeX, Markdown, and HTML using the ox-* facilities. The only problem I'm seeing is with ox-hugo.

I don't think the csl file is an accepted file type here. I'm not able to upload it, afaict.

Here is a bib file that includes the Murphy reference and its cross-reference.

@Comment{ ebib-main-file: /home/dk/Library/texmf/tsd-bib/tsd.bib }

@InCollection{murphy:_archaeol, annotation = {C75.7 .A724 1999}, pages = {240--254}, title = {Archaeology as folklore: The literary construction of the megalith {P}entre {I}fan in west {W}ales}, author = {Julia Murphy}, crossref = {gazin-schwarz:_archaeol_folkl} }

@Collection{gazin-schwarz:_archaeol_folkl, location = {London, UK}, publisher = {Routledge}, series = {Theoretical Archaeology Group}, date = {1999}, title = {Archaeology and Folklore}, editor = {Amy Gazin-Schwarz and Cornelius Holtorf} }

@Comment{ Local Variables: bibtex-dialect: biblatex End: }

kaushalmodi commented 1 year ago

@tsdye I looked at your example closely and now I understand what's happening there.

I believe you are expecting that the #+print_bibliography: in the "Readings" post mentions the citation mentioned in a different post "August 22". But that is not possible because each subtree's scope is different.

The same can be seen when you do a subtree-scoped export using ox-html as well. To do so:

  1. Move the point to the "Readings" subtree
  2. Type C-c C-e C-s h o (The C-s does subtree-scoped export. ox-hugo does something like that automatically if the point is inside a subtree with EXPORT_FILE_NAME property set.)
  3. You should see something like this: image

You can get the equivalent of the entire-file export that you probably attempted with ox-html, in ox-hugo as well. But then, you will be exporting the contents of the whole Org file into a single .md file (that's probably not what you intend). To do that, do C-c C-e H h. The lower case h in that binding forces export of the entire Org file and prevents auto-detection of the EXPORT_FILE_NAME properties in subtrees.

With that, the exported Markdown using ox-hugo looks like this:

+++
title = "Org Cite (Issue # 664)"
tags = ["org-cite"]
draft = false
+++

## ANTH 382 {#anth-382}

### Schedule {#anth-382-f22-schedule}

#### August {#august}

##### August 22 {#august-22}

-   Course Introduction
-   Lecture: Foundations
-   Assignment: (Julia Murphy, ) (Course reserve, Hamilton Library Circulation Desk)

### Readings {#anth-382-f22-readings}

## References

Julia Murphy (). _Archaeology as folklore: The literary construction of the megalith {P}entre {I}fan in west {W}ales_.

[ Note that I haven't associated any CSL file. So we don't see the HTML CSS styling in the References. I only used your Org file and .bib examples to generate the above.]


Summary

What you intended is not possible without any serious work put into ox-hugo because it requires the Org export to analysis all the post subtrees in the existing Org file. Existing Org exporters like ox-html, ox-ascii, etc. don't allow leaking the citation references from one subtree into another either.

tsdye commented 1 year ago

Very helpful. Thanks!

Tom

On Aug 5, 2022, at 2:38 PM, Kaushal Modi @.***> wrote:

 @tsdye I looked at your example closely and now I understand what's happening there.

I believe you are expecting that the #+print_bibliography: in the "Readings" post mentions the citation mentioned in a different post "August 22". But that is not possible because each subtree's scope is different.

The same can be seen when you do a subtree-scoped export using ox-html as well. To do so:

Move the point to the "Readings" subtree Type C-c C-e C-s h o (The C-s does subtree-scoped export. ox-hugo does something like that automatically if the point is inside a subtree with EXPORT_FILE_NAME property set.) You should see something like this:

You can get the equivalent of the entire-file export that you probably attempted with ox-html, in ox-hugo as well. But then, you will be exporting the contents of the whole Org file into a single .md file (that's probably not what you intend). To do that, do C-c C-e H h. The lower case h in that binding forces export of the entire Org file and prevents auto-detection of the EXPORT_FILE_NAME properties in subtrees.

With that, the exported Markdown using ox-hugo looks like this:

+++ title = "Org Cite (Issue # 664)" tags = ["org-cite"] draft = false +++

ANTH 382 {#anth-382}

Schedule {#anth-382-f22-schedule}

August {#august}

August 22 {#august-22}
  • Course Introduction
  • Lecture: Foundations
  • Assignment: (Julia Murphy, ) (Course reserve, Hamilton Library Circulation Desk)

Readings {#anth-382-f22-readings}

References

Julia Murphy (). Archaeology as folklore: The literary construction of the megalith {P}entre {I}fan in west {W}ales. [ Note that I haven't associated any CSL file. So we don't see the HTML CSS styling in the References. I only used your Org file and .bib examples to generate the above.]

Summary

What you intended is not possible without any serious work put into ox-hugo because it requires the Org export to analysis all the post subtrees in the existing Org file. Existing Org exporters like ox-html, ox-ascii, etc. don't allow leaking the citation references from one subtree into another either.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.