Aside from technical things, I’m about to turn 25 years old (in roughly 16 days). I feel a sense of accomplishment for making it this far in life, but I’m not sure where this new number fits in my life. Maybe this feeling will go away, I’d like to write about that. I’ve been putting off writing for a long time now. My girlfriend, Emily, has tried pushing me to write more often, but I haven’t made it a priority in my life. Recently though, Emily started getting into painting, which has kickstarted some writing inspiration. We’ll see how it goes this year.
This blog post serves as a gentle introduction to LaTeX, the documentation preparation system and documentation markup language.
This semester I decided to write my reports from my Analysis of Algorithms class in LaTeX. This was not a difficult task to accomplish, it actually made writing these reports easier (and prettier). Before diving into installing LaTeX packages and setting up your first LaTeX document, let us begin by looking into the history of LaTeX.
History behind LaTeX
TeX is a typesetting system written by Donald Knuth in 1978 and is still used for typesetting complex math formulas today. LaTeX is written in TeX and, like Tex, was designed “to allow anybody to produce high-quality books using a reasonably minimal amount of effort, and to provide a system that would give exactly the same results on all computers, at any point in time”.
LaTeX/TeX is still quite popular in academia in areas such as mathematics, sciences, and economics. You may have actually read a few books that were written in LaTeX (and you didn’t even know). But, did you also know you can create beautiful resumes and CVs with LaTeX as well? Excited yet? Let’s begin installing LaTeX on your machine!
On *Nix System, just check your distribution’s package manager for “xelatex”.
If you have any issues installing LaTeX, just follow this link for more download instructions.
This is an example from a report I wrote in my Analysis of Algorithms class. Remember that LaTeX can still be used for all kinds of documents (not just computer science reports).
Above is a portion of code that serves as the “header” of your LaTeX document. The header of the page includes the documentclass, packages, specific fonts, etc. The “header” can be extended to include much more than this including custom layouts for various kinds of documents.
You can look here for more information on creating your own .sty files.
Above is the portion of code that makes up the “body” of the LaTeX document. The body is where all the contents of your document are contained. In example below, I have included a Title, Author, and Date Tag (which is created by the \maketitle tag), an Algorithm function and an example table of CPU clock cycle times in Milliseconds.
To compile your LaTeX file to pdf format, run the following command.
If you run into any issues on compilation, first read the compilation error and enter ‘r’ to finish compilations.
Many LaTeX concepts can be learned from the example file, however you can learn way more by just diving into LaTeX (which ultimately helped me the most). Also, I feel as though LaTeX has helped me better structure and think through my reports for class. I hope this post was of some use to you!
Please comment below with any questions or concerns. Thanks again!
Lately, I haven’t had very much time to write blog posts and work on the projects that I want to work on. Instead Analysis of Algorithms and undergraduate research has taken a significant portion of my time. However, I did start writing my papers in LaTeX which has actually been a fun experience and pretty easy to learn (and you get pretty reports)! Also, I’ve started to gain in interest in Video Streaming development from the undergraduate research project that I am working on. My time management has been out of wack lately too, need to fix this problem. My algorithms class has been kicking my butt, however I’m enjoying the material I am learning - especially dynamic programming (very interesting concept). You can find the algorithm projects that I have been working on here.