Introduction
Producing a professional publication in LaTeX involves multiple stages from initial draft to final output. Understanding the complete workflow ensures quality results and efficient production.
This guide covers the full LaTeX publishing workflow for documents of any typeโarticles, books, theses, or reports.
Drafting Phase
Initial Setup
Create a well-structured document from the beginning:
% main.tex
\documentclass[12pt]{article}
\usepackage[margin=1in]{geometry}
% Preamble
\input{preamble}
\title{Working Title}
\author{Author Name}
\date{\today}
\begin{document}
\begin{abstract}
This is the initial draft abstract...
\end{abstract}
\section{Introduction}
Write your content here...
\section{Methods}
More content...
\bibliography{references}
\end{document}
Project Organization
Organize your project for maintainability:
project/
โโโ main.tex % Main document
โโโ preamble.tex % Package imports and settings
โโโ content/
โ โโโ abstract.tex
โ โโโ introduction.tex
โ โโโ methods.tex
โ โโโ results.tex
โ โโโ conclusion.tex
โโโ figures/
โ โโโ diagram.png
โ โโโ chart.pdf
โโโ bibliography/
โ โโโ references.bib
โโโ build/ % Output directory
โโโ README.md
Preamble Management
% preamble.tex
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{amsmath}
\usepackage{booktabs}
\usepackage{cleveref}
% Custom commands
\newcommand{\term}[1]{\textit{#1}}
Editing Phase
Track Changes
Use todo notes for revision tracking:
\usepackage{todonotes}
\todo{Revise this section for clarity}
\todo[inline]{Add citation from Smith 2024}
List all todos:
\usepackage[colorinlistoftodos]{todonotes}
\reversemarginpar
Collaborative Comments
The changes package tracks additions, deletions, and replacements:
\usepackage[markup=underlined]{changes}
\added{New text added here}
\deleted{Text that was removed}
\replaced{old text}{new text}
Version Control
# Initialize git repository
git init project
git add .
git commit -m "Initial draft"
# Create feature branch for major revision
git checkout -b major-revision
# Track changes
git add -A
git commit -m "Add methodology section"
Using Git Effectively
# Track main.tex but ignore build outputs
echo "build/" >> .gitignore
echo "*.aux" >> .gitignore
echo "*.log" >> .gitignore
echo "*.pdf" >> .gitignore
# Create meaningful commits
git commit -m "Add literature review section"
# View history
git log --oneline --graph
# Compare versions
git diff v1.0 main.tex
Review Phase
Generating Review Copies
Create reviewer-friendly versions:
% Create review version with line numbers
\usepackage{lineno}
\linenumbers
% Show only comments
\usepackage[author={Reviewer}]{pdfcomment}
Collaboration Workflow
# Fork workflow for collaboration
git fork origin my-repo
git clone my-repo
# Create branch for your edits
git checkout -b review-edits
# Push changes
git push origin review-edits
# Create pull request
gh pr create --title "Review edits" --body "Changes made:"
Preprint Versions
% Add preprint information
\usepackage{geometry}
\geometry{letterpaper}
\newcommand{\preprintnote}{Preprint v1.0 -- \today}
Final Production
PDF Generation Pipeline
Modern LaTeX projects require multiple passes:
# Manual compilation
pdflatex -interaction=nonstopmode document
biber document
pdflatex -interaction=nonstopmode document
pdflatex -interaction=nonstopmode document
# Using latexmk (recommended)
latexmk -pdf document.tex
# For draft mode
latexmk -pdf -draftmode document.tex
Automatic Compilation
Create a latexmkrc file:
# latexmkrc
$pdflatex = 'pdflatex -interaction=nonstopmode %S';
$biber = 'biber %B --bcf %S';
$pdf_mode = 1;
$pvc_mode = 1; # Watch mode
$pdf_previewer = 'open -a Preview';
Optimizing PDF Output
\usepackage[cmyk]{xcolor}
\usepackage{hyperref}
\hypersetup{
pdfcreator={LaTeX with hyperref},
pdfproducer={},
pdfversion={1.4},
pdfdecimaldigits=3,
pdfpage=1,
colorlinks=true,
linkcolor=black,
citecolor=black,
urlcolor=black
}
Embedding Fonts
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{textcomp}
% Or use Latin Modern
\usepackage{lmodern}
Print Preparation
Color Management
% For print production
\usepackage[cmyk]{xcolor}
\usepackage[cmyk]{xwatermark}
% Define custom colors in CMYK
\definecolor{custom}{cmyk}{0.8, 0.3, 0, 0.2}
Bleeds and Trim Marks
\usepackage[
paperwidth=8.5in,
paperheight=11in,
trim=8.625in,11.125in,
layoutsize={8.5in,11in},
bleed=0.125in
]{geometry}
Press-Ready PDF
# Generate high-quality output
pdflatex -synctex=1 -interaction=nonstopmode document
# Embed fonts
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \
-sOutputFile=output.pdf \
-dPDFSETTINGS=/prepress \
document.pdf
Publication Formats
E-book Format
\usepackage{geometry}
\geometry{paperwidth=6in,paperheight=9in}
\geometry{margin=0.5in}
Screen PDF
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=blue,
urlcolor=blue,
citecolor=blue,
bookmarksnumbered=true,
pdfview=FitH,
pdfpagelayout=SinglePage
}
Print Version
\usepackage[cmyk]{xcolor}
\geometry{paperwidth=8.5in,paperheight=11in}
\geometry{twoside}
Multiple Output Formats
# Use Makefile for multiple formats
.PHONY: all
all: screen.pdf print.pdf ebook.pdf
screen.pdf: main.tex
pdflatex -jobname=screen "$<"
print.pdf: main.tex
pdflatex -jobname=print "$<"
ebook.pdf: main.tex
pdflatex -jobname=ebook "$<"
Best Practices
Workflow Tips
- Use version control - Git tracks every change
- Compile frequently - Catch errors early
- Keep content separate from formatting - Use includes
- Test final output - Check on multiple devices
- Backup regularly - Use remote repositories
- Use build tools - latexmk handles dependencies
- Review in PDF - Not just source
Automation
# Watch for changes and auto-compile
latexmk -pvc -view=pdf
# CI/CD for publications
# .github/workflows/latex.yml
name: LaTeX Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dante-ev/latex-action@v2
with:
root_file: main.tex
Conclusion
A structured workflow ensures quality LaTeX publications. Follow these stages for efficient production:
- Draft - Create content with minimal formatting
- Edit - Track changes and collaborate
- Review - Generate review copies
- Finalize - Optimize PDF output
- Publish - Format for target medium
Understanding and implementing these practices will transform your LaTeX document production from ad-hoc editing to professional publishing workflow.
Comments