title: "## Notio manuscript: dual-render master files and mkdocs transclusion setup status: partial created: 2026-04-02 updated: 2026-04-08 timestamp: 20260402-121445-694073 tags: [issue] source: agent-observation project_primary: projio capture_id: 20260402-121444-183435 confidence: 1.0 transcript_file: /storage2/arash/worklog/workflow/captures/20260402-121444-183435/transcript.txt
Notio manuscript: dual-render master files and mkdocs transclusion setup¶
Problem¶
Pixecog (and likely other study repos) uses master.md files that must work with both mkdocs (web) and Pandoc (PDF/LaTeX). This requires:
-
Dual transclusion markers —
[[wikilink]]for mkdocs navigation +{% include-markdown "..." %}for content inclusion. Both systems need to resolve the same content atoms but use different syntax. Currently this convention is hand-maintained and easy to break. -
A Lua filter (
code/utils/lua/include.lua) that teaches Pandoc to understand mkdocs-style{% include-markdown %}and--8<--markers, with smart-quote normalization anddocs/path fallback. Every project that uses dual-render master files copies this filter. -
mkdocs plugin config — the
include-markdownplugin must be configured with specific settings (encoding,preserve_includer_indent,comments, etc.) and theezlinksplugin resolves wikilinks. This setup is project-specific but follows the same pattern.
Feature requests¶
-
manuscript_initshould scaffold the dual-marker master.md — when creating a manuscript, generate amaster.mdthat has both[[wikilink]]and{% include-markdown %}lines for each section. Themanuscript_assembletool already knows the section order; it should produce master.md in the dual-marker format. -
Ship the Lua filter as part of notio —
notio.manuscriptshould provideinclude.lua(or a Python equivalent) so projects don't need to maintain their own copy.manuscript_buildshould automatically use it. -
notio config mkdocsorsite_setupMCP tool — configure mkdocs.yml with the include-markdown plugin, ezlinks, bibtex, and any other plugins needed for the dual-render workflow. Currently each project hand-configures this. -
Escape helper — the
include-markdownplugin uses regex pre-processing (not Jinja2), so{% raw %}doesn't work, code blocks don't protect, and literal mentions of{% include-markdown %}in documentation break the build. Notio should either: - Document the
{%<!-- -->include-markdownHTML comment breaker pattern - Or provide a mkdocs plugin hook that excludes pattern matching inside code blocks
Context¶
Pixecog already has manuscript_build, manuscript_assemble, manuscript_validate, manuscript_status, manuscript_figure_insert MCP tools working. The gap is in the initial setup (mkdocs config, Lua filter provisioning) and in the master.md generation being dual-render-aware.
Currently the manuscript system audit lives at docs/how-to/doc/manuscript-system-audit.md in pixecog — it documents all the moving parts, P1 issues (wrong conda env in VSCode task, three PDF engines, missing Lua filter in defaults), and proposed architecture for clean separation.
Source context: pixecog¶
PixEcog (pixecog): Neuropixels and ECoG dataset and analysis
Recent commits:
0d1ff72 Publish TTL notebook HTMLs (investigate_ttl_artifact, ttl_artifact_removal)
56cc377 [DATALAD] Added subdataset
8fb3303 [DATALAD] Added subdataset
README:
type: readme
Quick Start for Collaborators¶
Follow this checklist to get started with Pixecog documentation and workflows.
🐀 Pixecog Project — Compact Overview¶
Core principles
- One immutable BIDS raw dataset (
raw/) as the canonical baseline - Each analysis pipeline ha