Skip to content

Commit ce831f1

Browse files
committed
Improvements.
This commit simplifies the directory structure by hoisting `infthesis.cls` and `Makefile` out of `src`. The `Makefile` has been updated with uninstall rules. In addition support for `cmake` has been removed in flavour of a single installation procedure. Updated README accordingly.
1 parent 1384b4c commit ce831f1

File tree

8 files changed

+224
-413
lines changed

8 files changed

+224
-413
lines changed

CMakeLists.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

Makefile

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# Makefile for installing the infthesis LaTeX class, eushield
2+
# package, and associated logos.
3+
#
4+
# To install infthesis.cls type:
5+
# $ make install
6+
#
7+
# To install the required eushield.sty type:
8+
# $ make install-eushield
9+
#
10+
# To install logos type:
11+
# $ make install-logo-inf
12+
# $ make install-logo-cdtppar
13+
# $ make install-logo-epsrc
14+
#
15+
# Each install command has an associated uninstall command, e.g. to
16+
# uninstall the infthesis class and eushield.sty type:
17+
# $ make uninstall
18+
# $ make uninstall-eushield
19+
20+
TEXMF=$(HOME)/.texmf/tex/latex
21+
INSTDIR?=$(TEXMF)
22+
TEXINFTHESIS=$(INSTDIR)/uoe/informatics/infthesis
23+
24+
TEXEUSHIELD=$(INSTDIR)/uoe/informatics/eushield
25+
EUSHIELDURL=http://dream.inf.ed.ac.uk/projects/polyml/application/cover-letter/tex/logos
26+
EUSHIELD= \
27+
eushield.sty eushield.eps \
28+
eushield-normal.pdf eushield-normal.ps \
29+
eushield-noback.pdf eushield-noback.ps \
30+
eushield-reversed.pdf eushield-reversed.ps \
31+
eushield-twocolour.pdf eushield-twocolour.ps \
32+
eushield-fullcolour.pdf eushield-fullcolour.ps
33+
34+
INFLOGODIR=$(INSTDIR)/logos/informatics
35+
INFURL=http://media.inf.ed.ac.uk/infweb/logos
36+
INFLOGO=InformaticsUni_spot.eps InformaticsUni_CMYK.eps
37+
38+
CDTPPARLOGODIR=$(INSTDIR)/logos/cdtppar
39+
CDTPPARURL=http://media.inf.ed.ac.uk/infweb/ppar-logos
40+
CDTPPARLOGO=cmyk.eps black.eps white.eps
41+
42+
EPSRCLOGODIR=$(INSTDIR)/logos/epsrc
43+
EPSRCURL=https://www.epsrc.ac.uk/files/aboutus/logos-and-indentity
44+
EPSRCLOGO=white-out-sponsorship-logo:sponsor-wofullres.eps \
45+
black-and-white-sponsorship-logo-full-resolution:sponsor-bwfullres.eps \
46+
colour-sponsorship-logo-full-resolution:sponsorfullres.eps
47+
48+
49+
install: infthesis.cls
50+
@mkdir -v -p $(TEXINFTHESIS) && \
51+
cp -v infthesis.cls $(TEXINFTHESIS)/infthesis.cls && \
52+
texhash --verbose $(INSTDIR) && \
53+
echo "Installation complete." || echo "Installation failed."
54+
55+
uninstall: $(TEXINFTHESIS)/infthesis.cls
56+
@rm -v $(TEXINFTHESIS)/infthesis.cls && \
57+
texhash --verbose $(INSTDIR) && \
58+
echo "Uninstallation complete." || echo "Uninstallation failed."
59+
@echo "Attempting to removing directory structure."
60+
@rmdir -v -p $(TEXINFTHESIS) && true || true
61+
62+
install-eushield:
63+
@mkdir -v -p $(TEXEUSHIELD)
64+
$(foreach dep, $(EUSHIELD), \
65+
echo "Installing $(dep)..." && \
66+
curl -o $(TEXEUSHIELD)/$(dep) -O $(EUSHIELDURL)/$(dep) && \
67+
echo "Installation of $(dep) complete." || echo "Installation of $(dep) failed." ; \
68+
)
69+
texhash $(INSTDIR)
70+
71+
uninstall-eushield:
72+
$(foreach dep, $(EUSHIELD), \
73+
echo "Uninstalling $(dep)..." && \
74+
rm -v $(TEXEUSHIELD)/$(dep) && \
75+
echo "Uninstallation of $(dep) complete." || echo "Uninstallation of $(dep) failed." ; \
76+
)
77+
texhash $(INSTDIR) && \
78+
@rmdir -p -v $(TEXEUSHIELD) && true || true
79+
80+
install-logo-inf:
81+
@mkdir -v -p $(INFLOGODIR)
82+
$(foreach dep, $(INFLOGO), \
83+
echo "Installing $(dep)..." && \
84+
curl -o $(INFLOGODIR)/$(dep) -O $(INFURL)/$(dep) && \
85+
echo "Installation of $(dep) complete." || echo "Installation of $(dep) failed." ; \
86+
)
87+
88+
uninstall-logo-inf:
89+
$(foreach dep, $(INFLOGO), \
90+
echo "Uninstalling $(dep)..." && \
91+
rm -v $(INFLOGODIR)/$(dep) && \
92+
echo "Uninstallation of $(dep) complete." || echo "Uninstallation of $(dep) failed." ; \
93+
)
94+
@rmdir -v -p $(INFLOGODIR) && true || true
95+
96+
97+
install-logo-cdtppar:
98+
@mkdir -v -p $(CDTPPARLOGODIR)
99+
$(foreach dep, $(CDTPPARLOGO), \
100+
echo "Installing $(dep)..." && \
101+
curl -o $(CDTPPARLOGODIR)/$(dep) -O $(CDTPPARURL)/$(dep) && \
102+
echo "Installation of $(dep) complete." || echo "Installation of $(dep) failed." ; \
103+
)
104+
105+
uninstall-logo-cdtppar:
106+
$(foreach dep, $(CDTPPARLOGO), \
107+
echo "Uninstalling $(dep)..." && \
108+
curl -o $(CDTPPARLOGODIR)/$(dep) -O $(CDTPPARURL)/$(dep) && \
109+
echo "Uninstallation of $(dep) complete." || echo "Uninstallation of $(dep) failed." ; \
110+
)
111+
@rmdir -v -p $(CDTPPARLOGODIR) && true || true
112+
113+
install-logo-epsrc:
114+
@mkdir -v -p $(EPSRCLOGODIR)
115+
$(foreach dep, $(EPSRCLOGO), \
116+
$(eval dep1 = $(word 1,$(subst :, ,$(dep)))) \
117+
$(eval dep2 = $(word 2,$(subst :, ,$(dep)))) \
118+
echo "Installing $(dep2)..." && \
119+
curl -o $(EPSRCLOGODIR)/$(dep2) -O $(EPSRCURL)/$(dep1) && \
120+
echo "Installation of $(dep2) complete." || echo "Installation of $(dep2) failed." ; \
121+
)
122+
123+
uninstall-logo-epsrc:
124+
$(foreach dep, $(EPSRCLOGO), \
125+
$(eval dep1 = $(word 1,$(subst :, ,$(dep)))) \
126+
$(eval dep2 = $(word 2,$(subst :, ,$(dep)))) \
127+
echo "Uninstalling $(dep2)..." && \
128+
curl -o $(EPSRCLOGODIR)/$(dep2) -O $(EPSRCURL)/$(dep1) && \
129+
echo "Uninstallation of $(dep2) complete." || echo "Uninstallation of $(dep2) failed." ; \
130+
)
131+
@rmdir -v -p $(EPSRCLOGODIR) && true || true

