15 September 2018






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



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.


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:



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/gs -> /usr/local/bin/gs-noX11
/usr/local/share/man/man1/eps2eps.1 -> /usr/local/share/man/man1/ps2ps.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/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

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.