SJTUBeamer: a university Beamer template built on ctexbeamer and l3build
上海交通大学 Beamer 模版 | Beamer template for Shanghai Jiao Tong University
At a glance
- What is it?
- SJTUBeamer is the unofficial Beamer template of Shanghai Jiao Tong University, shipping a sjtubeamer package, a sample paper typesetting document, and theme variants for 16:9 slides. It compiles with XeLaTeX and its two zip packages target online editors, but the visual identity assets carry separate university copyright terms.
- Who is it for?
- SJTUBeamer suits students and staff at Shanghai Jiao Tong University who need slides that look like the official ones, and it suits anyone comfortable editing a LaTeX document that ships with its own theme package and manual.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 158 days ago.
- What is it written in?
- Mainly TeX, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 25, 2026, and from our analysis. They are not legal advice.
Editorial analysis
Two things live in the repository and they do not share a licence
The repository holds more than a theme. It contains the sjtubeamer LaTeX package itself, written as a set of .dtx sources, and a separate example document that demonstrates how the template is used. The main.tex in the root is that example document, a piece titled around typesetting a paper with LaTeX, and the quick start guidance tells ordinary users to replace its contents with their own.
That split shows up in the licensing, and it is the part of the project that deserves the most attention from anyone outside the university. The sjtubeamer package is released under Apache-2.0. The example document is under CC-BY-SA 4.0. The sjtuvi and sjtucover libraries, together with the logos and images they ship, are copyright held by Shanghai Jiao Tong University, and the documentation states that units and individuals inside the university who use the visual identity system for commercial purposes have to apply to the school for permission, while outside parties may not make or use items carrying that identity system without permission.
In other words, the code is permissively licensed and the branding is not. A deck for a conference talk can reuse the package, but the same deck carrying the university marks becomes a different legal question.
The project also states that it is unofficial, which is a description of its status rather than a disclaimer about the template quality.
ctexbeamer and XeLaTeX are the entry requirements
The template is built on the ctexbeamer document class, and the engine requirement is spelled out in the minimal example. The first line of the source file is a magic comment that changes the compiler.
% !TeX program = xelatex
\documentclass[
]{ctexbeamer}
\mode<presentation>
\usetheme[min]{sjtubeamer}The note attached to that example explains the rule: the magic comment on the first line switches the compiler to XeLaTeX, and it can be omitted when the beamer document class is used without Chinese text, in which case the default pdfLaTeX compiler is used instead. That is the whole configuration story for the engine.
The class options are also visible. A draft option turns on draft mode, aspectratio=169 selects the 16:9 ratio, and a fontset=ubuntu option is marked as needed on the Prism platform. The example additionally shows a commented tikzexternalize line for caching tikz images, with a note that the compile options have to add -shell-escape when that line is enabled.
Bibliography is handled with biblatex rather than plain LaTeX, and the configuration in the example names the biber backend and the gb7714-2015 style, which is the Chinese bibliography standard, with a resource file named thesis.bib.
Theme options are keyword lists passed to \usetheme
There is no configuration file and no separate theme picker. Everything is driven by a comma separated keyword list handed to the sjtubeamer theme, and the example lists the available axes in its comments.
The title page style is selected with maxplus, max, or min. The main accent colour is red or blue. Light and dark switch the mode. The logo position is topright or bottomright. Because the list is comma separated, several options can be applied at once, which is how the published examples are named, such as the max,red and maxplus,blue variants of the sample document.
The outer theme is chosen separately, and the example prints the available keywords in a small table of sidebar styles. They are grouped in threes per row: miniframes, infolines, and sidebar for one style family, then default, smoothbars, and split, then shadow, tree, and smoothtree. That table is the entire documented surface for the navigation layout, and it is what makes the difference between a talk with a flat section bar and one with a tree of subsections.
The generated style files at the repository root reflect how the theme is factored. There are separate beamercolorthemesjtubeamer.sty, beamerfontthemesjtubeamer.sty, beamerinnerthemesjtubeamer.sty, beamerouterthemesjtubeamer.sty, and beamerthemesjtubeamer.sty files, plus sjtucover.sty and sjtuvi.sty for the cover and the visual identity assets. The outer theme, the inner theme, the colour theme and the font theme are independent pieces, which is why the keyword list reads the way it does.
Getting the template onto Prism, TeXPage, Overleaf or a local TeXLive
The installation guidance splits into online editors and a local setup, and the online route is the shorter one for most students. There are entries in the TeXPage template library and the Overleaf template library, and either can be used directly. The alternative is to upload the files yourself, either from the Code download zip in the repository, from the Source Code (zip) asset of a release, or from the sjtubeamer-online.zip minimal dependency package attached to the release.
In the settings of TeXPage or Overleaf the compiler has to be set to XeLaTeX, and on the Prism platform the fontset=ubuntu font option has to be added. Those are the two settings that decide whether the first compile succeeds.
For a local setup the requirements are a TeXLive installation and the template files, which can arrive through a git clone of the repository or of the mirror at mirror.sjtu.edu.cn, or through one of the zip downloads. The compile step is a single latexmk invocation with the xelatex engine on main.tex, and the documentation also points VSCode users at the LaTeX Workshop recipe named latexmk (latexmkrc), which picks up the latexmkrc file kept in the repository root.
The repository root holds a latexmkrc and a latexindent.yaml, plus a Makefile with separate targets for users and for developers. The user targets build the document and install the package into TeX Live or MacTeX.
build: prepare
latexmk main.tex $(LATEXMK_ARGS)
cp build/main.pdf .install:
cd src && l3build installA release ships manuals, four theme variants and two zip packages
A stable release is more than a style file, and the documentation enumerates what a release contains. There is a quick start PDF with its LaTeX source in the src/doc directory, a user manual PDF, and a developer guide PDF that explains the implementation details and the compilation method behind the template. The user manual carries the strongest recommendation in the whole README, to read it once before using the template.
Four example PDFs show the same sample document rendered in different themes, a max,red variant, a maxplus,blue variant, a maxplus,red variant, and a min,red variant, plus a document that gathers the cover and back cover of every colour theme.
Then there are the two archives that determine how you install. sjtubeamer-ctan.zip contains all documentation and styles, which is the package aimed at a full local TeX Live installation. sjtubeamer-online.zip contains the plugins and the minimal dependencies, and is the one built for online platforms where the dependency set has to stay small. The source code of the template is included in the release as well.
The release history shows how fast the project moves. v3.2.0 was published on 2026-05-20, v3.1.0 on 2024-11-01, and v3.0.0 on 2022-11-27, and the last push to the repository was on 2026-05-20. The gap between v3.0.0 and v3.1.0 is close to two years, and v3.2.0 followed about eighteen months after that, so the numbering advances when a maintainer finds the time rather than on a schedule.
One practical note is easy to miss. The documentation asks that the user manual be opened in Chrome or Adobe Acrobat, to avoid display problems caused by PDF compatibility.
Editing .dtx and letting l3build regenerate the .sty files
The development side of the project is documented almost as carefully as the user side, and the constraint it imposes is strict: all modifications to the template are to be made in the .dtx files, and the sty files are then generated with l3build. The generated .sty files that sit in the repository root are outputs, and editing them by hand is not the supported path.
The workflow runs in a fixed order. You edit the .dtx sources, run make generate to build the sty files and copy the resources into the root, update main.tex and run make build to see the effect of your change, then update the development documentation, run make build-dev to compile all the development documents, and run the unit tests. Running make format-dev to format the files is optional. Opening a pull request finishes the loop.
The Makefile separates these into user commands and developer commands. The user side has build, format, install, and clean, and the developer side has clean-dev, build-cover, build-dev, build-online, build-test-variants, build-all-variants, and generate. Several of those developer targets call scripts in the .github/ci directory rather than doing the work inline, which is where the continuous integration and the multi variant test builds live.
The build arguments are set once at the top of the Makefile, and the latexmk invocation runs with -halt-on-error, -time, -xelatex, an output directory of build, and -shell-escape. That last flag is what lets the tikzexternalize caching described in the example work.
The repository also keeps a contents directory, a contrib directory, a figures directory, a vi directory, and a build directory, and the file manifest is documented separately in src/MANIFEST.md. Questions from users go to GitHub Discussions, bugs and feature proposals to GitHub Issues, and new contributors are invited to add themselves to the Developer section of the developer guide.
Where the template stops being a good fit
There are three cases where choosing SJTUBeamer costs more than it gives.
The first is the branding. The sjtuvi and sjtucover libraries and their attached logos and images belong to Shanghai Jiao Tong University, and the documentation is explicit that the visual identity system is a permissioned thing rather than an open asset. A speaker from another institution, or a company running a conference with the template, has to read the permission agreement linked from the university site before using anything that carries the marks. The package licence says nothing about that, which is exactly why the split between the two licences is easy to miss.
The second is the dependency weight. The ctexbeamer class plus a theme package plus a local TeX Live is a heavier setup than a plain beamer document, and the online path depends on the platform tolerating the sjtubeamer-online.zip dependency set. The documentation also warns that PDFs should be viewed in Chrome or Adobe Acrobat, which is a small hint that the output is not universally well behaved.
The third is the version rhythm. v3.1.0 and v3.0.0 arrived years apart, and the last push was on 2026-05-20. A template whose stable releases arrive every year or two is a poor fit for a conference series that wants a predictable, unchanged look across years of talks, and for anyone who expects upstream bug fixes to arrive on a schedule.
None of this makes the template bad. It makes it a specific regional template with an unusually well documented build pipeline, which is a good trade for its intended audience and a poor one outside it.
Editorial conclusion
SJTUBeamer suits students and staff at Shanghai Jiao Tong University who need slides that look like the official ones, and it suits anyone comfortable editing a LaTeX document that ships with its own theme package and manual. It does not suit a talk outside the university, because the sjtuvi and sjtucover assets and their logos are held by the university and their use is governed by a separate permission agreement, nor does it suit someone who wants a maintained general Beamer theme. Verify first that your editor is set to XeLaTeX, that the fontset=ubuntu option is only needed on Prism, and that you have read sjtubeamer.pdf before shipping a deck that carries the university identity.
Frequently asked questions
How do I install SJTUBeamer?
Use the TeXPage or Overleaf template library entries, or upload the files yourself from the repository zip, the release Source Code (zip), or the sjtubeamer-online.zip package. For local use, install TeXLive, clone the repository, and compile main.tex with latexmk and the xelatex engine.
Which compiler does SJTUBeamer need?
XeLaTeX. The minimal example starts with the magic comment that switches the compiler, and the online editors have to be set to XeLaTeX as well. The magic comment can be left out when no Chinese text is used, in which case pdfLaTeX is the default.
How do I change the colours and the title page of the SJTUBeamer theme?
Through the keyword list passed to the theme. The title page style is maxplus, max, or min, the accent colour is red or blue, light and dark switch the mode, and the logo position is topright or bottomright, with several options combined in one comma separated list.
What licence is SJTUBeamer under?
The sjtubeamer package is Apache-2.0 and the example document is CC-BY-SA 4.0, and the licence is stated at the top of each file. The sjtuvi and sjtucover libraries and their logos and images are held by Shanghai Jiao Tong University and are covered by a separate permission agreement.
How do I contribute a change to the SJTUBeamer template?
Make the change in the .dtx files, then run make generate to produce the sty files, use make build to preview it, and use make build-dev to compile the development documents and run the tests. Pull requests are welcome, and there is a GitHub Discussions area for usage questions.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/sjtug-sjtubeamer)Was this useful?