我今天才开始学习 LaTeX。我尝试以 TeX 格式写一些笔记,但当我尝试构建它时,我遇到了很多错误。你能看看它并找出问题所在吗?谢谢。
\documentclass{article}
\begin{document}
\title{Foundations of CS, Lecture 1}
\author{Ryan}
\date{January 23, 2014}
\maketitle
\textbf{Proposition} - a declarative statement that is either True or False.
\begin{itemize}
\item Atomic proposition - basic proposition
\item Compound proposition - complex proposition that is built upon smaller ones
\begin{itemize}
\item Negation - \lnot p
\item Conjunction - p \land q
\item Dis-junction - p \lor q
\item Implication - p \rightarrow q
\item Bi-conditional - p \longleftrightarrow q
\end{itemize}
\end{itemize}
For a statement p -> q, there are several related statements:
\begin{itemize}
\item Converse: q \rightarrow p
\item Contrapositive: \lnot q \rightarrow \lnot p
\item Inverse: \lnot p \rightarrow \lnot q
\end{itemize}
\textbf{Logical Equivalency} - Two propositions are logically equivalent
if they have the same truth table.
\begin{itemize}
\item \textbf{Example: }Is p \rightarrow q equivalent to \lnot q \rightarrow \lnot p?
Truth table goes here
\end{itemize}
\textbf{Precedence of Logical Operators}
Table goes here
\begin{itemize}
\item Tautology - proposition that is always True
\item Contradiction - proposition that is always False
\item Contingency - proposition that is neither True or False
\begin{itemize}
\item For example, p
\end{itemize}
\end{itemize}
\end{document}
答案1
数学内容需要处于数学模式。一旦我添加 a$
以开始数学模式和 a$
以结束数学模式,我就会得到:
笔记:
你还漏掉了
\
an 中的a\lnot
。除此之外,主要的问题是当你有数学符号时你没有处于数学模式。虽然我使用
$
进入和退出数学模式,但推荐的方法是使用\(
开始数学模式,然后使用\)
结束数学模式,如下所示:对于数学模式来说,\( 和 \) 是否比美元符号更可取?。对于您很快就会用到的显示数学,您应该参考为什么 \[ ... \] 比 $$ ... $$ 更可取?。
关于数学模式的一个很好的参考是 Herbert Voss 的 对 (La)TeX 中的数学进行全面回顾。
根据 Mico 的建议,我已将 替换
-
为更符合印刷规范的破折号---
。请参阅破折号:- 与 – 与 —有关破折号的更多详细信息。我个人建议将其替换为:
。
代码:
\documentclass{article}
\begin{document}
\title{Foundations of CS, Lecture 1}
\author{Ryan}
\date{January 23, 2014}
\maketitle
\textbf{Proposition} - a declarative statement that is either True or False.
\begin{itemize}
\item Atomic proposition - basic proposition
\item Compound proposition - complex proposition that is built upon smaller ones
\begin{itemize}
\item Negation --- $\lnot p$
\item Conjunction --- $p \land q$
\item Dis-junction --- $p \lor q$
\item Implication --- $p \rightarrow q$
\item Bi-conditional --- $p \longleftrightarrow q$
\end{itemize}
\end{itemize}
For a statement $p \to q$, there are several related statements:
\begin{itemize}
\item Converse: $q \rightarrow p$
\item Contrapositive: $\lnot q \rightarrow \lnot p$
\item Inverse: $\lnot p \rightarrow \lnot q$
\end{itemize}
\textbf{Logical Equivalency} - Two propositions are logically equivalent
if they have the same truth table.
\begin{itemize}
\item \textbf{Example: }Is $p \rightarrow q$ equivalent to $\lnot q \rightarrow \lnot p$?
Truth table goes here
\end{itemize}
\textbf{Precedence of Logical Operators}
Table goes here
\begin{itemize}
\item Tautology --- proposition that is always True
\item Contradiction --- proposition that is always False
\item Contingency --- proposition that is neither True or False
\begin{itemize}
\item For example, $p$
\end{itemize}
\end{itemize}
\end{document}