Bold, italic and emphasis
LaTeX Lesson 3 2:19 English narration · English + 中文 subtitles burned in
Chapters
Transcript
To change how a word looks, you wrap it in a command — the same backslash, name and braces from lesson one.
要改变一个词的样子,你把它包进一条命令里—— 还是第 1 课里那个反斜杠、名字、花括号。
Textbf sets it bold.
\textbf 让它变粗。
Textit sets it italic.
\textit 让它变斜。
Texttt sets it in a typewriter face, which is what you use for code inside a sentence.
\texttt 让它变成打字机字体,句子里出现代码时就用它。
Three commands, three different shapes, and the wrapping is identical each time.
三条命令,三种不同的形状,而包裹的写法每次都一样。
Now the one worth watching.
现在是值得看的那一个。
Emph does not mean italic; it means "this matters".
\emph 的意思不是"斜体";它的意思是"这个很重要"。
In ordinary upright text it comes out italic, which is what you expect.
在普通的正体文字里,它出来是斜的,这正是你预期的。
But put it inside a passage that is ALREADY italic and it goes upright instead — because italic on italic would show nothing.
但把它放进一段本来就是斜体的文字里,它反而变成正体—— 因为斜体套斜体等于什么都没显示。
Same command, two different shapes: emph asks for contrast and works out what contrast means here.
同一条命令,两种不同的形状: \emph 要的是"对比",并且自己算出在这里对比意味着什么。
So which one do you write?
那你到底该写哪一个?
Use emph when you mean this word matters, and let LaTeX pick the shape.
当你的意思是"这个词很重要"时用 \emph,让 LaTeX 去挑形状。
Use textit when you specifically want italic shapes — a book title, say.
当你确实就是要斜体的形状时用 \textit——比如一个书名。
Use textbf when you specifically want bold.
当你确实就是要粗体时用 \textbf。
The reason to prefer emph in ordinary prose is that if the document's style changes later, your emphasis still follows it.
在普通行文里偏向 \emph 的理由是: 如果这份文档的样式以后变了,你的强调仍然会跟着走。
Two small details separate a LaTeX document from a typed one.
有两个小细节把一份 LaTeX 文档和一份"打出来的"文档区分开。
Quotes: two backticks open and two apostrophes close, and you get proper curly quotes.
引号:两个反引号开始,两个撇号结束,你就得到了真正的弯引号。
The straight typewriter quote leans the same way at both ends, and it is the giveaway of a document nobody set with care.
直的打字机引号在两端是同一个方向的, 而它就是"这份文档没人用心排过"的破绽。
Dashes: two hyphens for a range like ten to twenty, three for a pause in a sentence.
破折号:两个连字符表示范围,比如 10 到 20;三个表示句中的停顿。
Four things to take with you.
带走四点。
One: textbf is bold, textit italic, texttt typewriter.
第一:\textbf 是粗体,\textit 是斜体,\texttt 是等宽。
Two: emph means this matters, and adapts to its surroundings.
第二:\emph 表示"这个重要",并且会随周围环境调整。
Three: two backticks open a quote and two apostrophes close it.
第三:两个反引号开引号,两个撇号收引号。
Four: two hyphens make a range dash, three a pause dash.
第四:两个连字符是范围破折号,三个是停顿破折号。
Now style the sentence and press Run.
现在把那句话排一下,然后按 Run。