Coder Social home page Coder Social logo

thesis-template's Introduction

Thesis template

A simple Thesis template for the Bachelor Degree in Computer Science @Unipadova

Installation

To use this template you will need a full LaTeX configuration installed. If you don't have an already installed distribution you can read the following instructions and you'll be ready to go!

Read more

TeX Live installation

You can use whatever you want to compile your thesis, but one of the most straightforward ways is using TeX Live. It should be available on every platform you use and comes with a lot of packages and tools.

There are downloads for Windows and macOS, or instead you can install it using your favorite package manager:

sudo apt install texlive-full
sudo pacman -S texlive-most
sudo dnf install texlive-scheme-full
brew install basictex
choco install texlive

Configuration for TeX Live

This template is pretty big and complex, therefore it requires a lot of specific packages that may not be shipped with your installation of TeX Live by default.

Here's the complete list of packages that you'll need, in order to be able to successfully compile your thesis:

  • pdfx
  • xcolor
  • xmpincl
  • caption
  • changepage
  • csquotes
  • emptypage
  • epigraph
  • nextpage
  • eurosym
  • layaureo
  • listings
  • microtype
  • mparhack
  • relsize
  • quoting
  • booktabs
  • glossaries
  • glossaries-italian
  • glossaries-english
  • biber
  • biblatex
  • babel
  • babel-italian
  • cm-super
  • greek-fontenc
  • latexmk
  • fancyhdr

You can install them manually using the TeX Live Manager (good luck!), or using the CLI utility counterpart tlmgr

Just copy and paste the following command in your terminal.

sudo tlmgr update --self
sudo tlmgr update --all
sudo tlmgr install pdfx xcolor xmpincl caption changepage csquotes emptypage epigraph nextpage eurosym layaureo listings microtype mparhack relsize quoting booktabs glossaries glossaries-italian glossaries-english biber biblatex babel babel-italian cm-super greek-fontenc latexmk fancyhdr

As you can see tlmgr asks for admin rights, so you'll need to use sudo on Linux/macOS, while on Windows you have to open a command prompt instance as admin and omit the sudo at the beginning of the lines.

SVG support

SVG images are supported (and encouraged) with the following dependencies:

  • cairosvg
  • (only for draw.io diagrams) a POSIX environment due to sed usage, if you feel brave you can port the logic to Perl :)

Compilation

You tried to compile this template and the glossary isn't showing up or the bibliography is empty? Don't panic, that's pretty normal. It happens because glossary and bibliography need a special treatment during the compilation process.

Down here you find all the details to successfully compile the PDF

Read more

Latexmk

In order to get the complete PDF of your thesis, with all the rings and bells of glossaries and bibliographies you need to compile using latexmk with the following command:

latexmk thesis.tex

Latexmk is a powerful tool and allows you to do some other interesting stuff too, see latexmk -help. Most notably, if something feels wrong in the produced PDF you may want to force a full recompilation, using the -g (or the more aggressive -gg) option.

Yeah ok, cool, but I don't want to always compile from the terminal

You can tell your LaTeX editor to compile using latexmk by default.

VS Code + TeX Workshop extension

This template comes with a settings.json file, that sets latexmk as the default command to compile the PDF. Everything should work fine out of the box.

TeXStudio

Read the first 3 points of this guide.


Template structure

So, you finally managed to get your setup working and you're ready to begin to write actual stuff, but you just realized there are so many files in here and you don't even know where to start from...

First of all, these are the only files you should care about:

Thesis
├── appendix/
│   ├── appendice-a.tex
│   ├── bibliography.bib
│   ├── bibliography.tex
│   └── glossary-entries.tex
├── chapters/
│   ├── concept.tex
│   └── ...
├── config/
│   ├── packages.tex
│   ├── thesis-config.tex
│   └── variables.tex
├── images/
│   ├── unipd-logo.png
│   └── ...
├── preface/
│   ├── acknowledgements.tex
│   ├── copyright.tex
│   ├── dedication.tex
│   ├── summary.tex
│   ├── table-of-contents.tex
│   └── title-page.tex
├── structure.tex
├── printable-thesis.tex
└── thesis.tex

Yeah, well, not actually all of them. Let's break down their purpose down here

