A reference card / cheat sheet for choosing the right kind of function parameter to receive and return objects in C++ functions. Download reference card.
C++ gives fine-grained control over argument passing and returning that many options exits. There’s been enough over-thinking and discussions in the community. Thankfully experts have noticed this and have arrived at sane defaults. Since the options are more and involved, having a ready reckoner is useful when coding.
The reference card is written in the venerated Org mode.
- Emacs with Org mode
- CheatSheet by Musa Al-hassy
- pdfTeX with some additional packages
- Pygments for syntax highlighting (
$PATH
should havepygmentize
; optional)
On Arch Linux, I’d to install these packages
texlive-bin
(forpdflatex
)texlive-latexextra
(forwrapfig.sty
)texlive-fontsextra
(forbbold.sty
)texlive-science
(for mathematic symbolsstmaryrd.sty
; optional)community/pygmentize
As a single command
yay -S --needed extra/texlive-latexextra extra/texlive-fontsextra extra/texlive-science community/pygmentize
Other Linux repositories should have equivalent packages to get these.
- org-plus-contrib (from https://orgmode.org/elpa/)
- org-ref (optional, for citations, bibliography, …)
Append this to your Emacs configuration
;; for the the CheatSheetSetup.org section headings to be ignored
(require 'ox-extra)
(ox-extras-activate '(ignore-headlines))
;; for syntax highlighting source blocks
(setq org-latex-listings 'minted
org-latex-packages-alist '(("" "minted"))
org-latex-pdf-process
'("pdflatex -shell-escape -output-directory %o %f"
"biber %b"
"pdflatex -shell-escape -output-directory %o %f"
"pdflatex -shell-escape -output-directory %o %f"))
- Edit
cpp-params-refcard.org
- Save
- Export C-c C-e l o
- Add horizontal rules between sections
- Use mononoki font for monospace using
fontspec
package
- LaTeX cheetsheet template used to prepare Math Cheatsheet by Anton Gerdelan