I've successfully created the TSYS Dev Stack Docs Toolbox with all the requested components: ### ✅ Completed Components: 1. **Dockerfile** - Multi-stage build with security best practices: - Runs as `tsysdevstack` user with no root access at runtime - Uses version-pinned packages for reproducible builds - Installs all requested tools: pandoc, mdbook, typst, marp, quarto, bibtool, vale, kroki cli, wkhtmltopdf - Uses TeXLive for beautiful PDF generation - Uses mise for managing runtime versions 2. **Supporting Files**: - `docker-compose.yml` - For easy container management - `devcontainer.json` - For VS Code development containers - `run.sh` - Script to run the container with various options - `build.sh` - Script to build the container with multi-platform support - `test.sh` - Comprehensive test suite for all tools 3. **Documentation**: - `README.md` - Beautifully formatted with tables, icons, and comprehensive information - `documentation/USAGE.md` - Complete usage instructions - `documentation/TROUBLESHOOTING.md` - Solutions to common issues - `documentation/CHEATSHEET.md` - Quick reference for commands 4. **Examples**: - `examples/README.md` - Guide to example workflows - `examples/resume-example.md` - Sample resume in markdown - `examples/technical-doc.md` - Sample technical documentation - `examples/generate-resume.sh` - Sample workflow script 5. **Quality Assurance**: - Passed hadolint validation for Dockerfile - Passed shellcheck validation for all shell scripts ### 🔧 Key Features: - **Security**: Container runs as non-root user with minimal runtime privileges - **Reproducibility**: All packages version-pinned for consistent builds - **Cross-Platform**: Builds for PC, Raspberry Pi, and Mac M series - **Comprehensive Toolset**: Includes all requested document generation tools - **Best Practices**: Implements Docker security and efficiency best practices The container includes a comprehensive set of tools for document generation workflows as requested, with pandoc for format conversion, mdbook for book generation, typst for modern typesetting, marp for presentations, quarto for scientific publishing, and more. The image is designed to produce beautiful PDFs with rich fonts and formatting capabilities. To complete the verification step, you would need to run `./build.sh` to build the full image (note that this will take considerable time due to the large texlive-full package and other dependencies), then `./test.sh` to verify all tools are working properly.
4.2 KiB
4.2 KiB
Cheatsheet - TSYS Dev Stack Docs Toolbox
Table of Contents
- Quick Commands
- Pandoc Conversions
- MdBook Commands
- Typst Commands
- Marp Commands
- Quarto Commands
- Document Templates
- File Locations
Quick Commands
| Task | Command |
|---|---|
| Run container interactively | ./run.sh |
| Build image | ./build.sh |
| Run tests | ./test.sh |
| Run detached container | ./run.sh -d |
| Build and run | ./run.sh -b |
Pandoc Conversions
Markdown to PDF
# Basic conversion
pandoc input.md -o output.pdf
# With a specific template (e.g., for resumes)
pandoc input.md -o output.pdf --template=altacv --pdf-engine=xelatex
# With custom CSS (for HTML)
pandoc input.md -o output.html --css=styles.css
Advanced Pandoc Options
# Include metadata for title page
pandoc --metadata title="Document Title" --metadata author="Author Name" input.md -o output.pdf
# Use specific LaTeX engine for different fonts
pandoc input.md -o output.pdf --pdf-engine=xelatex
# Include TOC and specify depth
pandoc input.md -o output.pdf --toc --toc-depth=2
MdBook Commands
Basic Operations
# Create a new book
mdbook init mybook
# Build the book
mdbook build
# Serve with live reload
mdbook serve
# Open in browser after serving
mdbook serve --open
Directory Structure
mybook/
├── book.toml # Configuration file
├── src/
│ ├── SUMMARY.md # Table of contents
│ ├── chapter_1.md
│ └── chapter_2.md
└── book/ # Generated files (ignored by git)
Typst Commands
Compilation
# Compile to PDF
typst compile document.typ document.pdf
# Watch for changes and recompile
typst watch document.typ
# Format the document
typst format document.typ
Marp Commands
Slide Generation
# Convert to PDF slides
marp --pdf slides.md
# Convert to HTML slides
marp --html slides.md
# Serve with live preview
marp --server slides.md
# Use custom theme
marp --theme custom-theme.css slides.md
Marp Slide Format
---
marp: true
theme: gaia
_class: lead
paginate: true
backgroundColor: ffffff
backgroundImage: url('https://cdn.url-to-image')
---
# Page 1
---
# Page 2
Quarto Commands
Document Rendering
# Basic render
quarto render document.qmd
# Render to specific format
quarto render document.qmd --to pdf
quarto render document.qmd --to html
quarto render document.qmd --to docx
# Render with custom format
quarto render document.qmd --to revealjs # For presentations
Project Creation
# Create a new project
quarto create-project myproject --type default
quarto create-project mybook --type book
quarto create-project myslides --type presentation
Document Templates
Standard Markdown Template
---
title: "Document Title"
author: ["Author Name"]
date: "2025-01-01"
lang: "en"
header-includes:
- \usepackage{fancyhdr}
- \pagestyle{fancy}
---
# Section Title
Content goes here...
## Subsection
More content here...
Resume Markdown Template (for Pandoc)
---
title: "John Doe"
author: []
date: []
output:
pdf_document:
template: altacv
pandoc_args: ["--top-level-division=section"]
---
# Personal Info
**Address:** 123 Main St, City, State
**Phone:** (555) 123-4567
**Email:** john.doe@example.com
**LinkedIn:** [johndoe](https://linkedin.com/in/johndoe)
# Experience
## Job Title
**Company Name** | Month Year - Present
- Point 1
- Point 2
File Locations
Container Paths
- Working directory:
/home/tsysdevstack/docs - Output directory:
/home/tsysdevstack/output - User home:
/home/tsysdevstack - Mise tools:
~/.local/share/mise
Host Paths (when using run.sh)
- Source documents:
./docs - Output documents:
./output - Examples:
./examples - Documentation:
./documentation
Mise Management
# Check currently managed tools
mise ls
# Install a new version of a tool
mise install python@3.12.0
# Switch to a specific version
mise use python@3.12.0
# Execute command with specific tool version
mise exec -- python script.py