README.md

Lines changed: 88 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,121 @@
11
# LaTeX class for Informatics theses
2-
This LaTeX class provides a document class for typesetting Informatics dissertations.
3-
4-
It is a fork of `infthesis.cls` as found on Informatics DICE machines, however I have patched the class in various ways to make it more flexible.
5-
For the original class file and a basic usage example, look [here](http://www.inf.ed.ac.uk/systems/tex/informatics/infthesis).
2+
This LaTeX class provides a document class for typesetting Informatics
3+
dissertations.
4+
5+
This is a fork of the `infthesis.cls` file as found on Informatics
6+
DICE machines, however, this class file has been patched in various
7+
ways to make it more flexible. Checkout the [computing support
8+
website](http://www.inf.ed.ac.uk/systems/tex/informatics/infthesis)
9+
for instructions on how to obtain the original class file and a basic
10+
usage example.
11+
12+
## Changes against upstream
13+
14+
This class file contains the following changes over the original class
15+
file:
16+
17+
* Listing of multiple institutions, e.g. using
18+
`\documentclass[phd,lfcs,icsa]{infthesis}` lists both LFCS and ICSA
19+
as institutions on the titlepage.
20+
* Document class options for listing affiliated CDT alongside
21+
institution on titlepage. The following three CDTs are available:
22+
Data Science (`cdtds`), Pervasive Paralleism (`cdtppar`), and
23+
Robotics and Autonomous Systems (`cdtras`).
24+
* Lay summary environment. Use `\begin{laysummary}\end{laysummary}` to
25+
add a lay summary page.
26+
* Automatic insertion of author names in custom declarations,
27+
e.g. `\begin{declaration}\end{declaration}` will insert the author
28+
name like `\standarddeclaration` (aside: `\standarddeclaration` is
29+
now implemented in terms of the `declaration` environment).
630

731
## Dependencies
32+
833
The document class requires the following packages:
9-
* ifthen
10-
* graphics
11-
* xspace
12-
* eushield
13-
14-
where *eushield* is the only nonstandard LaTeX package. The package provides various versions of the university's crest. The [eushield][eushield.sty] package is not distributed along with this class.
15-
16-
You can obtain a copy of it via [Informatics DReaM](http://dream.inf.ed.ac.uk/projects/polyml/application/cover-letter/tex/logos/eushield.sty). You must also obtain the following necessary copies of the university crest:
34+
35+
* ifthen
36+
* graphics
37+
* xspace
38+
* eushield
39+
40+
The only nonstandard LaTeX package is *eushield*, which provides
41+
various versions of the university's crest. The
42+
[eushield][eushield.sty] package is not distributed along with this
43+
class.
44+
45+
You can obtain a copy of it via [Informatics
46+
DReaM](http://dream.inf.ed.ac.uk/projects/polyml/application/cover-letter/tex/logos/eushield.sty). For
47+
the package to work correctly you should also obtain the following
48+
necessary copies of the university crest:
49+
1750
* eushield.[[eps](http://dream.inf.ed.ac.uk/projects/polyml/application/cover-letter/tex/logos/eushield.eps)]
1851
* eushield-normal.[[pdf](http://dream.inf.ed.ac.uk/projects/polyml/application/cover-letter/tex/logos/eushield-normal.pdf)][[ps](http://dream.inf.ed.ac.uk/projects/polyml/application/cover-letter/tex/logos/eushield-normal.ps)]
1952
* eushield-noback.[[pdf](http://dream.inf.ed.ac.uk/projects/polyml/application/cover-letter/tex/logos/eushield-noback.pdf)][[ps](http://dream.inf.ed.ac.uk/projects/polyml/application/cover-letter/tex/logos/eushield-noback.ps)]
2053
* eushield-reversed.[[pdf](http://dream.inf.ed.ac.uk/projects/polyml/application/cover-letter/tex/logos/eushield-reversed.pdf)][[ps](http://dream.inf.ed.ac.uk/projects/polyml/application/cover-letter/tex/logos/eushield-reversed.ps)]
2154
* eushield-twocolour.[[pdf](http://dream.inf.ed.ac.uk/projects/polyml/application/cover-letter/tex/logos/eushield-twocolour.pdf)][[ps](http://dream.inf.ed.ac.uk/projects/polyml/application/cover-letter/tex/logos/eushield-twocolour.ps)]
2255
* eushield-fullcolour.[[pdf](http://dream.inf.ed.ac.uk/projects/polyml/application/cover-letter/tex/logos/eushield-fullcolour.pdf)][[ps](http://dream.inf.ed.ac.uk/projects/polyml/application/cover-letter/tex/logos/eushield-fullcolour.ps)]
2356

24-
**Note** all usage of the university's crest or logos is subject to the [brand guidelines](http://www.ed.ac.uk/communications-marketing/resources/university-brand). Make sure you follow the brand guidelines!
57+
**Note** usage of the university's crest or logos is subject to the
58+
[brand
59+
guidelines](http://www.ed.ac.uk/communications-marketing/resources/university-brand). Please
60+
make sure you follow the brand guidelines.
2561

26-
## Other useful logos
62+
### Other useful logos
2763

28-
Other commonly useful logos:
64+
You may want to use some of the common logos with `infthesis.cls`
2965

3066
* [UoE Informatics logos](http://web.inf.ed.ac.uk/infweb/admin/school-brand)
3167
* [UoE CDT PPar logos](http://web.inf.ed.ac.uk/infweb/student-services/cdt/ppar/resources-guidelines/ppar-logos)
3268
* [EPSRC logos](https://www.epsrc.ac.uk/about/logos)
3369

34-
Make sure to follow the brand guidelines as stated on each site!
35-
36-
## Local installation
37-
38-
### LaTeX class and main crest
39-
40-
#### Using `make`
41-
42-
To install the thesis class file (in the `src` dir):
43-
44-
`make install`
45-
46-
To install the crest and logos (in the `src` dir):
47-
48-
`make install-eushield`
70+
Usage is subject to the brand guidelines as stated on each
71+
site. Please make sure you follow them.
4972

50-
Both above commands will place all the relevant files under a `.texmf` directory in the current user's `HOME` directory
51-
and will also invoke `texhash` in order to update the search paths.
73+
## Simple local installation
5274

53-
For the extra logos, 3 targets are declared and can be used as follows:
75+
This class file is bundled with an `Makefile` installation script. To
76+
install the class file
5477

55-
- `make install-logo-inf`
56-
- `make install-logo-cdtppar`
57-
- `make install-logo-epsrc`
78+
```shell
79+
$ make install
80+
```
5881

59-
Each target creates a corresponding subdirectory under `logos/` with all the relevant logos (in vector format). The
60-
installation directory can be influence using the `DESTDIR` variable as stated [here](https://www.gnu.org/prep/standards/html_node/DESTDIR.html).
82+
To download and install the required `eushield` type
6183

62-
#### Using `cmake`
84+
```shell
85+
$ make install-eushield
86+
```
6387

64-
- `mkdir build && cd build`
65-
- `cmake [path to this source dir] -DCMAKE_INSTALL_PREFIX=[path to install dir]`
66-
- `make && make install`
67-
- `texhash [path to install dir]`
88+
Use the following command to acquire and install the common logos
6889

69-
To match the `make` based installation, `texhash` must be invoked manually, but it allows for greater flexibility on the
70-
selection of the target directory.
90+
```shell
91+
$ make install-logo-{inf,cdtppar,epsrc}
92+
```
7193

72-
Moreover, the `cmake` file `uoe-infthesis-latex-cls.cmake` allows the integration of this repository as a submodule,
73-
allowing the creation of targets with the relevant files as shown in this project's `CMakeLists.txt` file. Using this
74-
method requires that the handling of the paths for LaTeX will have to be performed separately. For an example have a
75-
look [here](https://github.com/compor/uoe-inf-thesis-skeleton).
94+
### Specifying installation directory
7695

77-
The commands defined are:
96+
By default the class file, eushield, and logos are installed under
97+
`$HOME/.texmf`. You may change the installation directory by setting
98+
the `INSTDIR` variable. For example, to install the class file under
99+
the directory `foo` type
78100

79-
- `add_uoe_eushield`
80-
- `add_uoe_infthesis`
101+
```shell
102+
$ INSTDIR=foo make install
103+
```
81104

82-
For the extra logos, the submodule `uoe-logos-extra.cmake` has to be included in your project. The commands defined are:
105+
## Uninstallation
83106

84-
- `add_uoe_inf_logos`
85-
- `add_uoe_cdtppar_logos`
86-
- `add_uoe_epsrc_logos`
107+
Each installation rule has a corresponding uninstallation rule. For
108+
example you can use `uninstall` rule to uninstall the class file from
109+
its default installation location, i.e.
87110

111+
```shell
112+
$ make uninstall
113+
```
88114

89-
[eushield.sty]: http://dream.inf.ed.ac.uk/projects/polyml/application/cover-letter/tex/logos/eushield.sty
115+
**Note** if you used a custom installation, then you should set
116+
`INSTDIR` before uninstalling. For example, if you installed the class
117+
file under the directory `foo` then you should `INSTDIR=foo`, i.e.
90118

119+
```shell
120+
$ INSTDIR=foo make uninstall
121+
```

src/infthesis.cls renamed to infthesis.cls

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ Processing}}
181181
\DeclareOption{mscres}{\@researchdegree{Master of Science by Research}}
182182

183183
\def\@taughtdegree#1#2{%
184-
\renewcommand{\@degreetext}{#1 \\
184+
\renewcommand{\@degreetext}{#1 \\
185185
\ifx\@empty#2
186186
% \PackageWarning{infthesis}{No course/school specified for taught
187187
% degree}
@@ -207,7 +207,7 @@ Processing}}
207207
\setboolean{sansheadings}{false}}
208208

209209
%% Sidedness, openright-ness, and font size (so that the draft option can
210-
%% override them as needed.
210+
%% override them as needed.
211211
\DeclareOption{twoside}{\renewcommand{\@thesisside}{twoside}}
212212
\DeclareOption{oneside}{\renewcommand{\@thesisside}{oneside}}
213213
\DeclareOption{openany}{\renewcommand{\@thesisopen}{openany}}
@@ -260,7 +260,7 @@ Processing}}
260260

261261
%% Set default options and process the ones we were given.
262262
\ExecuteOptions{phd,centerchapter,romanprepages,%
263-
sansheadings,openright,oneside,12pt,timesfonts}
263+
sansheadings,openright,oneside,12pt,timesfonts}
264264
\ProcessOptions
265265

266266
%%
@@ -646,7 +646,7 @@ Processing}}
646646
}\vspace{3cm}
647647
{\Large\itshape \@author \par}\vspace{3cm}
648648
{\large \@degreetext \par \@submityear \par}
649-
\vskip 1cm
649+
\vskip 1cm
650650
\ifthenelse{\equal{\@graduationdate}{}}{}
651651
{{\large \ttfamily (Graduation date: \@graduationdate)}}
652652
\end{center}
@@ -664,7 +664,7 @@ Processing}}
664664
{\resizebox{30mm}{!}{\includeshield}\\\vfill}
665665
{}
666666
{\large \@degreetext \par \@submityear \par}
667-
\vskip 1cm
667+
\vskip 1cm
668668
\ifthenelse{\equal{\@graduationdate}{}}{}
669669
{{\large \ttfamily (Graduation date: \@graduationdate)}}
670670
\end{center}

0 commit comments

Comments
 (0)