LaTeX

2021-06-26

  • 1 Basics
  • 2 Tips
    • 2.1 Style
      • 2.1.1 Put definition on a new line
    • 2.2 Packages
      • 2.2.1 Change the TexLive repository
      • 2.2.2 Find needed package with tlmgr
    • 2.3 Fonts
      • 2.3.1 Use Times New Roman font
    • 2.4 Bibtex
      • 2.4.1 Escape the & (ampersand) character
    • 2.5 CJK
      • 2.5.1 Replace CJKnumb with zhnumber

1 Basics

2 Tips

2.1 Style

2.1.1 Put definition on a new line

Use \hfill

\documentclass{article}
\begin{document}
\begin{description}
  \item[First] \hfill \\ The first item
  \item[Second] \hfill \\ The second item
  \item[Third] \hfill \\ The third etc \ldots
\end{description}
\end{document}

2.2 Packages

2.2.1 Change the TexLive repository

tlmgr option repository https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet

2.2.2 Find needed package with tlmgr

$ tlmgr search --global --file cfr-lm.sty
tlmgr: package repository http://mirror.ox.ac.uk/sites/ctan.org/systems/texlive/tlnet
cfr-lm:
        texmf-dist/tex/latex/cfr-lm/cfr-lm.sty

2.3 Fonts

2.3.1 Use Times New Roman font

Windows 中使用的 Times New Roman 是 Monotype 在最初字形上稍加修改(字宽方面)得到的。macOS 系统中使用的 Times Roman 是 Linotype 公司出品的,它与 Monotype 家的 Times New Roman 除了个别字形稍有区别之外(相信你看不出来),几乎完全相同。开源系统中对应的字体,则是 URW 的 Nimbus Roman No9 L 字体,它在 GPL 许可下发布。

简单来说,你在 Windows 里接触最多的 Times 字体是 Monotype 出品的 Times New Roman;在 macOS 里接触的是 Linotype 家的 Times Roman;开源环境你能见到最多的是 URW 的 Nimbus Roman No9 L 字体。而它们几乎没有差别。

Recommend way: use fontspec.

\documentclass{article}
\usepackage{mathspec}
\setmainfont{Times New Roman}
\setmathsfont{Times New Roman}
\begin{document}
This is the typeface Times New Roman.

Enjoy!
\end{document}

Reference

2.4 Bibtex

2.4.1 Escape the & (ampersand) character

publisher = {Harold \& Maude},

2.5 CJK

2.5.1 Replace CJKnumb with zhnumber

Check this Github commit: bump to v2.6, change CJKnumb with zhnumber and update relevant commands..

.
Created on 2021-06-26 with pandoc