Read more
  • config/
    • variables.tex: the first file you want to look into. It defines all the variables that will be used to automatically fill some contents of the document, such as the title, your name, your professor etc. It also fills the final PDF file metadata fields.
    • thesis-config.tex: some custom commands definitions and package-specific configurations. If you feel adventurous enough you can tune them to your preferences, but the provided ones should be ok
    • packages.tex: should be pretty much self-explanatory. Just the declaration of all the packages used in the project. Nothing relevant to see here
  • preface/: all those pages you find before the actual chapters are gathered here:
    • summary.tex: in here you briefly explain what the thesis is about. You shouldn't spend much effort on this, just look at what's already in there and adapt it to your experience
    • acknowledgements.tex: should be clear by itself. Just remember to thank your professor first
    • dedication.tex: contains a small dedication with famous quote
    • title-page.tex: declares the structure of the front page. Everything is automatic and the various names, such as your name, you thesis title, your professor etc get filled from those variables you set in config/variables.tex. If your thesis has a very long title you may need to slightly adjust some spacing, in order to keep a decent layout
    • table-of-contents.tex: generates the table of contents. Nothing to see here
    • copyright.tex: it's nothing special, just that blank page with copyright
  • chapters/: the real stuff is placed here. This is the directory you will spend most of your time in, writing the main content. You will already find some example chapters in there, which are meant to show you how to use the template and to give an example of the structure of a thesis.
    Use file names that reflect the content of the chapter, avoid calling them chapter-03.tex. When creating, deleting or editing chapters remember that you have to put them in structure.tex too
  • structure.tex: this doesn't contain any actual content at all. It just sets down the structure of the document, importing other files in the right order. You may occasionally need to put some new chapters you will write, but apart from that there's not much to do here
  • thesis.tex: the root file of your thesis. As you can read above it is the only file to compile, in order to get the final PDF. Nothing more to say
  • printable-thesis.tex: yet another root file. When compiled, this one produces a version that is more fit to be printed as an elegant sweet physical copy, than to be viewed on your favorite PDF reader. It provides asymmetrical margins, chapters openings on the right and no links highlighting
  • images/: where the template will look for images, when including one
  • appendix/: contains the last chapters, such as custom appendix chapters, bibliography and glossary
    • bibliography.bib: where you put actual bibliography content
    • glossary-entries.tex: where you put your glossary definitions, following the syntax of the example terms
    • bibliography.tex: the automatic structure of bibliography. No need to change anything here

Remember not to unconditionally stick with this structure, as it's just an example. If you feel you don't need this chapter or that section, or you prefer a different order and organization of the content do as you want.

Before really starting to write actual content you should take some time to think about the structure of your chapters, filling them with the (empty) sections you will then develop, as it should help later on, avoiding to constantly rewrite and reorder stuff.

thesis-template's People

Contributors

1dotd4 avatar alberto-lazari avatar augustozanellato avatar eliapasquali avatar fedsib avatar joemerlino avatar skifire13 avatar sydernee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

thesis-template's Issues

Biber missing in dependencies list

Prerequisiti

Descrizione

Il pacchetto biber non è presente nella lista delle dipendenze per compilare il template, perché probabilmente viene fornito di default in varie installazioni di LaTeX. Senza di quello la compilazione termina in stato di errore, producendo il PDF senza la bibliografia.

Rendere il repository un template

Prerequisiti

Descrizione

GitHub ora offre la possibilità di trattare un repository come un template, permettendo agli utenti di creare a loro volta repository a partire da questo. Per farlo è sufficiente andare in Settings > General e spuntare l'opzione Template repository sotto al nome, come illustrato in figura.

Screen Shot 2022-06-27 at 23 30 24

Comportamento atteso: viene mostrato il pulsante Use this template, come in immagine:

Screen Shot 2022-06-28 at 09 25 23

Comportamento attuale: viene mostrato solamente il normale pulsante ‹› Code:

Screen Shot 2022-06-28 at 09 26 34

Bug riferimento nelle parole del glossario

Tutte le parole nel glossario presentano un riferimento a una pagina (nel mio caso, quello della bibliografia) dove la parola di glossario non viene riferita. La pagina è la stessa per ogni parola nel glossario (nel mio caso era 83).

Questo perché viene effettuato, nell'ordine:

\input{glossario.tex}
\makeglossaries
...
\glsaddall # Questo non sono nemmeno sicuro sia presente nel template, io ce l'ho a tesi finita
\printglossaries

Per risolvere, a me è bastato porre le istruzioni nel seguente ordine:

\makeglossaries
\input{glossario.tex}
...
\printglossaries

Il comando \glsaddall non è più necessario.

Frontespizio: numero di matricola e dicitura corretta

Prerequisiti

Descrizione

Una Docente ha fatto presente a noi Rappresentanti che nel frontespizio della Tesi:

  1. sotto il nome dello studente deve comparire il numero di matricola [link]
  2. la dicitura corretta è laurea (per la triennale) o laurea magistrale, non deve mai essere laurea triennale [link]

Informazioni aggiuntive

In realtà il punto 2 mi sembra già risolto, forse si può comunque indicare la dicitura corretta per commento o in un readme, perché mi è stato detto che questi errori potrebbero addirittura costare lo svolgimento della laurea stessa.

Mancata compilazione in Windows (cm-super mancante)

Prerequisiti

Descrizione

Il template non compila in Windows, a causa della mancanza del package cm-super che va installato a parte.

Passi per riprodurlo

  1. Scaricare lo zip o clonare il repository
  2. Eseguire compile-tesi.bat o aprire il file tesi.tex e compilarlo con un software apposito (tipo TeXStudio)

Comportamento atteso:

Il sorgente compila e viene generato un file di output denominato tesi.pdf

Comportamento attuale:

Il sorgente non compila e restituisce un errore ambiguo.

Ogni quanto accade:

Su windows praticamente sempre, se il package cm-super non è installato.

Versioni

Non dipende da un software specifico, ma dal sorgente.

Informazioni aggiuntive

E' possibile aggiungere il package al sorgente con la direttiva \usepackage{cm-super} oppure installarlo usando MikTeX

Glossario e Acronimi non compilano

Prerequisiti

Descrizione

Gli acronimi e il glossario non compilano. pdflatex non dà nessun errore di compilazione, makeindex nemmeno. Dopo aver cambiato makeindex in makeglossaries, non mi trova dei file (tipo .ctr o .aux). Ho risolto sistemando il compile-for-linux in questo modo.

#!/bin/bash

DIR="./output"	# modificare per scegliere il nome della cartella di destinazione
NAME="tesi"		# modificiare per scegliere il nome del file di origine (.tex)

if [ ! -d $DIR ];
  then
    mkdir $DIR;
fi

echo --------------------
echo - Inizializzazione -
echo --------------------

pdflatex -output-directory=$DIR $NAME
biber $DIR/$NAME
makeglossaries -d output tesi
# makeglossaries -s ./$NAME.ist -t ./$NAME.glg -o ./$NAME.gls ./$NAME.glo
# makeglossaries -s ./$NAME.ist -t ./$NAME.alg -o ./$NAME.acr ./$NAME.acn

# Due volte because Latex

# pdflatex -output-directory=$DIR $NAME
# biber $DIR/$NAME
# makeglossaries -d output tesi

echo -------------------------
echo - Generazione Documento -
echo -------------------------

pdflatex -output-directory=$DIR $NAME
pdflatex -output-directory=$DIR $NAME

evince output/tesi.pdf &

echo ---------------------------------
echo - Pulisco -
echo ---------------------------------

rm $DIR/*.acn $DIR/*.aux $DIR/*.bbl $DIR/*.bcf $DIR/*.glo
rm $DIR/*.ist $DIR/*.lof $DIR/*.lot $DIR/*.run.xml $DIR/*.toc
rm $DIR/*.acr $DIR/*.alg $DIR/*.glg 
# Per mantenere i log commentare la linea seguente
rm $DIR/*.blg  $DIR/*.log

echo ---------------------------- END -----------------------------

Se è utile anche a chi come me ha avuto problemi dello stesso tipo sarebbe carino sostituire lo script esistente.

Passi per riprodurlo

Versioni

Campo utilizzato solo nel caso in cui si riferiscano bug su software (ad es. nei progetti)

Informazioni aggiuntive

Qualsiasi informazione aggiuntiva, dato o configurazione utile per riprodurre il problema o agevolare l'implementazione del suggerimento (ad es. il sistema operativo usato).

Project file structure in readme

Prerequisiti

Descrizione

Essendo il progetto abbastanza grande e complesso, in numero di file, struttura e configurazioni utilizzate, potrebbe essere utile avere una descrizione della struttura del progetto nel file readme.md. Questo aiuterebbe gli studenti che prendono in mano per la prima volta il template, senza sapere bene da che parte cominciare, spiegando l'utilizzo base del template e la funzione dei vari file e directory.

Si potrebbe optare per una descrizione visiva ad albero, come quella adottata dal repo https://github.com/FIUP/pandoc-thesis-template

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.