A complete University of Aveiro thesis template powered by WebLaTeX with VSCode + Web + Git Integration + GitHub Copilot + Grammarly + Live Collaboration Support
This project combines the University of Aveiro Thesis Template with WebLaTeX, providing a professional LaTeX thesis environment that runs entirely in your browser via GitHub Codespaces. No local installation required!
UA Thesis Template Features:
- Complies with University of Aveiro's thesis guidelines
- Supports multiple departments and schools
- Professional cover page generation
- Portuguese and English language support
- Comprehensive bibliography management with biber
- Code syntax highlighting with minted
WebLaTeX Environment Features:
- Full VSCode editor in your browser
- Automatic PDF generation on save
- Git version control built-in
- GitHub Copilot AI assistance
- Grammarly/LanguageTool integration
- Real-time collaboration support
- Dark mode PDF viewer
This template was developed by professors and students. We will try to keep up to date with thesis requirements but some discrepancies may exist. Feel free to open issues and pull requests with new options, packages and fixes.
Traditional LaTeX platforms like Overleaf have limitations:
- Limited Git integration (requires $40/month subscription)
- Restricted collaboration (only 1 collaborator on free plan)
- No VSCode extensions or customization
- No GitHub Copilot or advanced AI assistance
- Limited dark mode support
✅ Full Git Integration - Complete version control, branches, commits, and history
✅ VSCode Power - All your favorite extensions, themes, and keybindings
✅ AI Assistance - GitHub Copilot suggests LaTeX commands and content
✅ Grammar Checking - Built-in Grammarly or LanguageTool support
✅ Real-time Collaboration - Unlimited collaborators with Live Share
✅ Mobile Access - Edit your thesis from any device, including tablets
✅ Automatic Builds - PDF generated on every save (Ctrl+S)
✅ No Installation - Runs entirely in the browser
-
Create Your Repository
- Use as Template (Recommended): Click
Use this template→Create a new repository - Or Fork: Fork this repository to your account
- Use as Template (Recommended): Click
-
Launch Codespace
- Click
<> Code→Codespaces→Create codespace on main - First launch takes ~2 minutes to install dependencies
- Subsequent launches take only 2-3 seconds
- Click
-
Start Writing!
- Edit
matter.texor files inchapters/ - Press
Ctrl+Sto save and auto-generate PDF - View PDF in the
build/directory
- Edit
Generated PDFs are saved to the build/ directory:
build/matter.pdf- Your complete thesisbuild/cover.pdf- Just the cover pages
- Save & Build - Press
Ctrl+Sto save and automatically generate PDF - View PDF - Click the PDF file in
build/folder⚠️ First preview takes 20-30 seconds - be patient!- After that, previews are instant
- Auto-save - Your document auto-saves and rebuilds on changes
- View Logs - Check
Terminal→Output→LaTeX Compilerfor errors - Troubleshooting - If PDF preview fails, reload browser (
Ctrl+R)
Starting a new chapter:
# 1. Create chapter file
chapters/chapter1.tex
# 2. Add to matter.tex
\include{chapters/chapter1}
# 3. Write content and save (Ctrl+S)Adding bibliography entries:
# 1. Add entries to bib/references.bib
# 2. Cite in text: \cite{key}
# 3. Biber processes automatically on buildAdding figures:
% 1. Place image in figs/ directory
% 2. Include in document:
\includegraphics[width=0.8\textwidth]{figs/myimage.png}Press Ctrl+S to save your file, and PDF is automatically generated to build/ directory.
make build # Build thesis (default)
make preview # Continuous watch mode (auto-rebuild on changes)
make print # Generate print-optimized PDF with color simplification
make ebook # Generate e-book optimized PDF
make lint # Lint LaTeX files for common errors
make clean # Clean auxiliary files
make cleanall # Clean everything including PDFsMain documents to compile:
matter.tex- Complete thesis document (includes cover)cover.tex- Cover pages only (compiled separately by Makefile)
Default: The template uses pdflatex with --shell-escape (required for minted package)
To use a different compiler (e.g., LuaLaTeX, XeLaTeX), add this magic comment at the top of your .tex file:
%!TEX program = lualatexSupported programs: pdflatex, lualatex, xelatex
GitHub Copilot suggests LaTeX commands, completes sentences, and even writes paragraphs based on your context!
To disable: Remove/comment "GitHub.copilot" from .devcontainer/devcontainer.json:
"extensions": [
// "GitHub.copilot",
]Built-in Grammarly support checks grammar and spelling in .tex files automatically.
Use Premium Account: Press Ctrl+Shift+P → Grammarly: Login / Connect your account
Check Other Files: Press Ctrl+Shift+P → Grammarly: Check text
Configure File Types: Edit .devcontainer/devcontainer.json:
"grammarly.files.include": ["*.md", "*.tex"],
"grammarly.files.exclude": ["*.bib"]To disable: Remove/comment "znck.grammarly" from extensions list
LanguageTool supports LaTeX, BibTeX, Markdown, and more - disabled by default.
To enable: Uncomment in .devcontainer/devcontainer.json:
"extensions": [
"valentjn.vscode-ltex", // Uncomment this
// "znck.grammarly", // Comment this out
]Real-time collaborative editing powered by Visual Studio Live Share.
- Click Live Share in the sidebar
- Share the link with collaborators
- Edit together in real-time!
To disable: Remove/comment "ms-vsliveshare.vsliveshare" from extensions
PDF viewer uses dark mode automatically when your OS is in dark mode.
To disable dark mode: Remove these lines from .devcontainer/devcontainer.json:
"latex-workshop.view.pdf.color.dark.pageColorsBackground":"#171717",
"latex-workshop.view.pdf.color.dark.pageColorsForeground":"#FFFFFF",
"latex-workshop.view.pdf.color.dark.backgroundColor":"#171717",Key Files:
matter.tex- Main thesis document (compile this)cover.tex- Thesis cover pagesglossary.tex- Acronyms and glossary definitionsuaThesisTemplate.sty- UA-specific style packagechapters/- Your thesis chapters and appendicesbib/- Bibliography filesfigs/- Figures and images (includes UA logos)
Edit the configuration variables in matter.tex (lines 1-24):
\def\mtitle{Your Thesis Title}
\def\msubtitle{Subtitle if any}
\def\mauthorfirst{First Name}
\def\mauthorsecond{Last Name}
\def\mdegree{Master/Doctor}
\def\msupervisors{Supervisor Name\\Prof. Title, University}
\def\mdate{\monthyeardate\today}
\def\mdocument{thesis} % or dissertation, proposalConfigure your department/school in matter.tex preamble. Supported departments:
Engineering: deti, dao, dbio, dcspt, deca, degeit, de, demac, decivil, dem Sciences: dfis, dmat, dq, dbio Humanities: dlc Other: dcm, dgeo
Or use school-wide colors: arts, sciences, education, economy, engineering, humanities, health
Syntax-highlighted code blocks using the minted package:
\begin{minted}{python}
def hello_world():
print("Hello, World!")
\end{minted}Supported languages: python, java, c, cpp, javascript, latex, bash, and 200+ more
Uses biblatex with biber backend (IEEE style):
\cite{key} % [1]
\parencite{key} % (Author, Year)
\textcite{key} % Author (Year)Add entries to bib/references.bib, bib/rfc.bib, or bib/3gpp.bib
Define acronyms in glossary.tex:
\acro{API}{Application Programming Interface}Use in text:
\ac{API} % First use: Application Programming Interface (API)
\ac{API} % Subsequent: API
\acp{API} % Plural: APIsGenerate print-friendly PDFs with reduced color pages:
make print # Creates build/matter-print.pdf and matter-print-final.pdfThe scripts/simplify-colors.sh script converts grayscale pages to true gray colorspace, significantly reducing printing costs.
Check for errors and style issues:
make lint # Lint all LaTeX files
make lint texfile=chapter1.tex # Lint specific fileLinting tools: lacheck, chktex, proselint, pandoc
For local/traditional usage without WebLaTeX:
Click here to create a repository from this template
Fork this repository to your account
mkdir mythesis
cd mythesis
git init
git commit --allow-empty -m "Initial commit"
git subtree add --prefix document https://github.com/detiuaveiro/ua-thesis-template.git master --squash
# Later, to pull updates:
git subtree pull --prefix document https://github.com/detiuaveiro/ua-thesis-template.git master --squashRequired:
- TeX Live or MacTeX (full installation recommended)
- pygments (for minted):
pip install -r requirements.txt - biber
Optional (for advanced features):
- ghostscript (for
make print,make ebook) - pandoc (for
make lint) - imagemagick and poppler (for color simplification)
Ubuntu/Debian packages:
sudo apt install texlive-full biber texlive-bibtex-extra texlive-latex-extra texlive-scienceAuto-setup on Debian/Ubuntu:
make setupEdit both .devcontainer/devcontainer.json and .vscode/settings.json:
"latex-workshop.latex.outDir": "./YourDirectoryName",
"latex-workshop.latex.magic.args": [
"-output-directory=YourDirectoryName",
"-shell-escape"
]Also update OUTDIR in Makefile if using make commands.
The project uses LaTeX Workshop with:
- Auto-build: Disabled (use Ctrl+S to compile)
- Auto-clean: Runs after build
- PDF viewer: Opens in VS Code tab
- Dark mode: Enabled by default
- Output directory:
./build/ - Shell escape: Enabled (required for minted)
- Intellisense: Auto-completion for citations and references
- Snippets: LaTeX command shortcuts
- Code Folding: Supported for sections and environments
- SyncTeX: Forward/inverse search between source and PDF
- Format on Save: Automatically format LaTeX code
For more features, see the LaTeX Workshop Wiki
- Do not delete
.devcontainer/devcontainer.json- essential for environment - Remote user: Must remain
root(do not change) - First startup: Takes ~2 minutes to install dependencies
- PDF Preview: First preview takes 20-30 seconds, then instant
- Git integration: Full git functionality (unlike Overleaf)
UA Thesis Template:
- Tomás Oliveira e Silva - Original template
- João Paulo Barraca - Improved and maintained
- Fábio Maia and Ricardo Jesus - Further improvements and workflow
WebLaTeX Environment:
- @James-Yu - LaTeX Workshop
- @sanjib-sen - WebLaTeX
- dante-ev - TeXLive Docker image
- @znck - Grammarly extension
- @thodson-hugs - GitHub Copilot integration
Contributions are welcome! Please:
- Open an issue for feature requests or bug reports
- Submit pull requests with improvements
- Help keep the template up-to-date with UA requirements



