Giter Site home page Giter Site logo

pseudomanifold / latex-mimosis Goto Github PK

View Code? Open in Web Editor NEW
1.1K 23.0 124.0 1.44 MB

A minimal & modern LaTeX template for your (bachelor's | master's | doctoral) thesis

License: MIT License

TeX 98.00% Makefile 0.16% Perl 1.84%
latex template modern-template latex-template latex-class

latex-mimosis's Introduction

latex-mimosis: A minimal & modern template for your thesis

This repository contains a minimal & modern LaTeX template for dissertations and other university documents.

For the impatient or curious: this is what the template looks like. You may also want to take a look at my Ph.D. dissertation, which uses a predecessor of this template.

Users

Before going over the details of this template, why not look at how it looks in practice? The following documents have been typeset with this template (or a slightly modified variant of it):

Please open a pull request if you want your document to be listed here, and consider acknowledging this repository.

Advantages

This template aims to be…

  • clean: no LaTeX trickery
  • minimal: no unnecessary adjustments and decorations
  • modern: typographically pleasing

It is specifically suited for the European education system because it uses A4 paper size by default—this can be easily adjusted to fit your personal needs, though (see below).

The class is based on KOMA-script, so it should be flexible enough to suit virtually any purpose.

How to use

If you are using Overleaf, download latex-mimosis in the gallery. If you want to use the template locally, follow these steps:

  • Clone this repository
  • Copy the file mimosis.cls into your document directory
  • Add \documentclass{mimosis} to your document preamble
  • Optionally copy the file Thesis.tex and the files in Sources as a starting point
  • Use latexmk to build the document
  • Write a nice thesis in LaTeX

While you can customise everything to your heart's desire, you should probably start with changing the fonts. I strongly recommend to use xelatex or lualatex to build the document, as this will make font selection almost trivial. Essentially, you only require these three commands (I took the liberty to specify some example fonts):

\setmainfont{Baskerville}
\setsansfont{IBM Plex Sans}
\setmonofont{IBM Plex Mono}

Put these commands in your main file such as Thesis.tex and be sure to remove this code block here:

\ifxetexorluatex
  % ...
\else
  % ...
\fi

Note that the document will work fine nevertheless, but some people dislike the default fonts or do not have them installed.

Overleaf users: If you are using Overleaf to build your thesis, you are restricted by their choice of fonts. Please read this document for more information about which fonts are available.

How to customise

The template is based on the excellent KOMA-script class. You can thus change the appearance of many things quite easily. For example, if you want the thesis to use the letter paper format, just add

\KOMAoptions{paper=letter}

in the preamble of the document and recompile.

Example

The repository comes with an example file called Thesis.tex. Please take a look at this file in order for more detailed instructions about how to use the class.

It is recommended to use latexmk to build your LaTeX documents. Your distribution might already have this command. If so, you can use

latexmk

in the main directory of this repository in order to build the example file.

Required packages for the class

The template uses various LaTeX packages that you should install using your favourite LaTeX distribution. Some distributions already do this automatically when you compile the document for the first time. Others require manual updates. Please refer to the documentation of your LaTeX distribution for more details.

Here is a list of packages that you need (I am using the package name as specified on CTAN):

Required packages for the example document

Typesetting the example document requires an additional set of packages. Feel free to remove them, though—they are only used for showcasing how a real document might look like.

For pdfTeX users:

For LuaTeX or XeTeX users:

  • The EB Garamond font
  • The Source Code Pro font

If you installed the packages above, everything should work automatically.

License

The template uses the MIT license. Please see the file LICENSE.md in the main directory of the repository for more details.

Known issues

The superscript citation style is not compatible with all citation styles. For example, to use the citation with chem-angew, please use an adjusted \supercite command such as this one:

\DeclareCiteCommand{\supercite}[\mkbibsuperscript]
{\bibopenbracket%
	\usebibmacro{cite:init}%
	\let\multicitedelim=\supercitedelim
	\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
	\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}%
	\usebibmacro{postnote}%
	\bibclosebracket%
}

Thanks to Carlo Botha for this contribution!

Extensions

Table of contents per chapter

If you want a small table of contents for each chapter, update mimosis.cls as follows:

\usepackage[automark,headsepline,plainheadsepline]{scrlayer-scrpage}
\pagestyle{scrheadings}
\automark[section]{chapter}

