大家好,我对 LaTeX 还很陌生,所以任何帮助我都会很感激。我有下面的代码,由于某种原因,由于许多错误(主要是由于错误文件和未定义的控制序列),我无法运行它。我也将错误代码附加到此帖子中。如果您能运行我的代码并查看哪里出了问题我将不胜感激!!!
\documentclass[10pt]{article}
\usepackage[usenames]{color} %used for font color
\usepackage{amssymb} %maths
\usepackage{amsmath} %maths
\usepackage{graphicx}
\usepackage{booktabs}
\graphicspath{/}
\section{1.6}
\paragraph{6.} \mbox{} \\ \\ \\ \\ \\ \\
\section{1.7}
\paragraph{8} Yes. $ \\ \\ \null \quad \quad \overline{A \cup B} $ \mbox{}: \\ \\ \null \quad \includegraphics{vennd} \\ \\ \null \quad \quad $\overline{A} \cap \overline{B} $ : \\ \null \quad \includegraphics{vennd}
\section{1.8}
\paragraph{6a} $ [0,2] \cup [0,3] \cup [0,4] \cup \dots = [0,\infty) $
\paragraph{6b} $ [0,2] \cap [0,3] \cap [0,4] \cap \dots = [0,2] $
\section{2.1}
\paragraph{6} Statement is true.
\paragraph{14} Not a Statement
\section{2.2}
\paragraph{8.} $ P = (x = 0) \\ \null \quad \quad Q = (y = y) \\ \null \quad \quad P \lor Q $
\section{2.3}
\paragraph{2} If a function is continuous, then it is differentiable.
\section{2.4}
\paragraph{4} $ a \in \mathbb{Q} \iff 5a \in \mathbb{Q} $
\section{2.5}
\paragraph{4}
\begin{center}
\begin{tabular}{|c|c|c|c|c|c|}
$P$ & $Q$ & $P \or Q$ & $\lnot{(P \lor Q)}$ & $\lnot{P}$ & $\not{(P \lor \lnot{P}$ \\ \midrule
T & T & T & F & F & F \\
T & F & T & F & F & F \\
F & T & T & F & T & T \\
F & F & F & T & T & T \\
\end{tabular}
\end{center}
\paragraph{8}
\begin{center}
\begin{tabular}{cccccc}
$P$ & $Q$ & $R$ & $\lnot{R}$ & $Q \land \lnot{R}$ & $P \lor )Q \land \lnot{R})$ \\midrule
T & T & T & F & F & T
T & T & F & T & T & T
T & F & T & F & F & F
T & F & F & T & F & T
F & T & T & F & F & F
F & T & F & T & T & T
F & F & T & F & F & F
F & F & F & T & F & F
\end{tabular}
\end{center}
\paragraph{10} Suppose $((P \land Q) \lor R) \imlies (R \lor S)$ is false. \\ Then, $ R = true must be false, therefore $$ R = false, S = false $. \\ Also, $ ((P \land Q) \lor R)$ must be t $ R = false $ then $ (P \land Q) $ must be true. Therefore $ P = true, Q = true $
\section{2.6}
\paragraph{2}
\begin{center}
\begin{tabular}{cccccc}
$P$ & $Q$ & $R$ $Q\land R$ & $P \lor (Q \land R)$ & $P \lor Q$ & $(P \lor R) $ \\ \midrule
\end{tabular}
\end{center}
\paragraph{10}
Yes. \\
\begin{equation}
\begin{split}
(P \implies Q) \lor R & \stackrel{?}{=} \lnot((O \land \lnot{Q}) \land \lnot{R}) \stackrel{?}{=} (\lnot (P \land \lnot{Q}) \lor R) \\ & \stackrel{?}{=} ((\lnot{P} \lor R) \\ (\lnot P \lorQ) \lor R & = ((\lnot{P} \lor Q) \lor R)
\end{split}
\end{equation}
Since $ P\implies Q $ is logically equivalent to $ \lnot P \lor Q $ :
\begin{center}
\begin{tabular}{|c|c|c|c|c|}
$P$ & $Q$ & $P \implies Q$ & $\lnot P$ & $ \lnot P \lor Q $ \\ \midrule
T & T & T & F & T \\
T & F & F & F & F \\
F & T & T & T & T \\
F & F & T & T & T \\
\end{tabular}
\end{center}
\end{document}
答案1
在某些情况下,预期的输出是什么并不清楚,但这会产生我认为您想要的输出,没有错误或警告。我在进行更改的代码中内联了注释。
\documentclass[10pt]{article}
\usepackage[usenames]{color} %used for font color
\usepackage{amssymb} %maths
\usepackage{amsmath} %maths
\usepackage{graphicx}
\usepackage{booktabs}
% only if your images are at the root of the filesystem
% \graphicspath{/}
% \begin{document} was missing
\begin{document}
% \\ \\ \\ \\ \\ \\
% make badness 10000 warnings (which is the maximum badness)
% \section{1.6} makes 1 1.6 which looks weird
\setcounter{section}{1}
\setcounter{subsection}{6}
\subsection{}
\subsubsection*{6.}
\subsection{}
\subsubsection*{8} Yes.
$\overline{A \cup B} $\\
\includegraphics[height=1em]{example-image} % missing file {vennd}
$\overline{A} \cap \overline{B} $\\
\includegraphics[height=1em]{example-image} % missing file {vennd}
\stepcounter{section}
\subsection{}
\subsubsection*{6a} $ [0,2] \cup [0,3] \cup [0,4] \cup \dots = [0,\infty) $
\subsubsection*{6b} $ [0,2] \cap [0,3] \cap [0,4] \cap \dots = [0,2] $
\subsection{}
\subsubsection*{6} Statement is true.
\subsubsection*{14} Not a Statement
\subsection{}
\subsubsection*{8.} $ P = (x = 0) \\ \null \quad \quad Q = (y = y) \\ \null \quad \quad P \lor Q $
\subsection{}
\subsubsection*{2} If a function is continuous, then it is differentiable.
\subsection{}
\subsubsection*{4} $ a \in \mathbb{Q} \iff 5a \in \mathbb{Q} $
\subsection{}
\subsubsection*{4}
\begin{center}
\begin{tabular}{|c|c|c|c|c|c|}
$P$ & $Q$ & $P
% \lor not \or
\lor
% spurious {
Q$ & $\lnot{(P \lor Q)}$ & $\lnot{P}$ & $\not(P \lor \lnot{P}$ \\ \midrule
T & T & T & F & F & F \\
T & F & T & F & F & F \\
F & T & T & F & T & T \\
F & F & F & T & T & T \\
\end{tabular}
\end{center}
\subsubsection*{8}
\begin{center}
\begin{tabular}{cccccc}
$P$ & $Q$ & $R$ & $\lnot{R}$ & $Q \land \lnot{R}$ & $P \lor )Q \land \lnot{R})$ \\midrule
T & T & T & F & F & T \\
T & T & F & T & T & T \\
T & F & T & F & F & F \\
T & F & F & T & F & T \\
F & T & T & F & F & F \\
F & T & F & T & T & T \\
F & F & T & F & F & F \\
F & F & F & T & F & F
\end{tabular}
\end{center}
\subsubsection*{10} Suppose $((P \land Q) \lor R)
% \implies not \imlies
\implies (R \lor S)$ is false. \\ Then, $ R = true must be false, therefore $$ R = false, S = false $. \\ Also, $ ((P \land Q) \lor R)$ must be t $ R = false $ then $ (P \land Q) $ must be true. Therefore $ P = true, Q = true $
\subsection{}
\subsubsection*{2}
\begin{center}
\begin{tabular}{cccccc}
$P$ & $Q$ & $R$ $Q\land R$ & $P \lor (Q \land R)$ & $P \lor Q$ & $(P \lor R) $ \\ \midrule
\end{tabular}
\end{center}
\subsubsection*{10}
Yes.% never use \\ before a display math or at the end of a paragraph
\begin{equation}
\begin{split}
(P \implies Q) \lor R & \stackrel{?}{=} \lnot((O \land \lnot{Q})
\land \lnot{R}) \stackrel{?}{=} (\lnot (P \land \lnot{Q}) \lor R) \\
& \stackrel{?}{=} ((\lnot{P} \lor R) \\ (\lnot P
% \\lor Q not \lorQ
\lor Q) \lor R & = ((\lnot{P} \lor Q) \lor R)
\end{split}
\end{equation}
Since $ P\implies Q $ is logically equivalent to $ \lnot P \lor Q $ :
\begin{center}
\begin{tabular}{|c|c|c|c|c|}
$P$ & $Q$ & $P \implies Q$ & $\lnot P$ & $ \lnot P \lor Q $ \\ \midrule
T & T & T & F & T \\
T & F & F & F & F \\
F & T & T & T & T \\
F & F & T & T & T \\
\end{tabular}
\end{center}
\end{document}