Incite

Incite is a group of programs that when given a manifest of docx files it will extract citations and merge the docx files to generate a single zip output file and a bibtex file of all the merged citations.

This program is primarily designed to support `juristische zitierweise' styles when producing latex and PDF output and requires citations to be stored within the docx footnotes or endnotes as `ADDIN ZOTERO_ITEM CSL_CITATION'

The two stage process is:

  • bibtex
  • merge

A third stage may be invoked which uses pandoc to create output PDF, Latex etc.

  • publish

All input and output files and configuration is stored in a shared TOML configuration manifest.

This tool depends on PANDOC and in turn TeX when creating PDF and Latex output.

Setup

sudo apt install python3 jq unzip pandoc texlive-luatex texlive-latex-recommended texlive-fonts-recommended

Install

hg clone https://hg.kewl.org/pub/incite
cd incite
make setup
make venv
source ~/.venvs/incite/bin/activate
make install

Update

cd incite
hg pull -u
source ~/.venvs/incite/bin/activate
make clean
make install

MANIFEST

The manifest TOML file contains parameters that define the project.

manifest.toml

This is a demo manifest.

# Document title or empty string (Latex, PDF and DOCX output only)
title = ""

# Table of contents depth (0 = none, 3 = standard) (Latex, PDF, and MD output only)
toc = 3

# bibtex is used to generate these files
sql = "incite.db"
bib = "incite.bib"

# merge is used to generate this file
zip = "incite.zip"

# bibtex limit for author, editor & contributor (0 = unlimited)
limit = 3

# Install the citation-style-language-styles package in debian
csl = "/usr/share/citation-style-language/styles/juristische-zitierweise-offentliches-recht.csl"

# Add pagebreak between merged files (Latex, PDF, and DOCX output only)
pagebreak = false

# Use document "endnotes" or page "footnotes" (Latex, PDF, and MD output only)
notes = "footnotes"

# Environment override for "endnotes" label
lang = "en"

# DOCX files to merge in order
input = [
        "doc-100826-01.docx",
        "doc-100826-02.docx",
        "doc-100826-03.docx",
        "doc-100826-04.docx",
        "doc-100826-05.docx",
        "doc-100826-06.docx"
]

# Output files to publish
output = [
        "incite.docx",
        "incite.md",
        "incite.pdf",
        "incite.tex"
]

SQLITE is used to manage a running log of citations found spanning multiple docx files.

BIBTEX

This program scans the docx input files and creates a bib file containing all discovered citations.

Usage
usage: bibtex [-h] [--debug] file

Extract Zotero citations from DOCX files

positional arguments:
  file        Manifest file path

options:
  -h, --help  show this help message and exit
  --debug     Enable debug mode