\lehead*{\headmark}
\cehead{}
\rehead{\headmark}

\lohead{\headmark}
\cohead{}
\rohead*{\headmark}

\newpairofpagestyles[scrheadings]{chapter}{
	\KOMAoptions{headsepline=false,plainheadsepline=false}%
	\ihead*{}%
	\ohead*{}%
}

\newpairofpagestyles[scrheadings]{part}{
	\KOMAoptions{headsepline=false,plainheadsepline=false}%
	\ihead*{}%
	\ohead*{}%
}

\renewcommand*\chapterpagestyle{chapter}

\renewcommand*\partpagestyle{part}

This extension was contributed by Nikos Antoniadis in issue 16. If you want to add this as proper extension or configurable parameter, please let me know!

Frequently asked questions (FAQ)

  1. Does the template support bold fonts?

    Yes. First of all, you can change the default font (my personal suggestion is to use the fontspec package and xelatex or lualatex; then, changing your font is as easy as using \setmainfont). Second, note that in older TeX distributions, the font ‘EB Garamond’, shipped in the ebgaramond package, does not ship with a bold variant. Consider updating your TeX distribution or manually replacing the font. This is not an issue with this package—please see issue #10 for more information.

  2. How do I use siunitx?

    The options of this package were recently updated. The setup has now been removed to simplify the package. For the new version of the package, the following options are suggested by Holger Dell:

    \sisetup{%
      mode                = match,
      propagate-math-font = true,
      reset-math-version  = false,
      reset-text-family   = false,
      reset-text-series   = false,
      reset-text-shape    = false,
      text-family-to-math = true,
      text-series-to-math = true,
    }

    If this does not work, you can also fall back to the older settings:

    \sisetup{%
      detect-all    = true,
      detect-family = true,
      detect-mode   = true,
      detect-shape  = true,
      detect-weight = true,
    }
  3. I have a font with special support for ordinal numbers. How can I use them?

    The easiest way is to override the definitions and specify the required font features:

    \renewcommand{\st}{{\addfontfeatures{VerticalPosition=Ordinal}\textup{st}}\xspace}
    \renewcommand{\rd}{{\addfontfeatures{VerticalPosition=Ordinal}\textup{rd}}\xspace}
    \renewcommand{\nd}{{\addfontfeatures{VerticalPosition=Ordinal}\textup{nd}}\xspace}
    \renewcommand{\th}{{\addfontfeatures{VerticalPosition=Ordinal}\textup{th}}\xspace}

    Notice that this will not work for most fonts. If you are unsure, just leave the default values in place.

  4. I want to use standard TeX fonts, but they look weird. (See issue #29 for more details)

    This could be related to the encoding if you are using pdflatex. Either consider using a better font, such as lmodern (to be found in the package with the same name), or use a different encoding:

    \usepackage[OT1]{fontenc}

    This might cause problems when copying text from the template, though. The better solution is to use lmodern.

  5. How can I ensure that the font for equations matches the main font?

    This depends a lot on your font selection. If you are using xelatex, consider using the mathspec package. Else, check that a package is available that provides maths support. For EB Garamond, the unicode-math package can be used, for instance. (See issue #33 for a brief discussion)

  6. How can I remove the indent in the second line (and all following ones) of Table/Figure captions?

    In mimosis.cls change \captionsetup{subrefformat=parens} to:

    \captionsetup{subrefformat=parens,format=plain}

    For details see here.

  7. How can I update the font size of citations?

    Check out bibliography-mimosis.tex and update or remove the \renewcommand*{\citesetup} block to your preference.

  8. I do not like some of the mathematical symbols. How can I change them?

    You should be using fontspec and see whether your selected font supports StylisticSet. See garamond-math for an example.

Contributing

If you require additional features, find some bugs, or just have some generic inquiries, please just open an issue in this repository.

Testimonials

I like it!

— My mum

Garish and overproduced.

— Some rando on social media

Nice and clean!

utopcell on Hacker News

A dream to work with! A beautiful template that just works.

Leslie O'Bray (who was totally not coerced into writing something nice about this template)

Contributors

Here is a list of contributors:

latex-mimosis's People

Contributors

alobrv avatar angriman avatar antcc avatar cauliyang avatar drummyfish avatar f-graf avatar giuscri avatar holgerdell avatar jannisborn avatar pseudomanifold avatar toooonyy avatar

Stargazers

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

Watchers

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

latex-mimosis's Issues

Support `letter` format

One of the commenters at HN asked about support the letter format as well. I will have to look into this because I am not sure how KOMAscript likes it.

Language Support

Hi there,
I am trying to use your very nice template for my Bachelors Thesis, that unfortunately must be in German. I tried to change the language by adding \selectlanguage{ngerman} or \usepackage[ngerman]{babel} to the top of Thesis.tex but neither of those was able to change the title of the table of content. (Also they didn't translate abstract and listings keywords but I'm not sure if babel usually does this). Any idea why this happens?
Best regards and thank you very much for your help
Moritz

textbf not working in the basic example

Hi,

Thanks for a great template!

But \textbf doesn't produce a bold text when compiled with pdflatex.
I guess it is related to the fact that package ebgaramond by design does not include a bold weight (source ink).
How did you circumvent this?

Conflict with pdfcomment

Hi

I tried importing pdfcomment to create tooltips for my acronyms, but it conflicts with one of the packages loaded by mimosis. I could reproduce the issue on a fresh clone of latex-mimosis by importing pdfcomment anywhere after hyperref

! LaTeX Error: Command \st already defined.
               Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.98     \newcommand*\st{}

I am quite a novice to latex, so I am struggling to get which package is the culprit but the \st command is defined in soul.

Environment:

  • Mac OS
  • lualatex 1.16.0
  • pdfcomment 2.4a

LaTeX Warning: Unused global option(s): [paper=a4,pagesize].

LaTeX returns this warning when compiling the base template you provided, without having made any changes to it.

Setting the commands it is asking for with \documentclass[paper=a4,pagesize]{mimosis} does make the warning go away.

What could be the reason for which this warning is even being displayed?

I am trying to compile it from Overleaf after cloning this repo into a blank project.

Use OpenType ordinals

I noticed you are using ordinals with \textsuperscript. I think the special ordinals for Minion Pro look better:

screenshot-20201028-201600

Notice how the top of the ordinal text doesn't go too high in the latter examples. The code I used was

Here is the 1\textsuperscript{\textup{st}} and 1{\addfontfeatures{VerticalPosition=Ordinal}st}.
Here is the 2\textsuperscript{\textup{nd}} and 2{\addfontfeatures{VerticalPosition=Ordinal}nd}.

Obviously this may or may not work with other fonts and this doesn't work at all with PDFTeX so it might not be the best addition to the template but I just wanted to let you know.

Citation font size

I'm relatively new to LaTeX and I'm therefore not sure if my question is related specifically to this template or to LaTeX in general, but I hope you can point me in the right direction :)

When I cite a source using the \parencite command, the inserted reference is rendered in a slightly smaller font than the rest of the document.
How can I get these citations to match the font size of the rest of the document?

Broken July 4ᵗʰ ordinal

July 4ᵗʰ isn't correctly typeset (screenshot from the repository's Latex.pdf). I believe something redefines \th.

