Abertay Ethical Hacking Society
  • Home
  • Information
    • Constitution
    • Change Logs
      • Website
      • Discord
      • Github
      • Server
    • Meetings
      • 2021-2022
    • Honourary Members
  • Contributing
    • Contributions
      • Using Git
      • Formatting and Best Practise
  • Society Events
    • Securi-Tay
      • History
  • Help Guides
    • Programming / Scripting
      • AWK
      • Bash Scripting
      • C Coding
      • Java Coding
      • LaTeX
      • Markdown
      • Project Ideas
      • Python Scripting
      • Tools
    • Software
      • Operating Systems
        • Installing Arch
        • Installing Kali
        • Linux Commands for Beginners
        • MacOS
      • Tools
        • PGP
          • A guide to using PGP on Android
          • A guide to using PGP on macOS
          • PGP
        • Radare2
        • Nmap
        • Regular Expressions
        • The Browser Exploitation Framework (BeEF)
        • Vim
        • Vimium
        • Zsh
    • Networking
      • Domain Name System (DNS)
      • Remote access to your Abertay network drive
      • Secure Shell (SSH)
      • TLS 1.3
      • Wireshark
      • Subnetting
    • Techniques
      • A guide to creating malicious macro-enabled Excel worksheets
      • Open Source Intelligence (OSINT)
      • Google-Fu
    • Jobs
      • Common Interview Questions
    • Home Lab
      • PiHole
  • Glossary
    • Infosec Terms
    • Computing Terms
    • Hardware Terms
    • General Terms
    • Development Terms
    • Networking Terms
  • Members
    • Profiles
      • AG
      • Isaac
      • Sam
  • Other
    • Other
      • Data Dumps
      • Meetups
      • Meltdown & Spectre
      • Movies
      • Project topic suggestions
      • Recommended Reading
Powered by GitBook
On this page
  • Get LaTeX
  • Manually Package Management
  • Install Package
  • Update Packages
  • Compiling Tex to PDF
  • MacOS, Linux and Windows
  • Shit You Might Encounter While Compiling
  • Editors
  • Referencing
  • Formatting
  • Tilde
  • Page Breaks
  • Templates
  • Syntax Highlighting
  • Packages
  • textcomp
  • Resources

Was this helpful?

  1. Help Guides
  2. Programming / Scripting

LaTeX

PreviousJava CodingNextMarkdown

Last updated 3 years ago

Was this helpful?

“LaTeX, which is pronounced «Lah-tech» or «Lay-tech», is a document preparation system for high-quality typesetting. It is most often used for medium-to-large technical or scientific documents but it can be used for almost any form of publishing.”

Get LaTeX

  • (Required)

  • Windows

    • (Required)

  • Linux

    • (Required)

Manually Package Management

On *nix systems tlmgr can be used to install and update packages from the command line.

Install Package

If you're on macOS and have opted for the smaller BasicTeX instead of the full install you won't have access to the \author or \affil commands provided by the authblk package. You'll need to install it manually.

To get access to authblk we need to install the preprint bundle via: sudo tlmgr install preprint

Update Packages

Executing sudo tlmgr update –list will display which packages need to be updated.

Executing sudo tlmgr update –all will actually update them.

Compiling Tex to PDF

MacOS, Linux and Windows

cd Into the directory containing your .tex and .bib files and run:

  1. pdflatex whitepaper.tex

To build your Bibliography run:

  1. pdflatex whitepaper.tex

  2. bibtex whitepaper.aux

  3. pdflatex whitepaper.tex

To build your Glossary run:

  1. pdflatex whitepaper.tex

  2. makeglossaries whitepaper

  3. pdflatex whitepaper.tex

Shit You Might Encounter While Compiling

  • When using the glossaries package the \printglossaries command wont print your Glossary if you've suppressed page numbers with \pagenumbering{gobble}

Editors

Referencing

From September 2017, Abertay adopted the Cite Them Right version of Harvard

When referencing a website the references page entry should look like:

  National Literacy Trust (2011) Policy. Available at: http://www.literacytrust.org.uk/policy
  (Accessed: 7 January 2011).

The in-text citation should look like:

  (National Literacy Trust, 2011)

The natbib package can be used to achieve this referencing style. The following should be in your preamble:

  \usepackage{natbib}
  \setcitestyle{aysep={,}}

The following should be placed wherever you want your References page rendered:

  \bibliographystyle{agsm}
  \bibliography{bibfile}

The following entry in your .bib file will produce the correct reference page entry:

  @misc{nlt_2011,
  title={Policy},
  author={{N}ational {L}iteracy {T}rust},
  year={2011},
  Howpublished={Available at: \url{www.literacytrust.org.uk/policy}},
  Note={(Accessed: February 22nd, 2017)}
  }

Formatting

Tilde

\newcommand\customtilderaise.17ex_hbox_scriptstyle_mathtt_sim}

Usage: Cost \customtilde \$10,000

Page Breaks

In situations like a chapter start it is advisable to end the previous chapter with a \clearpage to flush out all floats, but in other situations this might result fairly empty pages with only floats on them which may or may not be desired.

A second difference is \clearpage actually always starts a new “page” while \newpage really only ends the current column.

Templates

  • Template for 4th year dissertation proposal (two-column) – Two column proposal template

  • Template for 4th year dissertation (one column, 1.5 line spaced with special documentation pages and title page) – Dissertation Template with Bibliography and LoT and LoF

Syntax Highlighting

  \usepackage{listings}
  \usepackage{color}

  \definecolor{codegreen}{rgb}{0,0.6,0}
  \definecolor{codegray}{rgb}{0.5,0.5,0.5}
  \definecolor{codepurple}{rgb}{0.58,0,0.82}
  \definecolor{backcolour}{rgb}{0.95,0.95,0.92}

  \lstdefinestyle{mystyle}{
      backgroundcolor=\color{backcolour},   
      commentstyle=\color{codegreen},
      keywordstyle=\color{magenta},
      numberstyle=\tiny\color{codegray},
      stringstyle=\color{codepurple},
      basicstyle=\footnotesize,
      breakatwhitespace=false,         
      breaklines=true,                 
      captionpos=b,                    
      keepspaces=true,                 
      numbers=left,                    
      numbersep=5pt,                  
      showspaces=false,                
      showstringspaces=false,
      showtabs=false,                  
      tabsize=2
  }

Then use

  \begin{lstlisting}[language=Python,style=MyStyle]
      Radge code
  \end{lstlisting}

Packages

textcomp

Enables support for Text Companion fonts such as legal, currency and mathematical symbols.

  \usepackage{textcomp}

  A\textrightarrow B
  10\textcelsius
  Sony\texttrademark

Resources

The for authblk states “The pack­age is part of the bun­dle.”.

“Simple LaTeX editor” [Linux & Windows]

Credit to for putting in most of the leg work on this.

Create pretty tables and paste in auto generated Tex

“Many problems in LaTeX requires some research, so I started to record my findings.”

What is the difference between TeX and LaTeX?
MacOS
MiKTeX
TexMaker
proTeXt
TeX Live
Tex Live
Source
CTAN page
preprint
gummi
Rory
Source
Source
tablesgenerator.com
Tex StackExchange
Awesome Documentation that 'just works'
The Comprehensive LATEX Symbol List
Arbitrary LaTeX Reference