Abstract
This demonstration document (Demo 03) exhaustively validates the three pillars of links and citations in MarkCharm: 1. Advanced Bibliography (BibTeX) covering dynamic field extraction (\citefield), case law, and statutes; 2. Hierarchical and Multilingual Citations (\clref); 3. NLG (Natural Language Generation) Engine performing nominal agreement and grammatical correction of articles/prepositions before references (\cref).
MarkCharm's bibliography engine allows inserting references and extracting arbitrary fields directly into the body text:
\cite): The foundation of digital typography systems traces back to Donald Knuth's classical work [1].\cite): Modern document compilation technologies combine multiple normative standards and parsing algorithms [2, 3].\cite): International information security standards establish guidelines for privacy management [4].\citetitle): According to Lei nº 8.112, de 11 de dezembro de 1990, federal public servants operate under a dedicated legal framework.\citeshorttitle): Abbreviated reference to the standard such as Lei nº 8.112/1990 (with fallback for works without a shorttitle: The TeXbook).\citeshorttitle / \cite): External control guidance from audit courts [9] represented by Acórdão 1234/2023 - TCU.\citefield)Below, each field of the bibliographic entries for academic works, legislation, and case law is extracted individually in the text:
knuth1984author): Donald E. Knuthtitle / \citetitle): The TeXbookpublisher): Addison-Wesley Professionaladdress): Reading, Massachusettsyear): 1984isbn): 0-201-13448-9brasil1990 (Federal Law)author): Brasiltitle / \citetitle): Lei nº 8.112, de 11 de dezembro de 1990shorttitle / \citeshorttitle): Lei nº 8.112/1990year): 1990\citeshorttitle): Decreto nº 10.024/2019 — Decreto nº 10.024, de 20 de setembro de 2019\citeshorttitle): IN SGD/MGI nº 94/2022 — Instrução Normativa SGD/MGI nº 94, de 23 de dezembro de 2022\citeshorttitle): Portaria MGI nº 1.234/2023 — Portaria MGI nº 1.234, de 15 de maio de 2023\citeshorttitle / \citefield): Acórdão 1234/2023 - TCU (Note: Relator: Min. Benjamin Zymler)\nocite and \citeall)Not all references in the .bib file need to generate explicit numerical markers in the body text.
(Note: The command \citeall or \nocite{*} can be used to force rendering all entries from the .bib file in the final bibliography section).
When the \hyperlinks{all} directive is enabled in the preamble:
\cite, \citetitle, \citeshorttitle, \citefield) become navigable hyperlinks directing to the corresponding entry in the References section.https://doi.org/...) and URL (https://...).isbn, volume, number, pages, publisher, institution, journal, and address are formatted with typographic rigor.line-height: 1.5;): The style of reference entries uses a line-height of 1.5 within a multi-line reference entry, ensuring superior readability and compliance with editorial standards.For example, the publication on advanced structured markup parsing [3] renders its DOI directly clickable in the bibliography list.
To ensure stability in continuous integration (CI/CD) pipelines, MarkCharm handles non-existent citations resiliently.
When citing an absent key from the .bib database, such as \cite{missing_key_2026}:
MCW-BIB-001 (Unresolved Citation Key) is emitted.MarkCharm features an advanced engine that flexes prepositions, articles, and adjectives based on the gender and number of the target reference.
Consider the following structural sections for testing:
Typed: See \cref{ali:a} and \cref{sec:testes_nlg}.
Compiled: See sec. 6, item 2.1 and sec. 6.
The \clref (Cross-List Reference) command unifies items into a readable format:
\clref{inc:a, inc:b} -> Sec. 6, Para. 2, subitems first and second\cnameref)Instead of citing section numbers, MarkCharm allows dynamically injecting the title:
Compatibility and Compilation:
\hyperlinks{all} in the document preamble.markcharm check-dir . --error-format llm to audit unresolved citation keys (MCW-BIB-001).markcharm compiler.