Run
bibtex etc/100826/manifest.toml
Output
head -32 etc/100826/incite.bib
@misc{644VJW4Y,
  author = {Lee, Hoesung and Calvin, Katherine and Dasgupta, Dipak and others},
  title = {IPCC, 2023: Climate Change 2023: Synthesis Report. Contribution of Working Groups I, II and III to the Sixth Assessment Report of the Intergovernmental Panel on Climate Change [Core Writing Team, H. Lee and J. Romero (eds.)]. IPCC, Geneva, Switzerland.},
  year = {2023},
  abstract = {The Synthesis Report (SYR) is a stand-alone synthesis of the most policy-relevant evidence from the scientific, technical, and socio-economic literature assessed in the Sixth Assessment Report (AR6) of the Intergovernmental Panel on Climate Change (IPCC). The SYR distils and integrates the main findings of the three reports of the Working Groups of the IPCC during the AR6, and the three AR6 Special Reports into a concise document. It consists of a Summary for Policymakers and a longer report.},
  publisher = {Intergovernmental Panel on Climate Change (IPCC)},
  doi = {10.59327/IPCC/AR6-9789291691647},
  url = {https://www.ipcc.ch/report/ar6/syr/},
  urldate = {2026-03-16},
  shorttitle = {IPCC, 2023},
  note = {Edition: First; Source: DOI.org (Crossref)},
}

@misc{7JARUNSA,
  author = {Shimizu, Cogan and Hitzler, Pascal and Gonzalez-Estrecha, Seila and others},
  title = {The Wikibase Approach to the Enslaved.Org Hub Knowledge Graph},
  year = {2023},
  abstract = {Many methodologies and platforms for creating, deploying, and defining the manner of knowledge graphs are available. For this paper, we single out the platform, Wikibase. Using Wikibase comes with many advantages: out-of-the-box software for de-referencing, a convenient user interface, a consistent way to track and record provenance and lineage, and the ability to execute SPARQL queries against an RDF representation of the knowledge graph. However, the provenance mechanism and the exact nature of the structure of the Wikibase representation can complicate developing a principled schema for knowledge graphs, as well as the approach to the materialization of the data for upload to the platform. In this paper, we detail the methodology used to design, implement, and deploy the Enslaved.Org Hub, a nationally recognized knowledge graph for documenting the peoples of the historical slave trade.},
  publisher = {Springer Nature Switzerland},
  doi = {10.1007/978-3-031-47243-5\_23},
  url = {https://link.springer.com/10.1007/978-3-031-47243-5\_23},
  isbn = {978-3-031-47242-8 978-3-031-47243-5},
  urldate = {2025-12-29},
  address = {Cham},
  journal = {The Semantic Web {\textendash} ISWC 2023},
  volume = {14266},
  pages = {419-434},
  note = {Series Title: Lecture Notes in Computer Science; Source: DOI.org (Crossref)},
  editor = {Payne, Terry R. and Presutti, Valentina and Qi, Guilin and others},
}

MERGE

This program scans the docx input files and merges them together to generate an output zip file.

Usage
usage: merge [-h] [--debug] file

Merge DOCX files updating citations

positional arguments:
  file        Manifest file path

options:
  -h, --help  show this help message and exit
  --debug     Enable debug mode
Run
merge etc/100826/manifest.toml

PUBLISH

This program takes the generated zip file and produces output using PANDOC which can be PDF, Latex etc

Usage
usage: publish [-h] [--debug] file

Publish merged DOCX files

positional arguments:
  file        Manifest file path

options:
  -h, --help  show this help message and exit
  --debug     Enable debug mode
Run
publish etc/100826/manifest.toml

CITATION

This tool will query the SQLITE database to view the JSON data generated by zotero.

Usage
usage: citation [-h] -d DIR [-s SQL] id

Retrieve citation data from SQLite database

positional arguments:
  id             Citation ID or item identifier to look up

options:
  -h, --help     show this help message and exit
  -d, --dir DIR  Data directory containing the SQLite database (Required)
  -s, --sql SQL  Custom SQLite file name (Default: incite.db in data
                 directory)
Run
citation -d etc/100826/ XX9RZTVH
Output
{
    "DOI": "10.1145/800193.1971922",
    "ISBN": "978-1-4503-7491-0",
    "URL": "https://dl.acm.org/doi/10.1145/800193.1971922",
    "abstract": "This note speculates about the emergence of personal, portable information manipulators and their effects when used by both children and adults. Although it should be read as science fiction, current trends in miniaturization and price reduction almost guarantee that many of the notions discussed will actually happen in the near future.",
    "accessed": {
        "date-parts": [
            [
                "2024",
                11,
                14
            ]
        ]
    },
    "author": [
        {
            "family": "Kay",
            "given": "Alan C."
        }
    ],
    "collection-title": "ACM '72",
    "container-title": "Proceedings of the ACM annual conference - Volume 1",
    "custom": {
        "groupID": "6250885"
    },
    "event-place": "New York, NY, USA",
    "id": "XX9RZTVH",
    "issued": {
        "date-parts": [
            [
                "1972"
            ]
        ]
    },
    "publisher": "Association for Computing Machinery",
    "publisher-place": "New York, NY, USA",
    "source": "ACM Digital Library",
    "title": "A Personal Computer for Children of All Ages",
    "type": "paper-conference",
    "version": 25,
    "volume": "1"
}

ONLYOFFICE

Zotero endnote citations are supported in ONLYOFFICE for Nextcloud or desktop.

If the zotero plugin cannot be found you must add it using the “Plugin Manager”.

When using the zotero plugin “Add custom style” to support endnotes.

For example, you can upload “chicago-note-bibliography.csl” from the “/usr/share/citation-style-language/styles/” directory.

Once the CSL is uploaded select “Chicago Manual of Style 17th Edition (note)” as the active style.

Add citations as per normal and endnotes will be populated.

Resources

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies