如何改善我的文档的外观?

如何改善我的文档的外观?

介绍

我从理论计算机科学讲座中输入了一些定义,只是为了好玩。不幸的是,我注意到它看起来不太专业和干净。原因应该是错误的对齐等,但我无法真正改进它,即使我尝试定义定理/定义环境和类似的东西。不幸的是,我的定义看起来仍然很糟糕。


问题

如何改善我的文档的外观?

我希望获得一些建议(关于包、环境、间距、分段等),这将有助于我改进我的文档。
编辑:我希望我所做的每个定义都有真实的定义环境,以便对其进行标记。此外,一些方程式对齐不良(例如“形式语言”的最后一个方程式)。此外,我希望获得一些建议,关于如何使文档看起来更现代(例如通过添加颜色和更改字体)


代码

注意:该文件翻译得不好,因为英语不是我的母语。我只翻译了文档(从德语到英语),以便您理解内容并能根据内容帮助格式化。该文件基本上是 TCS 讲座中的一小段定义列表。

这是我的代码:

\documentclass{memoir}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\title{Computer-Science (Poor translation)}
\author{Doesbaddel}
\date{November 2018}

\begin{document}

\maketitle

    \begin{abstract}
        Note: The file is translated poorly, because English is not my native language. I only translated the document (from german to english), in order that you understand the content and can help with formatting based on it. The file is basically a small list of definitions from the TCS lecture. 
    \end{abstract}


\section{Fundamentals}
Definition: 
    \begin{enumerate}
        \item {\em Finite Alphabet:} Finite set $\Sigma := \{a_1,\dots , a_\Delta\}$ with various objects\\ $a_1, \dots , a_\Delta$
        \item A {\em word/string} $w=(w_1,\dots , w_n)$ with $w_i\in \Sigma$ for $1\leq i \leq n$ is called a concatenation of letters in $\Sigma$.\\
        \emph{The length of} $w$ \emph{is} ${\mid w \mid} := n$\\
            Strings with the length of $n$: $\Sigma^n = \underbrace{\Sigma \times \Sigma \dots \times \Sigma}_{n}$\\
            The empty string is $\lambda$: ${\mid \lambda \mid} := 0$\\
            $\Sigma^* := \bigcup^{\infty}_{n=0} \Sigma^n \text{ is the set of all strings with finite length on } \Sigma.$\\
            $\Sigma^* := \{\lambda\}\text{ is not the empty set, because }\lambda\in\Sigma^*$\\
            $\Sigma^+ := \Sigma^*\backslash \{\lambda\}$
        \item Let $X=(x_1,\dots ,x_n)$, $Y=(y_1,\dots ,y_n)$ then
            \[X.Y:=(x_1,\dots ,x_n,y_1,\dots ,y_m)\] is called the concatenation of $x$ and $y$. $X$ is called the prefix of $XY$; $Y$ is called the Suffix.\\
            Obvious:
                \begin{align*}
                    \mid x.y\mid        &= \mid x\mid +\mid y\mid\\
                    \mid x.\lambda \mid &= \mid \lambda .x\mid = \mid x\mid
                \end{align*}
            Notation: $x.y = xy = x_1x_2\dots x_ny_1y_2\dots y_n$
        \item Any $L\subseteq \Sigma^*$ is called a "formal language" on $\Sigma$.
    \end{enumerate}
Definition: Let $\Sigma$ be a finite alphabet, $L_0,L_1,L_2 \subseteq \Sigma^*$ (free formal languages in the finite alphabet.)
    \begin{enumerate}
        \item $\overline{L} := \Sigma^*\backslash L \text{ compliment of } L$
        \item   $L_1 \cap L_2   := \{ x \in \Sigma^* \mid x \in L_1 \land x \in L_2 \} \text{ Intersection}$\\
                $L_1 \cup L_2   := \{ x \in \Sigma^* \mid x \in L_1 \lor x \in L_2 \} \text{ Union}$
        \item   $L_1.L_2        := \{ xy \mid x \in L_1 \land y \in L_2 \} \text{ Concatenation of two languages}$
        \item   $L^*            := \{ w_1 w_2 \dots w_t \mid w_i \in L \lor w_i = \lambda \land t \in N \} \} \text{ Kleene-Star of }L$\\
        \emph{Please note:} $\lambda \in L^*$ with $t = 1$, $w_1 = \lambda$\\
        $L^+ = L.L^*$\\
        $\lambda \in L^+ \Longleftrightarrow \lambda \in L$
    \end{enumerate}


\section{Regular Expressions}
Idea: Recursive construction of expressions, which represent the languages.

Definition: Let $\Sigma$ be a finite alphabet. The set of regular expressions on $\Sigma$ and their represented languages are defined in the following way:
    \begin{enumerate}
        \item $\emptyset$,$\lambda$ and any $a \in \Sigma$ are regular expressions\\

        The related languages are:
        \begin{align*}
            \mathcal{L}(\emptyset)  &:= \emptyset\\
            \mathcal{L}(\lambda)    &:= \lambda\\
            \mathcal{L}(a)          &:=\{a\} \qquad \forall a \in \Sigma
        \end{align*}
        \item Let $x,y$ be regular expressions with related languages $\mathcal{L}(x)$, $\mathcal{L}(y)$.
        Hence, the following expressions are regular too:
            \begin{align*}
                & x.y \text{ and } \mathcal{L}(x.y):= \mathcal{L}(x).\mathcal{L}(y)\\
                & x\cup y \text{ and } \mathcal{L}(x\cup y):= \mathcal{L}(x)\cup \mathcal{L}(y)\\
                & x^* \text{ and } \mathcal{L}(x^*):= \mathcal({L}(x))^*
            \end{align*}
        \item Everything that can be produced with \em{1.} and \em{2} in finite steps is regular.
    \end{enumerate}
The related languages are called regular languages.


\section{Automata}
Definition: The deterministic, finite automaton \emph{(DFA)} $M$ is defined as \[M=(K,\Sigma,s,\delta ,F)\] with:
    \begin{itemize}
        \item $K = K \times \Sigma$ finite set of states
        \item $\Sigma$ finite alphabet
        \item $s$ initial state
        \item $\delta$ transition function
        \item $F$ finite set of final states
    \end{itemize}
\end{document}

问候,

杜斯巴德尔

相关内容