GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ThalesMMS/jff-to-tex-Turing-Machine-Diagram-Converter: Python converter that turns JFLAP .jff Turing machine diagrams into LaTeX/TikZ, with example machines and manually curated diagram assets for automata coursework.

BranchesTags
Open more actions menu

Latest commit

 

History

12 Commits
12 Commits

Folders and files

NameName
Last commit message
Last commit date
screenshots
screenshots
 
 
src
src
 
 
.gitignore
.gitignore
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
SUPPORT.md
SUPPORT.md
 
 
converter.py
converter.py
 
 

Repository files navigation

JFLAP to LaTeX Converter & Turing Machine Diagrams

This project provides a Python tool to automatically convert JFLAP (.jff) Turing Machine files into high-quality LaTeX (.tex) diagrams using TikZ. It also includes a collection of manually crafted Turing Machine examples.

JFLAP to LaTeX Converter

Easily turn your JFLAP designs into publication-ready LaTeX diagrams.

Example

Input (JFLAP): JFLAP Input

Output (LaTeX/TikZ): LaTeX Output

Usage

  1. Prerequisite: Ensure you have Python installed.
  2. Run the script:
    python3 converter.py <path_to_input.jff>
    Example:
    python3 converter.py src/test.jff
    This generates a .tex file in the same directory as the input (e.g., src/test.tex).

Converter Features

  • Automatic Scaling: Converts pixel coordinates to LaTeX cm coordinates.
  • Layout Preservation: Flips logic to match JFLAP's visual layout.
  • Smart Edges: Automatically bends bidirectional edges to prevent overlap.
  • Math Mode: Correctly formats symbols like \square (blank).

Included Examples

A collection of handwritten examples is also available in src/.

File Description
tm-example-template.tex Basic TM template with tape visualization
tm-equal-ab-count.tex Decider TM for L = { w ∈ {a,b}* | nₐ(w) = n_b(w) }
tm-unequal-ab.tex Decider TM for L = { aᵐbⁿ | m ≠ n }

Previews

Example template

tm-example-template

Equal a/b count

tm-equal-ab-count

Unequal a's and b's

tm-unequal-ab

Requirements

  • Python 3.x (for the converter)
  • LaTeX Distribution (TeX Live, MiKTeX, or MacTeX)
  • LaTeX Packages:
    • tikz (libraries: automata, positioning, arrows, shapes, calc)
    • amssymb
    • geometry

Compilation

Compile any .tex file (generated or example) using:

pdflatex src/test.tex

Community and support

For a small repo like this, the contribution process is intentionally lightweight:

  • See CONTRIBUTING.md for focused PR guidance
  • See SUPPORT.md for troubleshooting and FAQ notes
  • See SECURITY.md for private vulnerability reporting
  • See CODE_OF_CONDUCT.md for collaboration expectations

Issue forms and a pull request template are included under .github/ to keep reports reproducible without overcomplicating the project.

License

MIT License - see LICENSE for details.

About

Python converter that turns JFLAP .jff Turing machine diagrams into LaTeX/TikZ, with example machines and manually curated diagram assets for automata coursework.

Topics

automata-theoryjflapjflutterlatexpythontikzturing-machine

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.