20211103_200045

Either way, and as an alternative to the FAQ entry, I believe the best option nowadays is to simply input it in Unicode in the source .tex. I expect good fonts to be supporting ordinal numbers. I've proposed that solution on the TeX StackExchange.

T1 encoding in pdfLaTeX makes default sans-serif too wide

Maybe this is out of the usage expected from this template, but if the titles are modified to use sans-serif font instead of small caps serif, T1 encoding makes the TeX default cmss font appear oddly wide and unbalanced. Titles appear normal when using the default OT1 encoding.

image
image

Even using the provided title style (small caps with serif), the default serif cmr produces different results, with OT1 encoding looking a bit better.

image
image

This issue only appear to affect the CM family, but given that it is a fairly popular font choice, perhaps it is be better to use \RequirePackage[OT1]{fontenc} or just leave it unspecified if there is no downside to it?

Useful features (MiniToc and header)

Firstly, I'd like to thank you for your nice template.

As I've spend a lot of time to find these, useful for me, features I'd like to share my findings:

So, to show MiniToc in every chapter, you can use the solution from here

Adding a header in pages, excluding the beginning of each chapter, the solution taken from here, the header part in mimosis.cls should be changed as:

\usepackage[automark,headsepline,plainheadsepline]{scrlayer-scrpage}
\pagestyle{scrheadings}
\automark[section]{chapter}

