ComdTeX

Obsidian y Overleaf

Un formato, dos mundos

ComdTeX usa un formato interno mientras editas, llamado CMDX, pero eso nunca es lo que se guarda en disco. Tus archivos siguen siendo .md compatibles con Obsidian o .tex válido para LaTeX, en todo momento. La conversión entre lo que hay en disco y lo que ves en el editor ocurre automáticamente, al abrir y al guardar.

En discoEn el editor de ComdTeX
> [!note] Título (callout de Obsidian):::note[Título]
\begin{theorem}[Nombre] (LaTeX):::theorem[Nombre]
\frac{a}{b} (LaTeX)frac(a, b)
\begin{bmatrix}…\end{bmatrix} (LaTeX)mat(…)

Escribes frac(a, b) porque es más rápido de teclear que \frac{a}{b}, pero al guardar un archivo .tex lo que queda escrito en disco es LaTeX de verdad, no una notación propia de ComdTeX. Al guardar un .md, lo que queda es un callout de Obsidian de verdad. Nada de esto es una capa de compatibilidad aproximada: es una conversión bidireccional completa.

Abre el mismo vault en Obsidian, a la vez

Como los archivos en disco nunca dejan de ser Markdown u Obsidian-compatibles, puedes tener el mismo vault abierto en Obsidian y en ComdTeX al mismo tiempo. Los cambios van y vienen limpiamente: editas un teorema en ComdTeX con la sintaxis :::theorem, lo guardas, y en Obsidian aparece como un callout normal con el tipo de entorno codificado en el título (Theorem: Nombre), así que se puede reconstruir sin ambigüedad la próxima vez que ComdTeX lo abra.

Bloques especiales, guardados tal cual

No todo se puede representar como un callout de Obsidian sin perder información. Los bloques propios de ComdTeX (pseudocódigo, diagramas de flujo, tablas de verdad, gráficos Graphviz, funciones, diagramas conmutativos, código, dibujos de Excalidraw) se guardan verbatim: byte por byte, tal cual los escribiste, sin aplanarlos a un callout genérico. Versiones antiguas de ComdTeX sí los aplanaban, y eso corrompía el bloque en silencio al autoguardar; las versiones actuales detectan ese daño al abrir un archivo así y lo recuperan automáticamente cuando el tipo de bloque no es ambiguo.

La política general es que la conversión prefiere preservar antes que reescribir de forma agresiva: si algo no se puede representar limpiamente, ComdTeX deja el texto intacto y lo reporta como advertencia en vez de arriesgarse a perder contenido.

De vuelta a su forma original al guardar

Cada vez que guardas, el archivo vuelve a escribirse en su formato original: un .md sigue siendo .md compatible con Obsidian, un .tex sigue siendo .tex válido. No hay una tercera copia, ni una base de datos intermedia.

Exportar a otros formatos

Desde el mismo documento puedes exportar a DOCX, Beamer, Reveal.js y Typst usando pandoc (instalado aparte), y también importar documentos existentes (.docx, .odt, .tex, .html, .epub, .rst, .org, entre otros) hacia Markdown, con las imágenes incrustadas extraídas al vault. Así, un vault de ComdTeX no es una jaula: es un punto de partida que se mueve hacia Overleaf, hacia una presentación, o hacia el formato de otra persona sin fricción.

Obsidian and Overleaf

One format, two worlds

ComdTeX uses an internal format while you edit, called CMDX, but that is never what gets saved to disk. Your files stay .md files compatible with Obsidian, or valid .tex for LaTeX, at all times. The conversion between what is on disk and what you see in the editor happens automatically, on open and on save.

On diskIn the ComdTeX editor
> [!note] Title (Obsidian callout):::note[Title]
\begin{theorem}[Name] (LaTeX):::theorem[Name]
\frac{a}{b} (LaTeX)frac(a, b)
\begin{bmatrix}…\end{bmatrix} (LaTeX)mat(…)

You type frac(a, b) because it is faster than \frac{a}{b}, but when you save a .tex file, what lands on disk is real LaTeX, not a ComdTeX-specific notation. When you save a .md file, what lands on disk is a real Obsidian callout. None of this is an approximate compatibility layer: it is a complete two-way conversion.

Open the same vault in Obsidian, at the same time

Because the files on disk never stop being Markdown or Obsidian-compatible, you can have the same vault open in Obsidian and in ComdTeX at once. Changes round-trip cleanly: you edit a theorem in ComdTeX with :::theorem syntax, save it, and in Obsidian it shows up as a normal callout with the environment type encoded in the title (Theorem: Name), so it can be reconstructed unambiguously the next time ComdTeX opens it.

Special blocks, stored as-is

Not everything can be represented as an Obsidian callout without losing information. ComdTeX-only blocks (pseudocode, flowcharts, truth tables, Graphviz graphs, plots, commutative diagrams, code, Excalidraw drawings) are stored verbatim: byte for byte, exactly as you wrote them, never flattened into a generic callout. Older versions of ComdTeX did flatten them, and that silently corrupted the block on autosave; current versions detect that kind of damage when opening such a file and recover it automatically when the block type is unambiguous.

The general policy is that conversion prefers preservation over aggressive rewriting: when something cannot be represented cleanly, ComdTeX leaves the text intact and reports it as a warning instead of risking lost content.

Back to its original shape on save

Every time you save, the file is written back in its original format: a .md stays .md compatible with Obsidian, a .tex stays valid .tex. There is no third copy, no intermediate database.

Exporting to other formats

From the same document you can export to DOCX, Beamer, Reveal.js, and Typst using pandoc (installed separately), and you can also import existing documents (.docx, .odt, .tex, .html, .epub, .rst, .org, among others) into Markdown, with embedded images extracted into the vault. A ComdTeX vault is not a cage: it is a starting point that moves toward Overleaf, toward a presentation, or toward someone else’s format without friction.