{"id":18293696,"url":"https://github.com/uio-latex/phduio-article-based","last_synced_at":"2025-10-16T02:15:44.532Z","repository":{"id":40930066,"uuid":"291823062","full_name":"uio-latex/phduio-article-based","owner":"uio-latex","description":"LaTeX template for article based PhD theses at the University of Oslo","archived":false,"fork":false,"pushed_at":"2023-07-23T18:59:40.000Z","size":301,"stargazers_count":15,"open_issues_count":4,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T02:26:27.691Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TeX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uio-latex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-31T20:57:25.000Z","updated_at":"2024-09-06T16:54:46.000Z","dependencies_parsed_at":"2024-12-23T00:12:42.311Z","dependency_job_id":"aa91a4c2-6915-4e90-8505-6a08e71b9567","html_url":"https://github.com/uio-latex/phduio-article-based","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uio-latex%2Fphduio-article-based","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uio-latex%2Fphduio-article-based/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uio-latex%2Fphduio-article-based/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uio-latex%2Fphduio-article-based/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uio-latex","download_url":"https://codeload.github.com/uio-latex/phduio-article-based/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247999866,"owners_count":21031046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T14:25:47.569Z","updated_at":"2025-10-16T02:15:39.488Z","avatar_url":"https://github.com/uio-latex.png","language":"TeX","readme":"# PHDUIO – Article based thesis\nThis LaTeX template was used for article based doctoral theses at the University of Oslo.\nFor the current official template, see [uiophdthesis](https://www.uio.no/english/about/designmanual/profile-in-use/latex/index.html).\n\nFor monographic theses,\nsee the template [PHDUIO – Monograph](https://github.com/martinhelso/phduio-monograph).\n\nAvailable on [Overleaf](https://www.overleaf.com/latex/templates/phduio-article-based-thesis/vnhkzpyyddvh).\n\nThe main features of the template are:\n* Theses at the University of Oslo are printed in the book format 17 x 24 cm.\nThis is about 81% of an A4 paper.\nIn `phduio`,\nyou work directly in the 17 x 24 cm format,\nso you do not have to worry about whether the font and figures will be legible after being shrunk for printing.\n* It defines a custom title page.\n* The class provides tools for incorporating separate papers into the thesis.\n\n[![Example document](https://i.imgur.com/AQFvNda.png)](https://www.duo.uio.no/bitstream/handle/10852/81172/PhD-Helsø-2020.pdf)\n\n## Contents\n* [Documentation](#documentation)\n  * [Title page](#title-page)\n    * [Colophon](#colophon)\n  * [Screen mode](#screen-mode)\n  * [Incorporating papers](#incorporating-papers)\n    * [Including `.tex` files](#including-tex-files)\n      * [Unmarked footnotes](#unmarked-footnotes)\n      * [Tables of contents](#tables-of-contents)\n      * [Appendices](#appendices)\n      * [Bibliographies](#bibliographies)\n    * [Including `.pdf`files](#including-pdf-files)\n  * [Miscellaneous](#miscellaneous)\n  * [Tips for converting to the `phduio` template](#tips-for-converting-to-the-phduio-template)\n* [FAQ](#faq)\n* [Contact information](#contact-information)\n\n## Documentation\nThis text is about the specifics of the template.  \nThe more general [guide to large documents](https://github.com/martinhelso/Introduction-to-LaTeX/blob/master/large-documents.md)\nis also considered part of the documentation.\n\nAt the core,\n`phduio` consists of `memoir`,\nso in addition to what is mentioned here,\nyou have all the functionality of `memoir`.\n\n### Title page\nA custom title page is printed when `\\uiotitle` is invoked.\nJust like `\\maketitle`,\nit collects data from `\\author` and `\\title`.\nIn addition,\nyou can add a subtitle using `\\subtitle`.\nAlso,\nyou must specify your affiliation at the university with `\\department` and `\\faculty` before calling `\\uiotitle`.\n\nOptionally,\nother affiliations can be added with `\\affiliation`.\nUse `\\and` or `\\AND` to separate the affiliations.\nThe use of `\\and` is intended for separating subdepartments of a single institution:\n```latex\n\\affiliation\n{\n    Center for Biomedical Computing\n    \\and\n    Simula Research Laboratory\n}\n```\nWhereas `\\AND` is intended for separating two different institutions:\n```latex\n\\affiliation\n{\n    Simula Research Laboratory\n    \\AND\n    Oslo University Hospital\n}\n```\n\n#### Colophon\nIf the class option `[colophon]` is used,\n`\\uiotitle` will also print a colophon page with copyright and printing information.\nThe colophon collects information from the commands `\\author`, `\\faculty`, `\\dissertationseries` and `\\ISSN`\nor – if you belong to the Faculty of Medicine – `\\ISBN`.\n\nIf needed,\nthe credits for cover design and printing can be changed with `\\cover` and `\\printinghouse`.\n\nYou can request the dissertation series number and ISSN/ISBN\nby sending an e-mail to the Graphics Center at [grafisksenter@uio.no](mailto:grafisksenter@uio.no)\nshortly before submitting the thesis.\nThey are also able to edit in the correct numbers directly into the `.pdf` for you.\n\n### Screen mode\nBy default,\n`phduio` is set up for printing.\nIf you want a version of the thesis that is more suitable for viewing on a screen,\npass the option `[screen]` to the document class.\nThis will colour clickable links and make the inner and outer margins equal.\n\n### Incorporating papers\nMimicking the commands `\\appendix` and `\\appendixpage`,\nthe class `phduio` defines `\\paper` and `\\paperpage`.\nThe macro `\\paper` renames the following chapters to papers,\nand `\\paperpage` prints a page with the text \"Papers\" in the style of `\\part*{Papers}`.\n\nThe cross reference commands `\\cref` and `\\Cref` print \"Paper\" instead of \"Chapter\"\nfor chapters initiated after the `\\paper` call.\nIf this does not work automatically,\nit means that you are using an old version of `memoir` where `\\memendofchapterhook` is undefined.\nThen you have two options:\nEither update your installation of `memoir`\n(You can download the newest version from [CTAN](https://ctan.org/pkg/memoir?lang=en),\nbut you are probably better off updating your entire [TeX distribution](https://www.tug.org/texlive/)),\nor  label the relevant chapters with `\\label[paper]{key}` instead of `\\label{key}`.\n\nEven though an included paper is in reality a chapter,\nyou can use `\\maketitle` combined with `\\title`, `\\author` and `\\thanks`\ninstead of `\\chapter` for the title of the article.\nMoreover,\n`phduio` provides `\\metadata`.\nIt should be called *before* `\\maketitle`.\nThe macro `\\metadata` is used to specify any relevant information about the paper,\nsuch as\n```latex\n\\metadata{Published in...}\n\\metadata{To appear in...}\n\\metadata{Submitted to...}\n\\metadata{Preprint}\n```\n\nSometimes the chapter title is too long for the running header.\nIn that case you have to use `\\chapter` instead of `\\maketitle`\nto provide a shorter title for the header.\nYou can control the title in the header and the table of contents in one of the following two ways:\n```latex\n\\chapter[TOC and running header]{Chapter page}\n\\chapter[TOC][Running header]{Chapter page}\n```\nUsing this method,\nyou must use `\\paperauthors` instead of `\\author`.\nAuthors are separated with `\\and` in the usual fashion.\nIf the list of authors does not break prettily across lines,\nconsider passing `\\raggedright` along the argument to `\\paperauthors`\nor control the line breaks manually with `\\par`:\n```latex\n\\paperauthors\n{\n    \\raggedright\n    First Author\n    \\and\n    ...\n    \\and\n    Last Author\n}\n\\paperauthors\n{\n    First Author\n    \\and\n    Second Author\n    \\and\\par\n    Third Author\n}\n```\n\nWhen using `\\chapter` you have to add the thumb index manually with `\\paperthumb`\n*directly after* `\\chapter` at the start of each paper.\nCompile twice in order to position the thumb index correctly.\nIf the thesis consists of n papers,\nthe height of each thumb index should be `\\paperheight` divded by n.\nYou can specify the number of papers by calling `\\numberofpapers{n}`\n*before* the first invocation of `\\paperthumb`.\n\n#### Including `.tex` files\nIt is notoriously difficult to combine the `.pdf` files of different papers into a thesis.\nNot because it is a technical challenge,\nbut because of inconsistency in style and layout and – more importantly –\nthe thesis is printed on a smaller paper than many articles,\nso they have to be shrunk in order to fit.\nThis can cause the text to have a size which is nearly impossible to read.\nTherefore,\nwe recommend that you include the source code for the papers directly into the thesis whenever possible.\n\nTo do this,\nwe recommend that you change the document class of your paper `filename.tex` to `standalone`.\nWhen you include the paper file into [`main.tex`](main.tex) with `\\include{filename}`,\nthe preamble and the `document` environment in `filename.tex` is ignored.\nIf you have placed `\\author`, `\\title` and `\\thanks` before `\\begin{document}`,\nmake sure to move them out of the preamble.\nAll packages and custom macros used in the paper must also be declared in the preamble of the main thesis file.\n\n##### Unmarked footnotes\nSome document classes offer macros to print information\nas unmarked footnotes on the front page of the article.\nIn particular,\n`amsart` provides `subjclass` and `\\keywords`.\nUnmarked footnotes can be specified in `phduio` with `\\papernote`.\nTo ensure that the footnotes appear on the first page of the paper,\nissue `\\papernote` *shortly after* `\\maketitle`.\n\n##### Tables of contents\nThe package `titletoc` lets you add a small table of contents for each chapter with\n```latex\n\\chapter{Title}\n\\startcontents[chapters]\n\\printcontents[chapters]{}{1}{}\n```\nYou can delimit the content with the commands `\\stopcontents[chapters]` and `\\resumecontents[chapters]`,\nbut typically it suffices to put in another call to `\\startcontents[chapters]` at the start of the next chapter.\n\nIf you want subsections to be included in the partial table of contents, print it with\n```latex\n\\printcontents[chapters]{}{1}{\\setcounter{tocdepth}{2}}\n```\n\n##### Appendices\nIf you want appendices at the end of a chapter,\nplace them inside the environment `subappendices`.\nIf you put the declaration `\\unnamedsubappendices` *before* the `subappendices` environment,\nthe subappendix number in the body of the document will *not* be preceded by the value of `\\appendixname`.\nThat is,\nonly the section number will appear,\njust as for a regular section.\n\nIf you are using the package `cleveref`,\nlabel sections inside `subappendices` with `\\label[appendix]{key}` instead of `\\label{key}`,\nso that `\\cref` and `\\Cref` correctly print \"Appendix\" instead of \"Section\".\n\n```latex\n\\unnamedsubappendices\n\\begin{subappendices}\n    \\section{Title}\n    \\label[appendix]{key}\n    ...\n\\end{subappendices}\n```\n\n##### Bibliographies\nIn order to have one bibliography for each paper,\n`biblatex` is loaded with with the option `[refsection = chapter]` in [`phdstyle.sty`](phdstyle.sty).\nThis limits the scope of `\\printbibliography` to the current chapter.\nAlternatively,\nif you only want to limit the scope for some chapters,\nuse the `refsection` environment for the relevant chapters:\n```latex\n\\chapter{Title}\n\\begin{refsection}\n    \\cite{key}\n    ...\n    \\printbibliography[heading = subbibliography]\n\\end{refsection}\n```\nThe optional argument `[heading = subbibliography]` is there to print the bibliography as a section instead of a chapter.\n\nYou do not have to compile all the `.bib` files you used for the different papers into one file.\nYou can include all of them by repeated calls to `\\addbibresource`:\n```latex\n\\usepackage[refsection = chapter]{biblatex}\n\\addbibresource{file1.bib}\n\\addbibresource{file2.bib}\n```\n\n##### Including `.pdf` files\nIf for some reason you have to use the typeset `.pdf` of an article in your thesis,\nor you do not want to adapt its `.tex` file,\nthen you can import the `.pdf` by passing the file name to `\\includearticle`.\nIf necessary,\nthe article is shrunk in order to fit inside the thesis,\nwhich can make the text difficult to read.\nThe article begins on the next right-hand page of the thesis.\n\nBy default,\n`includearticle` prints the normal page numbers on top of the article,\nbut omits the running header.\nIf the page numbers in the thesis are in close proximity to the page numbers in the article,\nyou can lower the thesis page numbers by giving `\\includearticle` the option `[numbers = low]`,\nor remove them with `[numbers = none]`.\n\n### Miscellaneous\nThe university's official colours are available under the names `uiored`, `uiogrey` and `uiolink`.\nThe colon from the university logo can be accessed with `\\uiocolon`.\n\n### Tips for converting to the `phduio` template\nIf you have written a chuck of your thesis prior to using `phduio`,\nit can take some effort to convert the files to the template.\nHere is some advise that can make the transition easier:\n1. Change one file at the time.\nErrors are expect at first,\nand you can be overwhelmed at the number of warnings\nif you try to convert all files at the same time.\n\n2. Together,\n`memoir` and [`phdstyle.sty`](phdstyle.sty) import\nmost of the normal packages.\nTherefore,\nto avoid chaos by importing the same packages multiple times,\nyou should start by not importing any additional packages.\nThen check your error message for missing packages and undefined macros,\nand add those until you have no more errors.\n    \n3. To get all the template specific code correct\nand to avoid code specific for other classes,\nyou can copy text into one of the existing files in the template instead of modifying your own file.\n    \n4. Suppose you have written two papers that use the same macro name,\nbut the macros are defined differently.\nThen you can redefine the macro with `\\renewcommand` at the start of the second of those papers,\nafter the preamble.\n\n5. Suppose that you have written two papers that use the same label.\nThis is not necessarily an issue,\nbut you should search and replace the label in one of the papers to be safe.\n\n## FAQ\n1. **How do I remove labels from the margin?**  \n  Use the document class option [`[final]`](https://github.com/martinhelso/Introduction-to-LaTeX/blob/master/large-documents.md#draft-and-final-options):\n  ```latex\n  \\documentclass[final]{phduio}\n  ```\n\n2. **How do I compile the bibliography?**  \nThe file [`phdstyle.sty`](phdstyle.sty) imports the package `biblatex` with the option `[backend = biber]`.\nTo compile the bibliography,\nrun `biber` on `main.bcf` or change to `[backend = bibtex]` and run `bibtex`.\nIn the latter case,\nyou must run `bibtex` on every `.aux` file created by [`refsection`](#bibliographies).\n\n3. **How do I change the reference and citation style?**  \nThe file [`phdstyle.sty`](phdstyle.sty) imports the package `biblatex` with the option `[style = alphabetic]`.\nReplace `alphabetic` with another [style name](https://www.overleaf.com/learn/latex/Biblatex_citation_styles).\n\n4. **Why do I get an error saying `giveninits` is undefined?**  \nThe file [`phdstyle.sty`](phdstyle.sty) imports the package `biblatex` with the option `[giveninits = true]`.\nThe error indicates that you have installed an old version of `biblatex`.\nThe best solution is to update your TeX distribution to the latest version.\nAlternatively, change `giveninits` to `firstinits`.\n\n5. **Why is `\\citet` and `\\citep` not working?**  \nThese commands are not defined in `biblatex`;\ntheir analogues are called `\\cite` and `\\parencite`,\nrespectively.\nIf you use an author-year citation style,\nyou can define `\\citet` and `\\citep` to issue their counterparts by adding the following to the preamble:\n```latex\n\\let\\citet\\cite\n\\let\\citep\\parencite\n```\nIf you are using a numerical citation style,\n`\\citet`behaves differently than `\\cite`.\nIn this case,\nadd instead the following to the preamble:\n```latex\n\\RequirePackage{xparse}\n\\NewDocumentCommand{\\citet}{oom}\n{\n    \\citeauthor{#3}~%\n    \\IfValueTF{#1}\n    {%\n        \\IfValueTF{#2}\n        {\\cite[#1][#2]{#3}}\n        {\\cite[#1]{#3}}\n    }\n    {\\cite{#3}}\n}\n\\let\\citep\\parencite\n```\n\n6. **How can I use *fragile* macros inside `\\title` or `\\author`?**  \nAdd `\\protect` before the fragile macro.\n\n7. **Why is the paper number reset to I?**  \nMost likely the previous paper initialises appendices with the global macro `\\appendix`,\nwhich resets the chapter counter.\nInstead,\nthe appendices should be placed inside the local environment [`\\begin{subappendices} ... \\end{subappendices}`](#appendices).\n\n8. **Why are some chapters preceded by a blank page?**  \nBy the formal [layout requirements](https://www.mn.uio.no/english/research/phd/thesis-adjudication/layout/),\nchapters should start on a recto page.\nA blank page is inserted if this does not occur naturally.\n\n9. **Why is some text missing from included articlces?**\nThis issue occurs if the fonts in the article PDF are not embedded. You must ensure that all fonts in article PDF are available. The inclusion of all fonts from the PDF can be forced by setting `\\pdfinclusioncopyfonts = 1`. Note that this will increase the file size of your thesis.\n\n## Contact information\nIf you need further assistance with the template,\nyou may send an e-mail to [latexguru@ub.uio.no](mailto:latexguru@ub.uio.no).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuio-latex%2Fphduio-article-based","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuio-latex%2Fphduio-article-based","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuio-latex%2Fphduio-article-based/lists"}