15 September 2018

TeX

Tikz

MetaPost

TeX

XeLaTeX

I have tried many ways to input Chinese characters on macOS. I only suceed with XeLaTeX.

\documentclass{article}
\usepackage{fontspec}
\setromanfont{STSong}
\begin{document}
中文
\end{document}

Algorithms

LATEX Class for the Association for Computing Machinery suggests algorithms, algorithm2e and

There are now several good packages for typese‹ing algorithms [3, 4, 5], and the authors are free to choose their favorite one. … [3] Cristophe Fiorio. algorithm2e.sty—package for algorithms, October 2015. http://www.ctan.org/pkg/algorithm2e.

[4] Rog´erio Brito. Œe algorithms bundle, August 2009. http://www.ctan.org/pkg/algorithms.

[5] Carsten Heinz, Brooks Moses, and Jobst Ho‚mann. Œe Listings Package, June 2015. http://www.ctan.org/pkg/listings.

TALG uses a lot of formats besides the above recommended methods to write algorithms.

  1. algorithms package: last updated on August 24, 2009
  2. listings package: last updated on 2019/02/27
  3. algorithm2e package: last updated on July 18 2017
  4. algorithmicx package: last updated on April 27, 2005

Since 1 and 3 are recommended by ACM, and 3 is more recently updated, 3 is my choice.

Fonts

From https://www.creativebloq.com/typography/free-typewriter-fonts-1131774:

Much like retro fonts, typewriter fonts are a popular choice to incorporate into vintage-style designs. Courier is probably the best known font of this type but there are many free fonts out there to choose from.

From https://www.overleaf.com/learn/latex/XeLaTeX:

Different elements in a LATEX document are formatted with different fonts, for example in a verbatim environment the text is displayed using a typewriter style.

\setmonofont{Courier New} Everithing that must be formatted with a Typewritter font in your document will use the Courier New font. This command has an extra optional parameter inside braces:

References

mactex

brew cask upgrade mactex:

==> Pouring ghostscript-9.26_1.high_sierra.bottle.tar.gz
==> Finishing up
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/dvipdf
Target /usr/local/bin/dvipdf
already exists. You may want to remove it:
  rm '/usr/local/bin/dvipdf'

To force the link and overwrite all conflicting files:
  brew link --overwrite ghostscript

To list all files that would be deleted:
  brew link --overwrite --dry-run ghostscript

Possible conflicting files are:
/usr/local/bin/dvipdf
/usr/local/bin/eps2eps
/usr/local/bin/gs -> /usr/local/bin/gs-noX11
/usr/local/bin/gsbj
/usr/local/bin/gsdj
/usr/local/bin/gsdj500
/usr/local/bin/gslj
/usr/local/bin/gslp
/usr/local/bin/gsnd
/usr/local/bin/lprsetup.sh
/usr/local/bin/pdf2dsc
/usr/local/bin/pdf2ps
/usr/local/bin/pf2afm
/usr/local/bin/pfbtopfa
/usr/local/bin/pphs
/usr/local/bin/printafm
/usr/local/bin/ps2ascii
/usr/local/bin/ps2epsi
/usr/local/bin/ps2pdf
/usr/local/bin/ps2pdf12
/usr/local/bin/ps2pdf13
/usr/local/bin/ps2pdf14
/usr/local/bin/ps2pdfwr
/usr/local/bin/ps2ps
/usr/local/bin/ps2ps2
/usr/local/bin/unix-lpr.sh
/usr/local/share/man/man1/dvipdf.1
/usr/local/share/man/man1/eps2eps.1 -> /usr/local/share/man/man1/ps2ps.1
/usr/local/share/man/man1/gs.1
/usr/local/share/man/man1/gsbj.1 -> /usr/local/share/man/man1/gslp.1
/usr/local/share/man/man1/gsdj.1 -> /usr/local/share/man/man1/gslp.1
/usr/local/share/man/man1/gsdj500.1 -> /usr/local/share/man/man1/gslp.1
/usr/local/share/man/man1/gslj.1 -> /usr/local/share/man/man1/gslp.1
/usr/local/share/man/man1/gslp.1
/usr/local/share/man/man1/gsnd.1
/usr/local/share/man/man1/pdf2dsc.1
/usr/local/share/man/man1/pdf2ps.1
/usr/local/share/man/man1/pf2afm.1
/usr/local/share/man/man1/pfbtopfa.1
/usr/local/share/man/man1/printafm.1
/usr/local/share/man/man1/ps2ascii.1
/usr/local/share/man/man1/ps2epsi.1
/usr/local/share/man/man1/ps2pdf.1
/usr/local/share/man/man1/ps2pdf12.1 -> /usr/local/share/man/man1/ps2pdf.1
/usr/local/share/man/man1/ps2pdf13.1 -> /usr/local/share/man/man1/ps2pdf.1
/usr/local/share/man/man1/ps2pdf14.1 -> /usr/local/share/man/man1/ps2pdf.1
/usr/local/share/man/man1/ps2pdfwr.1
/usr/local/share/man/man1/ps2ps.1

brew link --overwrite --dry-run ghostscript gives:

Would remove:
/usr/local/bin/gs -> /usr/local/bin/gs-noX11

/usr/local/bin/gs does not exist.