Commit 16442135 authored by Jari-Matti Mäkelä's avatar Jari-Matti Mäkelä
Browse files

Add support for locally provided fonts in sharelatex

parent 424e9735
Pipeline #10627 passed with stages
in 5 minutes and 10 seconds
......@@ -158,9 +158,9 @@ The utuftthesis.cls defines a new thesis class, which is based on the report
\begin_layout Plain Layout
- includereferences: true / false (default:false) include reference pages
when calculating the total number of pages
\begin_inset Newline newline
\end_inset
\end_layout
\begin_layout Plain Layout
- realtimesnewroman: true / false (default:false) use Times New Roman instead
of LaTeX fonts with XeLaTeX.
Requires the font to be installed on the system / provided in the document
......@@ -168,6 +168,11 @@ The utuftthesis.cls defines a new thesis class, which is based on the report
Other fonts can be defined with
\backslash
setmainfont.
\end_layout
\begin_layout Plain Layout
- sharelatex: true / false (default: false) don't attempt to use (c) system
fonts, instead read them from the project repository
\begin_inset Newline newline
\end_inset
......
......@@ -42,11 +42,15 @@ document appearance and hyphenation
text at the beginning of each Chapter
- includereferences: true / false (default:false) include reference
pages when calculating the total number of pages\\
pages when calculating the total number of pages
- realtimesnewroman: true / false (default:false) use Times New Roman
instead of LaTeX fonts with XeLaTeX. Requires the font to be installed
on the system / provided in the document directory. Other fonts can
be defined with \textbackslash setmainfont.\\
be defined with \textbackslash setmainfont.
- sharelatex: true / false (default: false) don't attempt to use (c)
system fonts, instead read them from the project repository\\
\\
Traditionally the best places to learn (La)TeX are probably the manual
pages for each package http://www.ctan.org/ and http://www.ctan.org/tex-archive/info/lshort/english/lshort.pdf.
......
......@@ -28,6 +28,7 @@
\DeclareStringOption[true]{hidechapters}
\DeclareStringOption[false]{includereferences}
\DeclareStringOption[false]{realtimesnewroman}
\DeclareStringOption[false]{sharelatex}
%% Process given options
\ProcessKeyvalOptions*
......@@ -59,7 +60,17 @@
\setotherlanguage{english}
\else
\fi
\ifthenelse{\equal{\utuftthesis@realtimesnewroman}{true}}{\setmainfont{Times New Roman}}{}
\ifthenelse{\equal{\utuftthesis@realtimesnewroman}{true}}{
\ifthenelse{\equal{\utuftthesis@sharelatex}{true}}{
\setmainfont[
BoldFont=timesbd.ttf,
ItalicFont=timesi.ttf,
BoldItalicFont=timesbi.ttf
]{times.ttf}
}{
\setmainfont{Times New Roman}
}
}{}
\else
% JH: modified latin to UTF-8 encoding cues to make Scandinavian characters works
\RequirePackage[T1]{fontenc}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment