Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
1 merge request!1New document class, biblatex and lyx support
Pipeline #10627 passed
...@@ -158,9 +158,9 @@ The utuftthesis.cls defines a new thesis class, which is based on the report ...@@ -158,9 +158,9 @@ The utuftthesis.cls defines a new thesis class, which is based on the report
\begin_layout Plain Layout \begin_layout Plain Layout
- includereferences: true / false (default:false) include reference pages - includereferences: true / false (default:false) include reference pages
when calculating the total number of pages when calculating the total number of pages
\begin_inset Newline newline \end_layout
\end_inset
\begin_layout Plain Layout
- realtimesnewroman: true / false (default:false) use Times New Roman instead - realtimesnewroman: true / false (default:false) use Times New Roman instead
of LaTeX fonts with XeLaTeX. of LaTeX fonts with XeLaTeX.
Requires the font to be installed on the system / provided in the document 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 ...@@ -168,6 +168,11 @@ The utuftthesis.cls defines a new thesis class, which is based on the report
Other fonts can be defined with Other fonts can be defined with
\backslash \backslash
setmainfont. 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 \begin_inset Newline newline
\end_inset \end_inset
......
...@@ -42,11 +42,15 @@ document appearance and hyphenation ...@@ -42,11 +42,15 @@ document appearance and hyphenation
text at the beginning of each Chapter text at the beginning of each Chapter
- includereferences: true / false (default:false) include reference - 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 - realtimesnewroman: true / false (default:false) use Times New Roman
instead of LaTeX fonts with XeLaTeX. Requires the font to be installed instead of LaTeX fonts with XeLaTeX. Requires the font to be installed
on the system / provided in the document directory. Other fonts can 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 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. pages for each package http://www.ctan.org/ and http://www.ctan.org/tex-archive/info/lshort/english/lshort.pdf.
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
\DeclareStringOption[true]{hidechapters} \DeclareStringOption[true]{hidechapters}
\DeclareStringOption[false]{includereferences} \DeclareStringOption[false]{includereferences}
\DeclareStringOption[false]{realtimesnewroman} \DeclareStringOption[false]{realtimesnewroman}
\DeclareStringOption[false]{sharelatex}
%% Process given options %% Process given options
\ProcessKeyvalOptions* \ProcessKeyvalOptions*
...@@ -59,7 +60,17 @@ ...@@ -59,7 +60,17 @@
\setotherlanguage{english} \setotherlanguage{english}
\else \else
\fi \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 \else
% JH: modified latin to UTF-8 encoding cues to make Scandinavian characters works % JH: modified latin to UTF-8 encoding cues to make Scandinavian characters works
\RequirePackage[T1]{fontenc} \RequirePackage[T1]{fontenc}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment