Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

fitch.sty module (Küwer's fitch.sty, improved by Kocurek).

Aperta
#3,541 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript, latex
Ambito
frontend, web-dev

Direzione di ricerca

Non è indicato alcun file di implementazione né alcun test. Inizia esaminando il supporto esistente di bussproofs in MathJax e i comandi e l'esempio forniti di fitch.sty. Il lavoro è completato quando la sintassi in stile Fitch richiesta viene visualizzata correttamente, incluse le linee di ambito annidate, i flag, le formule e le giustificazioni.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Duplicate Feature Request

Feature request: support for fitch.sty (Fitch-style natural deduction proofs)

Summary

MathJax 4 supports bussproofs for tree-style proofs. I would like to request support for fitch.sty by Johan W. Klüwer — the other major proof notation used in logic, known as Fitch-style or "flag notation" natural deduction.

The package and its syntax

The reference implementation is Klüwer's original fitch.sty (2001), improved by Alexander W. Kocurek (debugged, lighter dependencies):

  • Kocurek's improved version: https://www.actual.world/resources/tex/sty/kluwer/edited/fitch.sty
  • Kocurek's LaTeX resources page (with documentation): https://www.actual.world/latex/

Note: this is not the fitch package on CTAN (https://ctan.org/pkg/fitch), which is a more complex reimplementation by Peter Selinger and Richard Zach (OpenLogicProject). Klüwer's design is minimalist: a thin layer over tabular, with a handful of commands that map almost directly to visual elements:

Command Meaning
\fa Continuation line (vertical scope line)
\fh Hypothesis (short vertical line + flag underneath)
\fj Additional premise (full vertical line + flag)
\fb Start of subproof (short vertical line, no flag)
& Separator between formula and justification

Nesting is determined by how many \fa/\fh/\fj commands precede the formula on each line. Here is a complete example:

\begin{fitch}
\fh $P \to Q$ & $AS$ \\
\fa\fh $Q \to R$ & $AS$ \\
\fa\fa\fh $P$ & $AS$ \\
\fa\fa $Q$ & $\to E\,1,3$ \\
\fa\fa $R$ & $\to E\,2,4$ \\
\fa $P \to R$ & $\to I\,3\text{-}5$ \\
$(Q \to R) \to (P \to R)$ & $\to I\,2\text{-}6$ \\
$(P \to Q) \to ((Q \to R) \to (P \to R))$ & $\to I\,1\text{-}7$
\end{fitch}

This is structurally simpler than bussproofs, which requires explicit tree construction with \AxiomC, \UnaryInfC, \BinaryInfC, etc. The simplicity makes it a realistic target for a MathJax extension.

Real-world use case: G4+ theorem prover

I am a professor of logic at the Université de Lorraine (Nancy, France) and the developer of G4+, a theorem prover for minimal, intuitionistic, and classical first-order logic that produces human-readable proofs. G4+ is integrated into Geoff Sutcliffe's SystemOnTPTP and runs entirely in the browser via SWI-Prolog's WebAssembly build.

G4+ outputs proofs in three formats:

  1. G4 sequent calculus — rendered natively with bussproofs in MathJax ✅
  2. Tree-style natural deduction — rendered natively with bussproofs in MathJax ✅
  3. Fitch-style natural deduction — no MathJax support ❌

Because of this gap, I had to build a custom SVG renderer that parses the fitch.sty LaTeX output, draws scope lines and flags in SVG, and delegates formula rendering to MathJax via foreignObject. It works, but it is a fragile workaround.

Live demo (press Ctrl+M to toggle rendering): 🔗 https://g4-mic.vidal-rosset.net/wasm/tinker#A4Jw9gbgpgFDwAIC8A+BBHAIMtd04RG1QXgKM0wDog

<!-- INSERT SCREENSHOT: Fitch proof rendered with the custom SVG workaround -->

Who would benefit

  • Logic courses using web-based tools (carnap.io, online textbooks, LMS integrations)
  • Automated theorem provers with web interfaces
  • Philosophy and computer science departments teaching natural deduction in Fitch style
  • Any MathJax-enabled platform (Jupyter notebooks, Stack Exchange, academic blogs) where authors currently have no way to typeset Fitch proofs

Adding fitch.sty support would complete MathJax's coverage of the two standard proof notations in logic. The demand is niche but real, and growing as logic education moves online.

Thank you for considering this request.

# Feature request: support for `fitch.sty` (Fitch-style natural deduction proofs)

Summary

MathJax 4 supports bussproofs for tree-style proofs. I would like to request support for fitch.sty by Johan W. Klüwer — the other major proof notation used in logic, known as Fitch-style or "flag notation" natural deduction.

The package and its syntax

The reference implementation is Klüwer's original fitch.sty (2001), improved by Alexander W. Kocurek (debugged, lighter dependencies):

Note: this is not the fitch package on CTAN (https://ctan.org/pkg/fitch), which is a more complex reimplementation by Peter Selinger and Richard Zach (OpenLogicProject). Klüwer's design is minimalist: a thin layer over tabular, with a handful of commands that map almost directly to visual elements:

Command Meaning
\fa Continuation line (vertical scope line)
\fh Hypothesis (short vertical line + flag underneath)
\fj Additional premise (full vertical line + flag)
\fb Start of subproof (short vertical line, no flag)
& Separator between formula and justification

Nesting is determined by how many \fa/\fh/\fj commands precede the formula on each line. Here is a complete example:

\begin{fitch}
\fh $P \to Q$ & $AS$ \\
\fa\fh $Q \to R$ & $AS$ \\
\fa\fa\fh $P$ & $AS$ \\
\fa\fa $Q$ & $\to E\,1,3$ \\
\fa\fa $R$ & $\to E\,2,4$ \\
\fa $P \to R$ & $\to I\,3\text{-}5$ \\
$(Q \to R) \to (P \to R)$ & $\to I\,2\text{-}6$ \\
$(P \to Q) \to ((Q \to R) \to (P \to R))$ & $\to I\,1\text{-}7$
\end{fitch}

This is structurally simpler than bussproofs, which requires explicit tree construction with \AxiomC, \UnaryInfC, \BinaryInfC, etc. The simplicity makes it a realistic target for a MathJax extension.

Real-world use case: G4+ theorem prover

I am a professor of logic at the Université de Lorraine (Nancy, France) and the developer of G4+, a theorem prover for minimal, intuitionistic, and classical first-order logic that produces human-readable proofs. G4+ is integrated into Geoff Sutcliffe's [SystemOnTPTP](https://www.tptp.org/cgi-bin/SystemOnTPTP) and runs entirely in the browser via SWI-Prolog's WebAssembly build.

G4+ outputs proofs in three formats:

  1. G4 sequent calculus — rendered natively with bussproofs in MathJax ✅
  2. Tree-style natural deduction — rendered natively with bussproofs in MathJax ✅
  3. Fitch-style natural deduction — no MathJax support ❌

Because of this gap, I had to build a custom SVG renderer that parses the fitch.sty LaTeX output, draws scope lines and flags in SVG, and delegates formula rendering to MathJax via foreignObject. It works, but it is a fragile workaround.

Live demo (press Ctrl+M to toggle rendering):
🔗 https://g4-mic.vidal-rosset.net/wasm/tinker#A4Jw9gbgpgFDwAIC8A+BBHAlMtd04RG1QXgKM0wDog

Image

Who would benefit

  • Logic courses using web-based tools ([carnap.io](https://carnap.io), online textbooks, LMS integrations)
  • Automated theorem provers with web interfaces
  • Philosophy and computer science departments teaching natural deduction in Fitch style
  • Any MathJax-enabled platform (Jupyter notebooks, Stack Exchange, academic blogs) where authors currently have no way to typeset Fitch proofs

Adding fitch.sty support would complete MathJax's coverage of the two standard proof notations in logic. The demand is niche but real, and growing as logic education moves online.

Thank you for considering this request.

Lingua principale
JavaScript
Stelle
10.9k
Fork
1.2k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di mathjax/MathJax

Tutte le issue di mathjax/MathJax

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.