\lehead*{\headmark}
\cehead{}
\rehead{\headmark}

\lohead{\headmark}
\cohead{}
\rohead*{\headmark}

\newpairofpagestyles[scrheadings]{chapter}{%
	\KOMAoptions{headsepline=false,plainheadsepline=false}%
	\ihead*{}%
	\ohead*{}%
}

\newpairofpagestyles[scrheadings]{part}{%
	\KOMAoptions{headsepline=false,plainheadsepline=false}%
	\ihead*{}%
	\ohead*{}%
}

\renewcommand*\chapterpagestyle{chapter}

\renewcommand*\partpagestyle{part}

Maybe you can create an option in your template if anyone would like to use these styles.

Figures

How did you create these figures?

image image image

Also, thank you for sharing the template. It helps me a lot.

BibTeX to Biber suggestion

Why not change the template's BibLaTeX backend to Biber?

It seems like Biber is more reliable when paired with BibLaTeX, and is also being actively developed.

I switched the template's setting to Biber a few days ago and it has been working great so far.

License

Is it be possible for me to use this for my Master thesis. Would you be willing to add an open source license if there isn't one already.

number 1 style not like the letter I

I am having a hard time getting the number 1 in a style similar to the screenshot (all the thesis provided managed to get one). I would be very grateful for a tip!

numone

Overleaf - Setup (font)

Great job on the template.

Any things I need to consider font wise when using overleaf. Does it support minion pro or do I need to purchase that font separately?

side margin notes, figures, table support?

Hello --- I'm wondering if you know the best way to incorporate notes, figures, and tables in the margin, as is common in the Tufte books? A separately existing implementation is the caesar_book.cls. You can see an example here.

Thanks, take care

Glossaries will not show when using 'standalone' package

Description

In the present configuration, the glossaries and acronyms will not show if one uses the standalone package with mimosis. I, for instance, use the standalone package to compile external tikz figures, it is a handy package if one wants to reuse the figures separately or in other documents with different typesetting options.

However, the automake option of the glossaries package does not work together with the standalone package, so in order to use both, it is necessary to remove the option.

Perhaps it should be removed in the template, with a comment that one can add this option manually, or the other way around, adding a comment saying, that one should remove the option when using standalone

I found that this option clash has not been documented somewhere, so I considered it worthy opening an issue for.

Non working example :

\documentclass{scrbook}
\usepackage[
  acronym,
  automake,
  nogroupskip,
  nopostdot,
  nonumberlist,
  toc,
]{glossaries}
\usepackage{standalone}
\makeglossaries
\newacronym[description={Resolution Bandwidth}]{RBW}{RBW}{resolution bandwidth}
\newglossaryentry{sample}{name={sample},description={an example}}
\begin{document}
\frontmatter
\tableofcontents
\mainmatter%
\chapter{a chapter}
A \gls{sample}.

\glsaddall%
\printglossary[type=\acronymtype]
\printglossary
\end{document}

Working :

\documentclass{scrbook}
\usepackage[
  acronym,
  % automake,
  nogroupskip,
  nopostdot,
  nonumberlist,
  toc,
]{glossaries}
\usepackage{standalone}
\makeglossaries
\newacronym[description={Resolution Bandwidth}]{RBW}{RBW}{resolution bandwidth}
\newglossaryentry{sample}{name={sample},description={an example}}
\begin{document}
\frontmatter
\tableofcontents
\mainmatter%
\chapter{a chapter}
A \gls{sample}.

\glsaddall%
\printglossary[type=\acronymtype]
\printglossary
\end{document}

Matching math font?

As it stands, the template pairs the EB Garamond font for text with the Latin Modern Math font for math. Shouldn't it use the Garamond Math font for a better match? Though I'm unsure of its typographic quality.

That can be achieved with the unicode-math package as follows:

\usepackage{unicode-math}
\setmathfont{Garamond Math}

A comprehensive list of OpenType math fonts (with rendered math) is available here.

a good "Definition" format/style

As shown in the image, you utilize a really nice Definition format out here;
right now , i'm using your template with Emacs and org-mode, could you provide the latex code that produces this result?

definition

Discuss behaviour of bold fonts

This should either become an entry for the FAQ, or I should just change the default font. Would also be a nice addition to the documentation.

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.