ComdTeX

Entornos matemáticos

Los entornos matemáticos son bloques estructurados para teoremas, lemas, demostraciones y afines. Se escriben con la sintaxis :::type[Título opcional]::: y ComdTeX los numera y renderiza automáticamente.

Sintaxis básica

:::theorem[Intermediate Value Theorem]
Let $f : [a, b] \to bb(R)$ be continuous. If $f(a) < 0 < f(b)$,
then there exists $c \in (a, b)$ such that $f(c) = 0$.
:::

:::proof
By the completeness of bb(R), consider $S = \{x \in [a,b] \mid f(x) < 0\}$.
Let $c = \sup S$. A standard $\varepsilon$-$\delta$ argument shows $f(c) = 0$.
:::

Dentro de un entorno, el contenido es Markdown y matemáticas normales: los atajos como bb(R) siguen funcionando, igual que cualquier otra sintaxis del editor.

Tipos numerados y sin numerar

Con numeración automática: theorem, lemma, corollary, proposition, definition, example, exercise. Cada tipo lleva su propio contador, independiente de los demás.

Sin numerar: proof, remark, note.

Prefijos de tamaño

Puedes anteponer un prefijo de tamaño al tipo de entorno:

  • sm (compacto)
  • lg (grande)

Por ejemplo: :::sm remark.

Etiquetas y referencias cruzadas

Los entornos se pueden etiquetar y luego citar desde cualquier parte del documento con @:

:::theorem[Bolzano]{#thm:bolzano}
If $f$ is continuous on $[a,b]$ and changes sign, then it has a root.
:::

The result follows from @thm:bolzano.

La etiqueta va entre llaves justo después del título, con el formato {#prefijo:nombre}. La referencia en el texto usa @prefijo:nombre y ComdTeX la resuelve automáticamente al número correspondiente.

Ejemplo completo

Un teorema etiquetado seguido de su demostración, con una referencia cruzada al final:

:::theorem[Bolzano]{#thm:bolzano}
If $f$ is continuous on $[a,b]$ and changes sign, then it has a root.
:::

:::proof
By the completeness of bb(R), consider $S = \{x \in [a,b] \mid f(x) < 0\}$.
Let $c = \sup S$. A standard $\varepsilon$-$\delta$ argument shows $f(c) = 0$.
:::

The result follows from @thm:bolzano.

Este patrón (teorema etiquetado, demostración inmediatamente después, y referencias posteriores por número) es la base de cualquier documento académico escrito en ComdTeX, y se exporta de forma limpia a LaTeX/Overleaf.

Dónde revisarlos

El panel Entornos reúne todos los bloques de teorema, lema, etc. de todo el vault, así que puedes navegar entre ellos sin salir del archivo actual. El panel Etiquetas audita referencias rotas, duplicadas o no usadas, incluidas las de los entornos.

Math environments

Math environments are structured blocks for theorems, lemmas, proofs, and the like. They are written with the syntax :::type[Optional title]:::, and ComdTeX numbers and renders them automatically.

Basic syntax

:::theorem[Intermediate Value Theorem]
Let $f : [a, b] \to bb(R)$ be continuous. If $f(a) < 0 < f(b)$,
then there exists $c \in (a, b)$ such that $f(c) = 0$.
:::

:::proof
By the completeness of bb(R), consider $S = \{x \in [a,b] \mid f(x) < 0\}$.
Let $c = \sup S$. A standard $\varepsilon$-$\delta$ argument shows $f(c) = 0$.
:::

Inside an environment, the content is normal Markdown and math: shorthands like bb(R) still work, along with every other editor syntax.

Numbered and unnumbered types

Auto-numbered: theorem, lemma, corollary, proposition, definition, example, exercise. Each type carries its own counter, independent of the others.

Unnumbered: proof, remark, note.

Size prefixes

You can prepend a size prefix to the environment type:

  • sm (compact)
  • lg (large)

For example: :::sm remark.

Labels and cross-references

Environments can be labeled and then cited from anywhere in the document with @:

:::theorem[Bolzano]{#thm:bolzano}
If $f$ is continuous on $[a,b]$ and changes sign, then it has a root.
:::

The result follows from @thm:bolzano.

The label goes in braces right after the title, in the form {#prefix:name}. The reference in the text uses @prefix:name, and ComdTeX resolves it automatically to the matching number.

Full example

A labeled theorem followed by its proof, with a cross-reference at the end:

:::theorem[Bolzano]{#thm:bolzano}
If $f$ is continuous on $[a,b]$ and changes sign, then it has a root.
:::

:::proof
By the completeness of bb(R), consider $S = \{x \in [a,b] \mid f(x) < 0\}$.
Let $c = \sup S$. A standard $\varepsilon$-$\delta$ argument shows $f(c) = 0$.
:::

The result follows from @thm:bolzano.

This pattern (labeled theorem, proof right after it, and later references by number) is the backbone of any academic document written in ComdTeX, and it exports cleanly to LaTeX/Overleaf.

Where to review them

The Environments panel collects every theorem, lemma, and similar block across the whole vault, so you can navigate between them without leaving the current file. The Labels panel audits broken, duplicate, or unused references, including those from environments.