Add support for bilingual text

This may be working as-is for greek and bilingual (greek & english)
text, but it's actually work in progress.  I'll come back to it.
parent dcaf6629
...@@ -40,4 +40,6 @@ Thumbs.db* ...@@ -40,4 +40,6 @@ Thumbs.db*
# The example PDF file # The example PDF file
/test.pdf /thesis.pdf
/_minted-*/
.PHONY: FORCE default clean distclean .PHONY: FORCE default clean distclean
FILE=test FILE=thesis
export SHELL=/bin/bash export SHELL=/bin/bash
export TEXINPUTS:=.:./Styles//:${TEXINPUTS} export TEXINPUTS:=.:./Styles//:${TEXINPUTS}
...@@ -8,8 +8,10 @@ export BSTINPUTS:=.:./Styles//:${BSTINPUTS} ...@@ -8,8 +8,10 @@ export BSTINPUTS:=.:./Styles//:${BSTINPUTS}
default: $(FILE).pdf default: $(FILE).pdf
# Using -shell-escape because of the package "minted" for typesetting
# listings of code. Remove, if not needed.
%.pdf: %.tex FORCE %.pdf: %.tex FORCE
latexmk -pdf -f -e '$$pdflatex=q/xelatex %O %S/' $< latexmk -shell-escape -pdf -f -e '$$pdflatex=q/xelatex %O %S/' $<
clean: clean:
$(RM) *.{dvi,aux,log,toc,lof,lol,lot,dlog,bbl,blg,idx,out,tpt,svn} $(RM) *.{dvi,aux,log,toc,lof,lol,lot,dlog,bbl,blg,idx,out,tpt,svn}
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
% LaTeX file : softlab-thesis.cls % LaTeX file : softlab-thesis.cls
% Written by : Nikolaos S. Papaspyrou % Written by : Nikolaos S. Papaspyrou
% Date : October 17, 2002 % Date : October 17, 2002
% Revised : December 17, 2008 % Revised : August 26, 2019
% %
% Description : A uniform template for diploma projects and doctoral % Description : A uniform template for diploma projects, master's and
% dissertations at the Software Engineering Laboratory, % doctoral dissertations at the Software Engineering Laboratory,
% School of Electrical and Computer Engineering, % School of Electrical and Computer Engineering,
% National Technical University of Athens. % National Technical University of Athens.
% %
% Notes : This package is based on `thesis.cls', written by % Notes : This package is based on `thesis.cls', written by
% Wenzel Matiaske (mati1831@perform.ww.tu-berlin.de) % Wenzel Matiaske (mati1831@perform.ww.tu-berlin.de)
% Copyright (C) 1991, 1996. Version 1.0g (1996/25/01). % Copyright (C) 1991, 1996. Version 1.0g (1996/25/01).
% Revised in July 2003, to adhere to NTUA's ECE library % Revised in July 2003, to adhere to NTUA's ECE library
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
% Package information % Package information
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\filename{softlab-thesis} \def\filename{softlab-thesis}
\def\fileversion{1.4a} \def\fileversion{1.5a}
\def\filedate{2011/08/19} \def\filedate{2019/08/26}
\NeedsTeXFormat{LaTeX2e} \NeedsTeXFormat{LaTeX2e}
\ProvidesClass{softlab-thesis}[\filedate\space\fileversion\space% \ProvidesClass{softlab-thesis}[\filedate\space\fileversion\space%
LaTeX document class (nsp).] LaTeX document class (nsp).]
...@@ -266,6 +266,7 @@ ...@@ -266,6 +266,7 @@
\RequirePackage{xunicode} \RequirePackage{xunicode}
\RequirePackage{xltxtra} \RequirePackage{xltxtra}
\defaultfontfeatures{Mapping=tex-text} \defaultfontfeatures{Mapping=tex-text}
\RequirePackage{verbatim}
% XeLaTeX fonts % XeLaTeX fonts
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...@@ -273,17 +274,28 @@ ...@@ -273,17 +274,28 @@
% roman font % roman font
\def\font@roman{Times New Roman} \def\font@roman{Times New Roman}
%\def\font@roman{Liberation Serif} %\def\font@roman{Liberation Serif}
%\def\font@roman{CMU Serif}
%\def\font@roman{DejaVu Serif}
%\def\font@roman{FreeSerif}
%\def\font@roman{Linux Libertine O}
% sans serif font % sans serif font
\def\font@sans{Arial} \def\font@sans{Arial}
%\def\font@sans{Liberation Sans} %\def\font@sans{Liberation Sans}
%\def\font@sans{CMU Sans Serif}
%\def\font@sans{DejaVu Sans}
%\def\font@sans{FreeSans}
%\def\font@sans{Linux Biolinum O}
% typewriter font % typewriter font
%\def\font@tt{Courier New}
\def\font@tt{Liberation Mono} \def\font@tt{Liberation Mono}
%\def\font@tt{CMU Typewriter Text}
%\def\font@tt{DejaVu Sans Mono} %\def\font@tt{DejaVu Sans Mono}
%\def\font@tt{FreeMono}
%\def\font@tt{Lucida Sans Typewriter} %\def\font@tt{Lucida Sans Typewriter}
%\def\font@tt{Free Monospaced}
%\def\font@tt{Bitstream Vera Sans Mono} %\def\font@tt{Bitstream Vera Sans Mono}
%\def\font@tt{Linux Libertine Mono O}
\setromanfont{\font@roman} \setromanfont{\font@roman}
\setsansfont[Scale=MatchLowercase]{\font@sans} \setsansfont[Scale=MatchLowercase]{\font@sans}
...@@ -298,11 +310,6 @@ ...@@ -298,11 +310,6 @@
\newfontfamily\greekfont{\font@roman} \newfontfamily\greekfont{\font@roman}
\newfontfamily\greekfontsf[Scale=MatchLowercase]{\font@sans} \newfontfamily\greekfontsf[Scale=MatchLowercase]{\font@sans}
\newfontfamily\greekfonttt[Script=Greek,Scale=MatchLowercase]{\font@tt} \newfontfamily\greekfonttt[Script=Greek,Scale=MatchLowercase]{\font@tt}
%\newfontfamily\greekfont{Times New Roman}
%\newfontfamily\greekfont[Script=Greek]{Liberation Serif}
%\newfontfamily\greekfontsf[Scale=MatchLowercase]{Arial}
%\newfontfamily\greekfontsf[Script=Greek,Scale=MatchLowercase]{Liberation Sans}
%\newfontfamily\greekfonttt[Script=Greek,Scale=MatchLowercase]{Liberation Mono}
\setdefaultlanguage[variant=mono,numerals=arabic]{greek} \setdefaultlanguage[variant=mono,numerals=arabic]{greek}
\setotherlanguage{english} \setotherlanguage{english}
\else \else
...@@ -450,7 +457,7 @@ ...@@ -450,7 +457,7 @@
\ifcase\c@type \ifcase\c@type
\or\authorsig{Electrical and Computer Engineer} \or\authorsig{Electrical and Computer Engineer}
\or\authorsig{} \or\authorsig{}
\or\authorsig{Dr.\ Computer Egineer} \or\authorsig{Dr.\ Computer Engineer}
\fi \fi
\fi \fi
...@@ -508,7 +515,7 @@ ...@@ -508,7 +515,7 @@
{\dp@font\@department} {\dp@font\@department}
\vfill \vfill
\includegraphics[height=3.5cm]{mpla}% \includegraphics[height=3.5cm]{mpla}%
\end{center} \end{center}
\else% \else%
\begin{minipage}{4.0cm} \begin{minipage}{4.0cm}
\includegraphics[height=3.5cm]{pyrforos}% \includegraphics[height=3.5cm]{pyrforos}%
...@@ -543,7 +550,7 @@ ...@@ -543,7 +550,7 @@
% %
\vspace{1cm} \vspace{1cm}
\let\old@and\and% \let\old@and\and%
\let\and\@author@and% \let\and\@author@and%
{\a@font% {\a@font%
\begin{tabular}[t]{@{}l@{}}% \begin{tabular}[t]{@{}l@{}}%
\if@greek \if@greek
...@@ -614,7 +621,7 @@ ...@@ -614,7 +621,7 @@
% %
\vspace{1cm} \vspace{1cm}
\let\old@and\and% \let\old@and\and%
\let\and\@author@and% \let\and\@author@and%
{\a@font% {\a@font%
\begin{tabular}[t]{@{}l@{}}% \begin{tabular}[t]{@{}l@{}}%
\uppercase\expandafter{\@author}% \uppercase\expandafter{\@author}%
...@@ -689,7 +696,7 @@ ...@@ -689,7 +696,7 @@
\textbf{Τμήμα Μαθηματικών} \\ \textbf{Τμήμα Μαθηματικών} \\
του \\ του \\
\textbf{Εθνικού και Καποδιστριακού Πανεπιστημίου Αθηνών} \textbf{Εθνικού και Καποδιστριακού Πανεπιστημίου Αθηνών}
\end{center} \end{center}
% %
\vfill \vfill
% %
...@@ -801,7 +808,8 @@ ...@@ -801,7 +808,8 @@
\addcontentsline{toc}{part}{\partname\ \thepart \hspace{1em}#1}% \addcontentsline{toc}{part}{\partname\ \thepart \hspace{1em}#1}%
\else \else
\addcontentsline{toc}{part}{#1}\fi \markboth{}{}% \addcontentsline{toc}{part}{#1}\fi \markboth{}{}%
{\raggedright \vfil%
{\centering
\reset@font \reset@font
\ifnum \c@secnumdepth >-2\relax \ifnum \c@secnumdepth >-2\relax
\p@font \partname{} \thepart \par \p@font \partname{} \thepart \par
...@@ -814,8 +822,8 @@ ...@@ -814,8 +822,8 @@
\fi \fi
\par} \par}
\@endpart} \@endpart}
\def\@spart#1{% \def\@spart#1{\vfil%
{\raggedright {\centering
\reset@font\p@font \reset@font\p@font
\if@upper \if@upper
\uppercase\expandafter{#1} \uppercase\expandafter{#1}
...@@ -1204,7 +1212,15 @@ ...@@ -1204,7 +1212,15 @@
\addcontentsline{toc}{chapter}{\listtablename} \addcontentsline{toc}{chapter}{\listtablename}
\@starttoc{lot}% \@starttoc{lot}%
} }
\newcommand{\listofalgorithms}{%
\chapter*{\listalgorithmname
\@mkboth{\listalgorithmname}%
{\listalgorithmname}}%
\addcontentsline{toc}{chapter}{\listalgorithmname}
\@starttoc{loa}%
}
\let\l@table\l@figure \let\l@table\l@figure
\let\l@algorithm\l@figure
% Bibliography % Bibliography
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...@@ -1488,6 +1504,10 @@ ...@@ -1488,6 +1504,10 @@
\endgroup% \endgroup%
\end{greek}% \end{greek}%
} }
\if@greek
\let\acknowledgementsen\comment
\let\endacknowledgementsen\endcomment
\else
\newenvironment{acknowledgementsen}{% \newenvironment{acknowledgementsen}{%
\begin{english}% \begin{english}%
\chapter*{\acknowledgementsnameen}% \chapter*{\acknowledgementsnameen}%
...@@ -1518,6 +1538,7 @@ ...@@ -1518,6 +1538,7 @@
\endgroup% \endgroup%
\end{english}% \end{english}%
} }
\fi
% Font customization % Font customization
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...@@ -1577,7 +1598,7 @@ ...@@ -1577,7 +1598,7 @@
\or\thesistype{M.Sc. Thesis} \or\thesistype{M.Sc. Thesis}
\institution{National and Kapodistrian University of Athens} \institution{National and Kapodistrian University of Athens}
\school{Department of Mathematics} \school{Department of Mathematics}
\department{Graduate Program in Logic and Theory of \department{Graduate Program in Logic and Theory of
Algorithms and Computation} Algorithms and Computation}
\or\thesistype{Doctoral Dissertation} \or\thesistype{Doctoral Dissertation}
\fi \fi
...@@ -1637,4 +1658,19 @@ ...@@ -1637,4 +1658,19 @@
\let\nickie@oldenddocument\enddocument \let\nickie@oldenddocument\enddocument
\def\enddocument{\label{pg:last-document}\nickie@oldenddocument} \def\enddocument{\label{pg:last-document}\nickie@oldenddocument}
\def\englishtext{%
\if@greek
\part*{Κείμενο στα αγγλικά}%
\addcontentsline{toc}{part}{Κείμενο στα αγγλικά}%
\addtocontents{lot}{\protect\contentsline{part}%
{Πίνακες στο αγγλικό κείμενο}{}}%
\addtocontents{lof}{\protect\contentsline{part}%
{Σχήματα στο αγγλικό κείμενο}{}}%
\addtocontents{loa}{\protect\contentsline{part}%
{Αλγόριθμοι στο αγγλικό κείμενο}{}}%
\setcounter{chapter}{0}%
\fi
\selectlanguage{english}%
}
\endinput \endinput
This diff is collapsed.
This diff is collapsed.
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