Skip to content

Commit

Permalink
Remove ifpdf package
Browse files Browse the repository at this point in the history
  • Loading branch information
gpampara committed Mar 8, 2018
1 parent 871151b commit d9d8c0c
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 64 deletions.
12 changes: 7 additions & 5 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,18 @@ location = "Pretoria, South Africa"
-- single file, but more can be specified, if needed.
-- NOTE: The order of the list matters.
abstract_includes =
{ "content/abstract.tex"
}
{ "content/abstract.tex"
}

-- The list of file to include in the document creation. This list
-- will be included verbatim. That is, the order of the list items
-- does matter.
main_includes =
{ "content/t.tex"
, "content/x.tex"
}
{ "content/t.tex"
, "content/x.tex"
}

appendix_includes = { "content/appendix.tex" }

degree = {
msc = {
Expand Down
2 changes: 1 addition & 1 deletion doctoral_template/.latexmkrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
$pdflatex = 'lualatex %O --shell-escape %S';
$pdflatex = 'lualatex -recorder %O --shell-escape %S';
$pdf_mode = 1;
2 changes: 0 additions & 2 deletions doctoral_template/appendices/acronyms/main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
\renewcommand{\glossarypreamble}{Provide a short introduction to the appendix here. Mention that acronyms are listed alphabetically and typeset in bold, with the meaning of the acronym alongside. Also note that you must include acronyms using \texttt{useacronym} for them to show up here. If there are no acronyms defined in your text, this introduction will also not be displayed:}

\cleardoublepage
\ifpdf
\phantomsection
\fi
\chapter{Acronyms}
\label{app:acronyms}
\printglossary
Expand Down
14 changes: 0 additions & 14 deletions doctoral_template/coverpages/main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,7 @@
\begin{center}by\end{center}
\begin{center}
{\directlua{value(author)}}\\
% \ifpdf
E-mail: \href{mailto:\directlua{value(email)}}{\directlua{value(email)}}
% \else
% E-mail: [email protected]
% \fi
\end{center}
\vspace{1cm}
\begin{center}{\large\bf Abstract}\end{center}
Expand Down Expand Up @@ -136,48 +132,38 @@
\pagestyle{plain}
\pagenumbering{roman}
\setcounter{page}{1}
\ifpdf
\pdfbookmark[0]{Contents}{contents}
\fi
\tableofcontents

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\cleardoublepage
\ifpdf
\phantomsection
\fi
\addcontentsline{toc}{chapter}{List of Figures}
\listoffigures

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\cleardoublepage
\ifpdf
\phantomsection
\fi
\addcontentsline{toc}{chapter}{List of Graphs}
\listof{graph}{List of Graphs}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\cleardoublepage
\ifpdf
\phantomsection
\fi
\addcontentsline{toc}{chapter}{List of Algorithms}
\listof{algorithm}{List of Algorithms}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\cleardoublepage
\ifpdf
\phantomsection
\fi
\addcontentsline{toc}{chapter}{List of Tables}
\listoftables

Expand Down
47 changes: 6 additions & 41 deletions doctoral_template/dissertation.tex
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
\usepackage{url} % URL typesetting
\usepackage{texnames} % BIBTeX, SliTeX, AMSTeX, PiCTeX and TeXsis logos
\usepackage{verbatim} % multi-line comments
%\usepackage{ifpdf} % selective setup for PDF compilation
\usepackage[number=none]{glossary} % glossary file environments

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand All @@ -31,10 +30,6 @@

\newcommand{\noopsort}[1]{}

%\ifpdf

% PDFLaTeX-specific packages

\usepackage[
pdftex, % hyperlinked references for PDF output
bookmarks=true, % (option) build bookmarks
Expand Down Expand Up @@ -80,16 +75,6 @@

%\pdfadjustspacing=1

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% DVI/PostScript-Specific setup %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% \else

% \usepackage{graphicx} % EPS graphics

% \fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Lengths %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand All @@ -100,14 +85,8 @@
\setlength{\unitlength}{1pt}
\setlength{\footnotesep}{5mm}

%\ifpdf
% ensure PDF is centered in display
\setlength{\hoffset}{-10.5mm}
% \else
% % add gutter margin for DVI/PostScript
% \setlength{\hoffset}{-10.5mm}
% \addtolength{\hoffset}{4.5mm}
% \fi
% ensure PDF is centered in display
\setlength{\hoffset}{-10.5mm}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Line Spacing %%%
Expand All @@ -131,11 +110,7 @@
\renewcommand{\gloskip}{}
\setlength{\namewidth}{79pt}

%\ifpdf
\newcommand{\idxbf}[1]{\textbf{\hyperpage{#1}}}
% \else
% \newcommand{\idxbf}[1]{\textbf{#1}}
% \fi
\newcommand{\idxbf}[1]{\textbf{\hyperpage{#1}}}

\makeglossary
\makeindex
Expand Down Expand Up @@ -206,9 +181,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\ifpdf
\hypersetup{pageanchor=true} % (option) turn page referencing back on for chapters
%\fi

\pagestyle{fancy}
\fancypagestyle{headings}{
Expand All @@ -225,9 +198,8 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\cleardoublepage
%\ifpdf
\phantomsection
%\fi

\label{bibliography}
\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{plain}
Expand All @@ -236,21 +208,14 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\appendix
% \include{appendices/appendix1/main}
% \include{appendices/appendix2/main}
% % any further appendices you decide to write (create appropriate directory structure, as with chapters)
% \include{appendices/acronyms/main}
% \include{appendices/symbols/main}
% \include{appendices/derived_publications/main}
\appendix
\directlua{input_all(appendix_includes)}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\cleardoublepage
%\ifpdf
\phantomsection
%\fi
\label{index}
\addcontentsline{toc}{chapter}{Index}
\printindex
Expand Down
14 changes: 13 additions & 1 deletion extensions/functions.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
require "../config.lua"

function tablelength(T)
local count = 0
for a in pairs(T) do
if not a then
count = count + 1
end
end
return count
end

function input_all(list)
for _, i in ipairs(list) do
tex.sprint("\\input{../" .. i .. "}")
if i then
tex.sprint("\\input{../" .. i .. "}")
end
end
end

Expand Down

0 comments on commit d9d8c0c

Please sign in to comment.