Installation

To compile documents using fduthesis, you need a complete and modern TeX distribution. Because the template relies on recent LaTeX3 features and Unicode math fonts, legacy distributions (older than TeX Live 2020) are not supported.

We strongly recommend installing the latest version of TeX Live (Windows/Linux) or MacTeX (macOS).

⚠️ Engine Restriction: The template strictly requires XeLaTeX or LuaLaTeX. The older pdfTeX engine is explicitly disabled as it cannot natively handle modern UTF-8 Chinese typesetting and OpenType fonts.


fduthesis is officially published on CTAN (The Comprehensive TeX Archive Network). If you have installed a standard, up-to-date TeX Live or MiKTeX distribution, fduthesis is likely already available on your machine.

Verifying Installation

Open your terminal or command prompt and run:

kpsewhich fduthesis.cls
If this command returns a file path, the template is installed. If it returns nothing, you need to install or update it.

Installing via TeX Live Manager (tlmgr)

Run the following command in your terminal (you may need sudo on macOS/Linux or an Administrator prompt on Windows):

tlmgr install fduthesis

To avoid compilation errors caused by outdated dependencies (like l3kernel or biblatex-gb7714-2015), we highly recommend updating your entire distribution before starting your thesis:

tlmgr update --all


Method 2: Cloud Environment (Overleaf)

If you prefer not to manage a local TeX environment, or if you need to collaborate with your supervisor in real-time, Overleaf is the best option. We maintain an official, up-to-date template on the Overleaf gallery.

Open fduthesis on Overleaf

Best Practices for Overleaf:

  1. Engine Check: Click the "Menu" button in the top-left corner of Overleaf and ensure the "Compiler" is set to XeLaTeX.
  2. Compilation Timeouts: Free Overleaf accounts have a 1-minute compilation timeout. Large theses with high-resolution images may exceed this. If you hit timeouts, consider using draft mode (explained in the Configuration guide) or migrating to a local installation.

Method 3: Manual Installation from CTAN

If you are on a restricted network or prefer manual package management, you can install the pre-compiled TDS (TeX Directory Structure) archive.

  1. Download the fduthesis.tds.zip archive from the CTAN package page.
  2. Locate your local texmf directory:
  3. Linux / macOS: ~/texmf/
  4. Windows: C:\Users\<YourUsername>\texmf\
  5. Extract the contents of the ZIP file directly into the texmf directory.
  6. Update the TeX filename database so the compiler can index the new files:
    mktexlsr

Method 4: Development Version (From GitHub)

If you want to test unreleased features, contribute to the project, or fix a bug, you can build the template directly from the source code using the l3build system.

Prerequisites

Ensure git and a full TeX Live installation are available in your system path.

Build Steps

  1. Clone the repository:

    git clone https://github.com/stone-zeng/fduthesis.git
    cd fduthesis

  2. Run the automated installation script for your OS:

  3. Linux / macOS:

    ./install-unix.sh

  4. Windows:

    install-win.bat

What the script does:

These scripts run l3build unpack to extract the .cls, .def, and .sty files from the documented source (.dtx). It then generates a blank thesis/ directory populated with a starter template. You can begin writing immediately inside this newly created folder.


Troubleshooting Installation

Error: ! LaTeX Error: File 'fduthesis.cls' not found.

  • Cause: The package is not installed, or mktexlsr was not run after manual installation.
  • Fix: Use tlmgr install fduthesis or check your local texmf paths.

Error: Font missing errors (e.g., Fandol, XITS, Libertinus).

  • Cause: fduthesis relies on specific open-source fonts depending on your OS. If your TeX distribution is a "basic" or "minimal" install, these fonts are missing.
  • Fix: Run tlmgr install fandol xits libertinus-fonts.