diff --git a/.github/images/actions.png b/.github/images/actions.png new file mode 100644 index 0000000..00b7453 Binary files /dev/null and b/.github/images/actions.png differ diff --git a/.github/images/artifact.png b/.github/images/artifact.png new file mode 100644 index 0000000..ba3155e Binary files /dev/null and b/.github/images/artifact.png differ diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..887ee67 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,19 @@ +name: Build + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Install the required packages + run: sudo apt-get install texlive-latex-base texlive-latex-extra texlive-fonts-recommended texlive-pictures texlive-science + - name: Build the Thesis + run: make + - uses: actions/upload-artifact@master + with: + name: Compiled Thesis + path: ./thesis_masters.pdf diff --git a/.gitignore b/.gitignore index 837e984..edc32ab 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ Session.vim ##Github Linux Ignore .* !.gitignore +!.github *~ ##Github Archives Ignore diff --git a/README.md b/README.md index e9e4719..0a6cd39 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,9 @@ This repository contains an updated version of the UMN PhD Thesis Template. ## Prerequisites -On Ubuntu 14.04 you will need to enable the `universe` repository. You can do -this by opening the "Ubuntu Software Center", then following "Edit > Software -Sources > Ubuntu Software Tab > check the box for 'Community-maintained free -and open-source software (universe)'", or by running the code below: +### Build Locally -```bash -# Enable the univerese repo -sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe" -``` - -You can then install the packages needed to compile the template: +To build the thesis locally, on Ubuntu 18.04, you will need to install: ```bash # Install the required packages @@ -26,7 +18,37 @@ texlive-pictures \ texlive-science \ ``` -## `cleveref` +### Build On Github + +The easiest way to build the PDF is to use [Github Actions][actions]. This +will build the thesis and produce a PDF all within Github. The repository +already contains the correct configuration files, but you will need to enable +actions in Github. + +[actions]: https://help.github.com/en/actions + +Once this is done, you can click on the _"Actions"_ tab at the top of the +repository on Github. + +Actions page + +There you'll see a list of build jobs. The ones with green check marks have +completed successfully. Clicking on one will bring you to the build page, +where there will be a section titled **Artifacts**. Click on "Compiled Thesis" +to download a zip file containing the PDF. + +Artifact download + +## Additional Packages + +The thesis template comes with some useful additional packages. They are +described below. + +### `cleveref` [`cleveref`](https://www.ctan.org/pkg/cleveref?lang=en) is a package designed to make cross referencing easier. Unlike `\ref`, `\cref` automatically adds @@ -51,7 +73,7 @@ instead of "figures 1, 2 and 3". Additionally, the package is passed the option `noabbrev` which causes it to print the full prefix instead of an abbreviation ("figure" vs "fig."). -## `SIunitx` +### `SIunitx` [`SIunitx`](https://www.ctan.org/pkg/siunitx?lang=en) formats SI units. It provides the `\SI{}` command, which is used as follows: @@ -95,7 +117,7 @@ The way in which units are displayed can also be redefined, as has been done \DeclareSIUnit\electronvolt{e\hspace{-0.08em}V} ``` -## `booktabs` +### `booktabs` [`booktabs`](https://www.ctan.org/pkg/booktabs?lang=en) adds options to make nicer tables. It defines `\toprule`, `\midrule`, and `\bottomrule` which add