Exhaustive Test Suite for Citations and BibTeX

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).

1 Simple, Multiple Inline Citations and Dynamic Field Extraction

MarkCharm's bibliography engine allows inserting references and extracting arbitrary fields directly into the body text:


2 Demonstration of Field-by-Field Access (\citefield)

Below, each field of the bibliographic entries for academic works, legislation, and case law is extracted individually in the text:

2.1 Fields of Work knuth1984

2.2 Fields of Statute brasil1990 (Federal Law)

2.3 Regulatory Acts and Jurisprudence


3 Silent Inclusion of References (\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).


4 Rich Metadata, Typographic Style, and Interactive Hyperlinks

When the \hyperlinks{all} directive is enabled in the preamble:

  1. 1. Clickable Internal Hyperlinks: All inline citations (\cite, \citetitle, \citeshorttitle, \citefield) become navigable hyperlinks directing to the corresponding entry in the References section.
  2. 2. Automatic External Links: The References section generates external hyperlinks for identifiers like DOI (https://doi.org/...) and URL (https://...).
  3. 3. Rich Metadata Formatting: Fields like isbn, volume, number, pages, publisher, institution, journal, and address are formatted with typographic rigor.
  4. 4. Line Spacing (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.


5 Resilience Test and Compiler Diagnostics

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}:


References

[1] Donald E. Knuth. The TeXbook. Addison-Wesley Professional. Reading, Massachusetts. 1984. ISBN: 0-201-13448-9.
[2] Leslie Lamport. Document Preparation System: User's Guide and Reference Manual. In: Proceedings of the International Conference on Document Engineering. ACM Press. New York, NY, USA. p. 12–25. 1994.
[3] Smith, John and Doe, Jane and Silva, Carlos. Advanced Parsing Techniques for Structured Markup Engines. Journal of Computer Documentation Standards. v. 42. n. 3. p. 101–125. 2024. DOI: 10.1016/j.jcds.2024.03.005.
[4] International Organization for Standardization. Information security, cybersecurity and privacy protection — Information security management systems — Requirements. ISO/IEC. n. ISO/IEC 27001:2022. 2022. https://www.iso.org/standard/27001.
[5] Brasil. Lei nº 8.112, de 11 de dezembro de 1990. 1990.
[6] Brasil. Decreto nº 10.024, de 20 de setembro de 2019. Diário Oficial da União. 2019.
[7] Brasil. Ministério da Gestão e da Inovação em Serviços Públicos. Instrução Normativa SGD/MGI nº 94, de 23 de dezembro de 2022. Diário Oficial da União. 2022.
[8] Brasil. Ministério da Gestão e da Inovação. Portaria MGI nº 1.234, de 15 de maio de 2023. 2023.
[9] Brasil. Tribunal de Contas da União. Acórdão nº 1234/2023 - TCU - Plenário. 2023. Relator: Min. Benjamin Zymler.
[10] Alan Mathison Turing. Systems of Logic Based on Ordinals. Princeton University. Princeton, NJ. 1938.
[11] MarkCharm Development Team. MarkCharm Language Specification Guide. PortuLogic Open Source Software. 2026. Documentação oficial de referência da linguagem.

6 Hierarchical Citations and NLG Motor (Natural Language Generation)

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.

6.1 Multi-Citations (Hierarchical Lists)

The \clref (Cross-List Reference) command unifies items into a readable format:

6.2 Citations by Title (\cnameref)

Instead of citing section numbers, MarkCharm allows dynamically injecting the title:


6.3 Usage Notes and Requirements

Note

Compatibility and Compilation:

  1. Hyperlink Activation: To ensure citations generate navigable anchors in the final HTML, make sure to include \hyperlinks{all} in the document preamble.
  2. Key Validation: Run markcharm check-dir . --error-format llm to audit unresolved citation keys (MCW-BIB-001).
  3. Export Formats: Bibliography section generation is fully supported in HTML and PDF outputs via the markcharm compiler.