henrison /
custom-tex
Personal LaTeX and related miscellaneous files
49/100 healthLoading repository data…
jakewilliami / repository
Miscellaneous personal LaTeX macros ordered by topic of my most commonly used packages and functions
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
This repository will show the progression of my macros used on LaTeX, in order to a) keep track of history of my macros, and b) extend my (currently limited) knowledge of Git and GitHub. I hope that this provides good coding practice for any future coding-related endeavours.
TODO: redo this whole readme - and see archive: https://github.com/jakewilliami/tex-macros/tree/6ca86a43a9ffa84f36d7fa312b91edc8d7d17455/archive
Clone the repository
$ git clone https://github.com/jakewilliami/tex-macros.git
We also recommend you clone the helper programme mktex:
$ git clone https://github.com/jakewilliami/mktex.git
The templates have a TeXShop shebang at the top (typically telling TeXShip to use pdflatexmk. We also suggest considering pdflatexmk.py (Which allows BibTeX to work). You can configure TeXShop to recognise this engine: press ⌘ + , and click on the Engine tab. In the pdflatexmk box, I have
/Library/TeX/Root/bin/pdflatexmk.py --file-line-error --synctex=1
See also mktex -h.
Happy LaTeX-ing!
We have the following subdirectories in the current project:
macros/: Primary personal macros (common patterns I don't want to rewrite so I keep them standardised in one place);class/: Custom classes (using personal macros);templates/: High-level project templates. Some of these are used by my mktex script for classes;examples/: Examples (mostly of figures) that can be easily copied and adapted. Most of them have associated PDFs so that you don't have to compile them yourself. I can't speak to their correctness as most of them probably compiled years ago;archive/: Archive of files before The Big Refactor.Make sure you have LaTeX installed. I use MacTeX from Homebrew. On most Linux systems you can simply install TeXLive directly. Consider also TeXmaker for editing and compiling.
To get the font Garamond on any Unix machine, I ran:
cd /tmp && \
curl --remote-name https://www.tug.org/fonts/getnonfreefonts/install-getnonfreefonts && \
sudo texlua install-getnonfreefonts && \
sudo getnonfreefonts --sys --force --all && \
cd - > /dev/null && \
echo -e "\u001b[1;38;5;2mFont \`garamondx\` installed successfully.\u001b[0;38m"
It should be noted that I have had issues with Garamondx on Arch particularly. It works, and then I get the error /usr/share/texmf-dist/tex/latex/filehook-scrlfile.sty Error; ! Package filehook Error: Detected 'scrlfile' package with unknown definition of \InputFileExists. Use the 'force' option of 'filehook' to overwrite it. Here are some potential fixes:
garamondx may work, though this is annoying.chemmacros package; adding \PassOptionsToPackage{force}{filehook} to your preamble (before adding everything else).It should also be noted that since upgrading to BigSur, I had to download the file that getnonfreefonts uses and make wget ignore the certificate in order to download. However, before attempting to troubleshoot, try running the above script again, as I just did so after it failing and it worked...
Flow Charts— Flow charts are easy enough to make with TiKz. We are okay here. Some plots are also okay to make in TiKz; see examples.
Dot Graphs—
For graph theory, I tend to use GraphViz. Of course, nothing can beat TiKz sometimes, but for help with transfering .dot files into TeX, run mkgraph -h.
Plots—
Another option specific to plotting is to use Python. For integration of Python into LaTeX, see pythontex, a tool that allows python code within a LaTeX document. See also tikzplotlib for transfering python graphs to TiKz. If this is not producing great results, try exporting as pdf from matplotlib directly.
One such plot I have made a script for are Slope Fields. For installation of this script, run mksfield -h. I also downloaded pdflatex.py for removal of auxilary files to a temporary directory. To get the former (pythontex), you can simply run the following in any desired directory: pytex -h.
Figures— Please see examples for some figures.
Selected from shared topics, language and repository description—not editorial ratings.
henrison /
Personal LaTeX and related miscellaneous files
49/100 health