Skip to content

Your first document

LaTeX Lesson 1 2:02 English narration · English + 中文 subtitles burned in

space play · ←/→ 5s · j/l 10s · f fullscreen · ,/. speed

Chapters

Transcript
LaTeX is how most maths and science documents are made. 大多数数学和科学文档都是用 LaTeX 做出来的。
You do not drag boxes around; you write plain text with commands in it, and a program turns that into a finished PDF. 你不用去拖动框框;你写的是带命令的纯文本, 然后一个程序把它变成一份完成的 PDF。
On this page the compile happens on our server, so you press Run and the page appears beside your code. 在这个页面上,编译发生在我们的服务器上, 所以你按 Run,页面就出现在你的代码旁边。
The trade is simple: you say what it is, and LaTeX decides how it looks. 这笔交易很简单:你说明"它是什么",由 LaTeX 决定它长什么样。
Every LaTeX document has the same two parts. 每一份 LaTeX 文档都有同样的两个部分。
Everything before begin document is the preamble: it says what kind of document this is and loads any extra features, and it appears nowhere on the page. \begin{document} 之前的一切是导言区: 它说明这是哪一类文档、加载额外的功能, 而它不会出现在页面上的任何地方。
Everything between begin document and end document is the body — and the body is the part that becomes the page. \begin{document} 和 \end{document} 之间的一切是正文—— 而正文就是会变成页面的那一部分。
Almost everything you write from here on is a command, and they all have the same shape. 从这里开始,你写的几乎每样东西都是一条命令,而它们的形状都一样。
The backslash says a command starts here. 反斜杠表示"一条命令从这里开始"。
Then comes its name — documentclass. 然后是它的名字——documentclass。
Then braces holding what you are giving it, in this case the word article. 然后是一对花括号,里面装着你要交给它的东西,这里是 article 这个词。
Learn that shape once and every new command is just a new name. 把这个形状记住一次,之后每一条新命令都不过是一个新名字。
Here is the mistake everyone makes once. 这是每个人都会犯一次的错误。
Put a sentence in the preamble and it simply does not come out. 把一句话放在导言区里,它就是不会出来。
It is not lost and it is not an error — the preamble is setup, and setup is never printed. 它没有丢,也不是错误—— 导言区是设置,而设置永远不会被打印。
If something you wrote is missing from the PDF, check first whether it is above begin document. 如果你写的某样东西在 PDF 里不见了, 先检查它是不是在 \begin{document} 上面。
Four things to take with you. 带走四点。
One: you write plain text and commands, and LaTeX sets the page. 第一:你写的是纯文本加命令,由 LaTeX 来排版这一页。
Two: the preamble sets things up and never appears. 第二:导言区做设置,它自己从不出现。
Three: the body, between begin and end, becomes the page. 第三:begin 和 end 之间的正文,才是变成页面的那部分。
Four: a command is a backslash, a name, and braces. 第四:一条命令是:反斜杠、一个名字、一对花括号。
Now write your greeting and press Run. 现在写下你的问候语,然后按 Run。

Log in or create account

IGCSE, A-Level & AP