This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // mpW4d.cpp | |
| #ifndef MPW4D_CPP | |
| #define MPW4D_CPP | |
| #include <boost/multiprecision/cpp_int.hpp> | |
| #include <boost/multiprecision/fwd.hpp> | |
| #include <string> | |
| #include <vector> | |
| struct aStruct { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // words4digits.cpp | |
| #ifndef WORDS4DIGITS | |
| #define WORDS4DIGITS | |
| // in: unsigned long long (ull) | |
| // out: string & | |
| #include <string> | |
| #include <vector> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // mpGroup.cpp | |
| /* | |
| * for digit grouping of boost cpp_int variables | |
| */ | |
| #ifndef MPGROUP | |
| #define MPGROUP | |
| #include <boost/multiprecision/cpp_int.hpp> | |
| #include <iostream> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // timestamp.cpp | |
| #ifndef TIMESTAMP | |
| #define TIMESTAMP | |
| #include <sstream> | |
| #include <string> | |
| void timestamp(std::string &, bool = true, bool = true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % brackets may be (...), [...], \{...\}, or left out | |
| \[ | |
| \left[ | |
| \begin{array}{cc} | |
| a & b \\ | |
| c & d | |
| \end{array} | |
| \right] | |
| \] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \[ | |
| \begin{split} | |
| a = {}& b + c \\ | |
| {}& + d + e \\ | |
| \end{split} | |
| \] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % requires amsmath; align* for no eq. number | |
| \begin{align} | |
| x &= y + z \\ | |
| x &= y + z | |
| \end{align} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % Requires the booktabs if the memoir class is not being used | |
| \begin{table}[htbp] | |
| \centering | |
| %\topcaption{Table captions are better up top} % requires the topcapt package | |
| \begin{tabular}{@{} lcr @{}} % Column formatting, @{} suppresses leading/trailing space | |
| \toprule | |
| \multicolumn{2}{c}{Item} \\ | |
| \cmidrule(r){1-2} % Partial rule. (r) trims the line a little bit on the right; (l) & (lr) also possible | |
| Animal & Description & Price (\$)\\ | |
| \midrule |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \begin{figure}[htbp] | |
| \centering | |
| \includegraphics{example.jpg} % requires the graphicx package | |
| \caption{example caption} | |
| \label{fig:example} | |
| \end{figure} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \documentclass[12pt]{article} | |
| \usepackage{amsmath,amssymb} % Better maths support & more symbols | |
| \usepackage{array} % for better arrays (eg matrices) in maths | |
| \usepackage{bm} % Define \bm{} to use bold math fonts | |
| \usepackage{booktabs} % for much better looking tables | |
| \usepackage{fancyhdr} % This should be set AFTER setting up the page geometry | |
| \usepackage{flafter} % Don't place floats before their definition | |
| \usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots. | |
| \usepackage{graphicx} % makes drawing easier | |
| \usepackage{epstopdf} % graphics conversion |
NewerOlder