{"id":262,"date":"2019-01-31T12:30:21","date_gmt":"2019-01-31T10:30:21","guid":{"rendered":"http:\/\/bitsilla.com\/blog\/?p=262"},"modified":"2020-12-08T00:19:04","modified_gmt":"2020-12-07T22:19:04","slug":"latex-tips-for-your-dissertation-or-project-write-up","status":"publish","type":"post","link":"https:\/\/bitsilla.com\/blog\/2019\/01\/latex-tips-for-your-dissertation-or-project-write-up\/","title":{"rendered":"LaTeX Tips for your Dissertation or Project Write-up"},"content":{"rendered":"\n<p class=\"has-drop-cap\">I see many students who struggle with LaTeX write-ups and who burn in typesetting hell for their mortal sins (hanging lists, anyone?).&nbsp; This post will focus on some of the more sophisticated details to publish a perfectly set document.&nbsp; This post is the first of a two-part series; focusing on LaTeX hints.&nbsp; The <a href=\"https:\/\/bitsilla.com\/blog\/2019\/03\/content-tips-for-your-dissertation-or-project-write-up\/\">second part<\/a> will focus on the actual write-up\/content.<\/p>\n\n\n\n<div class=\"wp-block-image wp-image-312 size-large\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"512\" src=\"http:\/\/bitsilla.com\/blog\/wp-content\/uploads\/2019\/03\/latexthesis-1024x512.jpg\" alt=\"\" class=\"wp-image-312\" srcset=\"https:\/\/bitsilla.com\/blog\/wp-content\/uploads\/2019\/03\/latexthesis-1024x512.jpg 1024w, https:\/\/bitsilla.com\/blog\/wp-content\/uploads\/2019\/03\/latexthesis-300x150.jpg 300w, https:\/\/bitsilla.com\/blog\/wp-content\/uploads\/2019\/03\/latexthesis-768x384.jpg 768w, https:\/\/bitsilla.com\/blog\/wp-content\/uploads\/2019\/03\/latexthesis.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Typesetting your dissertation is a perilous but satisfactory journey<\/figcaption><\/figure><\/div>\n\n\n\n<!--more-->\n\n\n\n<p>Without further ado, these are the tips:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>First things first, you need a proper <a rel=\"noopener noreferrer\" href=\"https:\/\/github.com\/jp-um\/university_of_malta_LaTeX_dissertation_template\" target=\"_blank\">dissertation\/thesis template<\/a>.\u00a0 A good template will guide you a long way, showing you how to organize your work in terms of files and folders<\/li><li>Do not edit the original template, your own customizations should be in your own main\u00a0<code>.tex<\/code> file<\/li><li>Your submission should compile (<code>pdflatex<\/code>), and obvious warnings fixed (these may affect your document in subtle ways).\u00a0 Some warnings (e.g. <code>underfull<\/code>) are harder to fix, and nine times out of ten may be safely ignored.\u00a0 Others are easier to fix (e.g. bibtex), and should be sorted out<\/li><li>Remember the typesetting dogma: If it doesn&#8217;t look good &#8212; it needs fixing! (doh!)<\/li><li>Compile small units (comment out any <code>\\include<\/code> statements which you are not working on).\u00a0 This will save you a ton of time in the long run<\/li><li>Use a version control (e.g. git), with a LaTeX specific <a rel=\"noopener noreferrer\" href=\"https:\/\/github.com\/github\/gitignore\/blob\/master\/TeX.gitignore\" target=\"_blank\">ignore file<\/a>.\u00a0 Make sure to not commit platform specific files, e.g. <code>.DS_Store<\/code><\/li><li>All <code>.tex<\/code>\/<code>.bib<\/code> files for <strong>each<\/strong> chapter should go under their own directory (as shown in the above template)<\/li><li>Figures should go under subdirectory <code>images<\/code> in the root folder.\u00a0 Here, too, you should use subdirectories for each chapter to organize your work<\/li><li>Use proper sectioning\/subsectioning\/subsubsectioning commands.\u00a0 These allow you to organize your work and make it easier for an examiner\/reader to follow<\/li><li>Bibliographic entries do not need <code>url<\/code> (for some entry types, e.g. <code>article<\/code>), <code>eprint<\/code>, <code>DOI<\/code>, <code>pdf<\/code>, <code>keywords<\/code> or <code>abstract<\/code> keys.\u00a0 The important thing is to make sure all the references are consistent with each other<\/li><li>If you have an online resource in your bibliography you then need the <code>url<\/code> (but not for papers) and last accessed timestamp<\/li><li>For references use BibTeX in (one or more) separate <code>.bib<\/code> files.  Do reference manually!<\/li><li>Ideally, you use some reference management software such as Zotero or Mendeley.  These tools export to BibTeX<\/li><li>For more BibTeX tips run <code>texdoc bibtex<\/code> on Linux<\/li><li>A good key for BibTeX entries is the first author surname (all lowercase) followed by the year of publication, e.g. <code>Ebejer2019<\/code>.\u00a0 If you have two or more of these suffix with a, b, c etc.<\/li><li>It is the bibliography style file that determines which fields of a given <code>.bib<\/code> entry are shown, but heed the BibTeX warnings<\/li><li>Take note of capitalization in <code>.bib<\/code> entries.\u00a0 Downloading BiBTeX entries from <em>Cite this<\/em>\u00a0links on journals will inevitably lead to inconsistencies. Use curly brackets to keep letters in publication title, e.g. {C}apitalized.<\/li><li>Take note of accents in<code>.bib<\/code> entries.\u00a0 Also make sure accents in names are correctly typeset, e.g. <code>Sch<span class=\"pl-cce\">\\\"<\/span>{u}tze<\/code>.<\/li><li>Page ranges\u00a0in<code>.bib<\/code> entries should be en-dash, i.e. <code>--<\/code>.\u00a0 \u00a0In LaTeX you should realize the difference between hyphen (<code>-<\/code>), en-dash (<code>--<\/code>) and em-dash (<code>---<\/code>) and how, and where, they are used<\/li><li>Bibliographic entries should have consistent keys (e.g. AuthorYYYY)<\/li><li>Make sure your references are not duplicated.\u00a0 Fix all BibTeX warnings.\u00a0 Ideally, you use some software (e,g, JabRef) to organize your bibliography (sorts entries, uses abbreviations for journals etc.)<\/li><li>Use a non-breaking space between a Figure, Table, or Equation and its number, e.g. Figure~\\ref{fig:jp}<\/li><li>Make sure to index important keywords in your entry (look here for details on how to do this). Multi-page index entries should have paired start and end delimiters<\/li><li>Index entries should be human (not a machine!) readable, with proper capitalizations (for section titles)<\/li><li>Index entries must be meaningful (e.g. overview is not a good index entry, overview of what??)<\/li><li>Do not, for the love of any of your gods, hardcode spaces and line breaks in your document.\u00a0 The template should typeset your document, don&#8217;t fight it<\/li><li>Understand the difference between <code>\\citet<\/code> (reference in text) and <code>\\citep<\/code> (reference in brackets).\u00a0 So &#8220;<code>\\citet{ebejer2019}<\/code> propose that [&#8230;]&#8221; but &#8220;[&#8230;] is an optimization applied when alpha is zero <code>\\citep{ebejer2019}<\/code>.&#8221;<\/li><li>Use one <code>\\citep<\/code> command even for multiple citations, e.g. <code>\\citep{ebejer2019, pace2020}<\/code><\/li><li>Do not hardcode author names ever &#8212; always use \\citep or \\citet commands<\/li><li>Do not hardcode chapter, section, figure, table, equation numbers.  Use \\label and \\ref.<\/li><li>For \\label identifiers use a constant prefix for the entity you want to refer to.  Examples of good labels are: chap:results, sec:background, fig:auc, tab:timings, and eq:bayes.<\/li><li>The punctuation for the sentence goes after the parenthesis of a citation<\/li><li>Do not use double quotes character &#8221; or fancy single quotes character. In LaTeX to get double quotes use &#8220;this&#8221;. For single quotes use `this&#8217;<\/li><li>LaTeX adds spacing after periods, but you don&#8217;t want this after common abbreviations such as e.g., i.e., et al.). To tell LaTeX this is not the end of a sentence, mark the space with a backslash &#8211;e.g.\\ this entry.<\/li><li>URLs should be typeset in \\url, typically in footnotes (i.e. \\footnote{\\url{&#8230;}})<\/li><li>You should use linebreaks (\\\\, \\newline), page breaks and \\noindent sparingly. Again, the template should take care of the typesetting for you<\/li><li>No hanging statements at bottom of page (e.g. The operations which take place are the following: with a list at the top of the next page). Use pagebreak hints to avoid this \\pagebreak[1].\u00a0 Note the number (0 to 4) in square brackets (that is how badly you want the space).\u00a0\u00a0The higher the number, the more insistent the request<\/li><li>Sometimes a chapter ends with a few words on a new page (a hanging sentence).\u00a0 This looks silly and is a waste of your (page) real estate.\u00a0 You can enlarge a single page to stop this from happening using \\enlargethispage{\\baselineskip}.\u00a0 \u00a0Note that \\baselineskip is the amount by which you want to enlarge the page; more specifically the minimum space between the bottom of two successive lines in a paragraph<\/li><li>No text operators (e.g. \\textbf{&#8230;}) inside maths environments (e.g. equation or $&#8230;$)<\/li><li>Do not use above or below in your text, as things may move around and there is no above (on top of page) or below (at end of page). Always use sectioning and internal references (i.e. \\ref)<\/li><li>In between supervisor feedback loops, when you go through various iterations of each chapter it is a good idea to use a tool like <code>latexdiff<\/code>.\u00a0 This will highlight just the differences between versions, reducing correction time.\u00a0 Also note that after your viva-voce, you may be given corrections that need to be highlighted.\u00a0 This tool is a good way to annotate the differences between the final and the submitted (uncorrected) version<\/li><li>For figures and tables use the short caption; e.g.<code>\\caption[Short LoF Caption]{Long, detailed caption}<\/code>. This is to avoid clutter in the list of figures\/tables.<\/li><li>Check out <a rel=\"noopener noreferrer\" href=\"https:\/\/inf.ethz.ch\/personal\/markusp\/teaching\/guides\/guide-tables.pdf\" target=\"_blank\">this guide<\/a> for making beautiful LaTeX tables.<\/li><\/ol>\n\n\n\n<p>Do you have more hints and tips for the budding dissertation writer?&nbsp; If so drop me a comment, an email or a tweet.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I see many students who struggle with LaTeX write-ups and who burn in typesetting hell for their mortal sins (hanging lists, anyone?).&nbsp; This post will focus on some of the more sophisticated details to publish a perfectly set document.&nbsp; This post is the first of a two-part series; focusing on LaTeX hints.&nbsp; The second part [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-262","post","type-post","status-publish","format-standard","hentry","category-students"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pap6Kd-4e","_links":{"self":[{"href":"https:\/\/bitsilla.com\/blog\/wp-json\/wp\/v2\/posts\/262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitsilla.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bitsilla.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bitsilla.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bitsilla.com\/blog\/wp-json\/wp\/v2\/comments?post=262"}],"version-history":[{"count":21,"href":"https:\/\/bitsilla.com\/blog\/wp-json\/wp\/v2\/posts\/262\/revisions"}],"predecessor-version":[{"id":661,"href":"https:\/\/bitsilla.com\/blog\/wp-json\/wp\/v2\/posts\/262\/revisions\/661"}],"wp:attachment":[{"href":"https:\/\/bitsilla.com\/blog\/wp-json\/wp\/v2\/media?parent=262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bitsilla.com\/blog\/wp-json\/wp\/v2\/categories?post=262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bitsilla.com\/blog\/wp-json\/wp\/v2\/tags?post=262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}