This repo contains the LaTex files needed to compile a set of quick reference notes for the course Introduction to Programming II, using the programming language C++, at the University of South Africa.
A PDF can be generated using lualatex, or xelatex. If you want to access pregenerated PDFs, please check the Releases section on the sidebar.
This is a work in progress, with chapters and examples to come.
If you are able, and interested in contributing, please do!
If there is something missing, or something that you feel needs further clarification, please open an issue.
Please fork this repo, make your changes, and then open a pull request.
- Unit 0: COS1511 Reference
- Unit 1: Overloading and Assert Macro
- Unit 2: I/O Streams
- Unit 3: Strings and Vectors
- Unit 4: Pointers and Dynamic Arrays
- Unit 5: Defining Classes
- Unit 6: Friends and Overloaded Operators
- Unit 7: Separate Compilation (Abstract Data Types)
- Unit 8: Recursion
- Unit 9: Inheritance
- Unit 10: Templates
- The file notes.tex contains the general structure and order of the files. Building this file should build all the other
.tex
files, and include them in one.pdf
callednotes.pdf
- Each unit has a separate
tex
file where the notes are written. These are contained in the units folder, with a sepparate folder for each unit. - The styles, commands and packages used are in the package file nostestyles.sty
TeX packages that have been used are:
- babel: Use description environment, and chapter renaming
- changepage: Allow paragraphs to be indented
- enumitem: Used to improve the way lists are displayed
- fancyhdr: Improve header and footer display
- fontenc, unicode-math, xcharter, cabin, xcharter-math, sourcecodepro: Font display
- geometry: Used for document margins
- hyperref: Add PDF bookmarks
- minted: Used to display code with syntax highlighting
- subfiles: Allow
tex
files to be written separately, but built together - tabularray: Better table display and management.
- tcolorbox, adjustbox: Create colored boxes for different environments
- xcolor: Used to get more colors
- xstring: Analyze strings given as arguments to an environment
For intellisense, a list of the commands is added in the package_intellisense folder. These have been written in formats that can be understood by different LaTeX tools.
addfile [input] {<filename>}
: Include or input the file into the document. By default, it includes the file, the optioninput
can be given to input it instead.concept {text}
: Mark specific text as a concept to be learned. Puts the text in bold.nl
: Force a line break within a cell in a tablequestion {text}
: Mark specific text as a question. Puts the text in bold, and adds extra spacing.rulebookend
: Insert a decorative horizontal line at the end of the text.rulechapterend
: Insert a decorative horizontal line at the end of each unit.
codebox {title}
: Colored box used to highlight codedefinition {title}
: Colored box used for highlighting important concepts.example
: Colored box used to highlight examples.exercise {title}
: Colored box used to highlight exercises.indentparagraph
: Indent selected text to the left.sidenote
: Colored box used to indicate extra information.