Translate chapter 5.

This commit is contained in:
Kremitzl 2021-07-07 21:54:58 +02:00
parent 8586f36b04
commit 166e01dcf9
2 changed files with 70 additions and 67 deletions

View File

@ -1,91 +1,95 @@
\chapter{Sonderzeichen} \chapter{Special characters}
\label{sec:special-characters} \label{sec:special-characters}
\section{Leerzeichen} \section{Spaces}
Das am häufigsten benötigte Sonderzeichen ist ein einfaches Leerzeichen als Wortzwischenraum. The special character used most frequently is a simple space between words.
Dieses Zeichen entsteht in \LaTeX, wenn im Quellcode zwischen anderen Zeichen Leerzeichen oder einzelne Zeilenumbrüche stehen. \LaTeX{} creates it whenever the source code contains spaces or single newlines (by hitting the enter key once) between other characters.
Es gibt aber auch einige andere Arten von Leerzeichen. The word space is not the only one, though\,---\,there are a few more types of spaces.
Wie sie verwendet werden können, wird in \cref{lst:spaces} veranschaulicht. \Cref{lst:spaces} illustrates how they are used.
\example{lst:spaces}{special-characters/spaces}{Unterschiedliche Leerzeichen in \LaTeX} \example{lst:spaces}{special-characters/spaces}{Unterschiedliche Leerzeichen in \LaTeX}
\paragraph{English Spacing} \paragraph{English Spacing}
In englischsprachigen Dokumenten verwendet LaTeX das traditionelle English Spacing, also doppelte Leerzeichen nach dem Satzende. In documents written in English, \LaTeX{} uses traditional English Spacing by default. That is, double spaces after each sentence.
Der Befehl \mintinline{tex}|\frenchspacing| vor dem ersten Absatz verhindert das. We can prevent this by using the command \mintinline{tex}|\frenchspacing| above the first paragraph.
Der Befehl \mintinline{tex}|\nonfrenchspacing| schaltet wieder zurück. With \mintinline{tex}|\nonfrenchspacing|, we can reset the behavior.
Bei English Spacing versucht \LaTeX, Abkürzungen zu erkennen und danach trotzdem normale Wortzwischenräume zu setzen. When using English Spacing, \LaTeX{} tries to recognize abbreviations and to use normal spaces after those.
Das solltet ihr aber kontrollieren und, wo nötig, We should still check this and\,---\,where necessary\,---\,enforce word spaces (\mintinline[showspaces]{tex}{.\ }) or sentence spaces (\mintinline[showspaces]{tex}{\@. }).
Wortzwischenräume (\mintinline[showspaces]{tex}{.\ }) oder Satzenden (\mintinline[showspaces]{tex}{\@. }) erzwingen.
\section{Striche} \section{Hyphens and dashes}
Es gibt verschiedene horizontale Striche. There are different kinds of horizontal lines being used as punctuation,
Am häufigsten werden der Bindestrich (-), der Halbgeviertstrich () und der Geviertstrich\footnote{Ein Geviert ist die Zeilenhöhe, die eine Bleiletter aus dem Buchdruck einnimmt.} (—) verwendet. most frequently the hyphen (-), the en dash () and the em dash (—).\footnote{They are named after the letters N and M,
Diese drei Striche werden in \LaTeX{} durch unterschiedlich viele Bindestriche im Quelltext erzeugt, wie \cref{tbl:bars} zeigt. that occupy roughly the same space.
The letter M is also about as wide as it is tall, and the amount is called a \emph{Geviert} in German, hence the German terms \emph{Halbgeviertstrich} and \emph{Geviertstrich} for the two dashes.}
These three characters are created in \LaTeX{} by different numbers of consecutive hyphens in the source code,
as shown in \cref{tbl:bars}.
\begin{longtable}{@{}llp{7.8cm}@{}} \begin{longtable}{@{}llp{7.8cm}@{}}
\toprule \toprule
Code & Strich & Verwendung \\ Code & Character & Usage \\
\midrule \midrule
\mintinline{tex}|-| & Bindestrich & \LaTeX-Wochenende \\ \mintinline{tex}|-| & Hyphen & a small-sized stroke \\
\mintinline{tex}|--| & Halbgeviertstrich & als Gedankenstrich mit Leerzeichen außenrum oder als Bis-Strich: 10\,\,12 Uhr \\ \mintinline{tex}|--| & En dash & a range mark (8\,--\,10\,am) or an interruptor at sentence level the latter surrounded by spaces and used in most European languages (including British English) \\
\mintinline{tex}|---| & Geviertstrich & a dash\,\,mostly used in American English \\ \mintinline{tex}|---| & Em dash & an interruptor at sentence level\,---\,mostly used in American English and without or with thin spaces \\
\bottomrule \bottomrule
\caption{Striche in \LaTeX} \caption{Hyphens and dashes in \LaTeX}
\label{tbl:bars} \label{tbl:bars}
\end{longtable} \end{longtable}
Der Bindestrich wird zwar auch zur Silbentrennung verwendet, ihr solltet ihn dafür aber nicht explizit im Quellcode eingeben. The hyphen is obviously also used for hyphenation, but for this purpose, we should not insert it explicitly in our source code.
An den meisten Stellen trennt \LaTeX{} automatisch richtig, wenn ihr das passende \texttt{babel}-Paket eingebunden habt.\footnote{Vgl. \cref{sec:language}.} In most places, \LaTeX{} does the hyphenation automatically if we are using the correct \texttt{babel} package.\footnote{c.\,f. \cref{sec:language}.}
Wenn dabei etwas schiefgeht, könnt ihr mit den Codes in \cref{tbl:separators} eingreifen:\footnote{Auch dafür muss \texttt{babel} eingebunden sein.} In case something goes wrong, we can intervene using the codes from \cref{tbl:separators}:\footnote{Those also require the \texttt{babel} package.}\todo{Is it because of the English document that the last example does not work?}
\begin{longtable}{@{}lp{11cm}@{}} \begin{longtable}{@{}lp{11cm}@{}}
\toprule \toprule
Code & Erläuterung \\ Code & Erläuterung \\
\midrule \midrule
\endhead \endhead
\mintinline{tex}|\-| & Ausschließliche Trennstelle: Das Wort darf nur an dieser Stelle getrennt werden (kann auch mehrfach in einem Wort vorkommen, dann sind alle Stellen erlaubt). \\ \mintinline{tex}|\-| & Exclusive hyphenation: The word may only be hyphenated at this position (can also be used multiple times within one word\,---\,all of those positions are then allowed). \\
\mintinline{tex}|"-| & Zusätzliche Trennstelle: Das Wort darf neben den von \LaTeX{} erkannten Trennstellen auch hier getrennt werden. \\ \mintinline{tex}|"-| & Additional hyphenation: The word may be hyphenated here, as well as at the default positions. \\
\mintinline{tex}|-| & Exklusiver Bindestrich: Wird für Komposita verwendet und unterbindet die automatische Silbentrennung im Wort (das ist typografisch erwünscht). \\ \mintinline{tex}|-| & Exclusive hyphen: Is only used for compound words and prevents the automatic hyphenation for the rest of the word (which is typographically desirable). \\
\mintinline{tex}|"=| & Nichtexklusiver Bindestrich: Wird für lange Komposita verwendet, bei denen die Silbentrennung aktiv bleiben soll, weil der Umbruch sonst nicht klappt. \\ \mintinline{tex}|"=| & Non-exclusive hyphen: Is used for long compound words when the text wrapping would not work without additional automatic hyphenation. \\
\mintinline{tex}|""| & Trennstelle ohne Strich: Kann beispielsweise verwendet werden, um \textsc{url}s ohne Bindestrich zu trennen. \\ \mintinline{tex}|""| & Cut-off point without a hyphen: Allows something like a \textsc{url} to wrap without inserting a potentially misleading hyphen. \\
\mintinline{tex}|"~| & Bindestrich ohne Trennstelle: Wird verwendet, um den Bindestrich zusammen mit dem folgenden Wort umbrechen zu lassen: \emph{Vorlesungszeit und "~raum} \\ \mintinline{tex}|"~| & Non-wrapping hyphen: Keeps the hypen together with the following word, very useful in German: \emph{Vorlesungszeit und "~raum} \\
\bottomrule \bottomrule
\caption{Ausnahmen für die Silbentrennung} \caption{Exceptions for hyphenation}
\label{tbl:separators} \label{tbl:separators}
\end{longtable} \end{longtable}
\section{Anführungszeichen} \section{Quotation marks}
Anführungszeichen können grundsätzlich mit den Codes in \cref{tbl:quotation-marks} erzeugt werden. Quotation marks can generally be created using the codes from \cref{tbl:quotation-marks}.
Entscheidend ist dabei jeweils das Aussehen und nicht die Semantik, weshalb zum Beispiel im Deutschen die französichen Guillemets verkehrt herum verwendet werden (»french left quoation mark« rechts und umgekehrt). The decisive factor is the appearance, not the semantics, which is why the French Guillemets are used the wrong way around in German
(the \emph{french left quotation mark} on the right and vice versa).
\begin{table}[H] \begin{table}[H]
\center \center
\begin{tabular}{lcccc} \begin{tabular}{lcccc}
\toprule \toprule
Sprache & \multicolumn{2}{c}{Erste Ebene} & \multicolumn{2}{c}{Zweite Ebene} \\ Language & \multicolumn{2}{c}{First level} & \multicolumn{2}{c}{Second level} \\
\cmidrule(lr){2-3} \cmidrule(lr){4-5} \cmidrule(lr){2-3} \cmidrule(lr){4-5}
& Code & Ergebnis & Code & Ergebnis \\ & Code & Result & Code & Result \\
\midrule \midrule
Deutsch & \mintinline{tex}|\glqq...\grqq| & \glqq\grqq & \mintinline{tex}|\glq\grq| & \glq\grq \\ English (\acro{A.\,E.}) & \mintinline{tex}|``...''| & ``…'' & \mintinline{tex}|`...'| & `…' \\
Deutsch alternativ & \mintinline{tex}|\frqq...\flqq| & \frqq\flqq & \mintinline{tex}|\frq\flq| & \frq\flq \\ English (\acro{B.\,E.}) & \mintinline{tex}|`...'| & `…' & \mintinline{tex}|``...''| & ``…'' \\
Englisch (\acro{A.\,E.}) & \mintinline{tex}|``...''| & ``…'' & \mintinline{tex}|`...'| & `…' \\ German & \mintinline{tex}|\glqq...\grqq| & \glqq\grqq & \mintinline{tex}|\glq\grq| & \glq\grq \\
Englisch (\acro{B.\,E.}) & \mintinline{tex}|`...'| & `…' & \mintinline{tex}|``...''| & ``…'' \\ German (alternatively) & \mintinline{tex}|\frqq...\flqq| & \frqq\flqq & \mintinline{tex}|\frq\flq| & \frq\flq \\
\bottomrule \bottomrule
\end{tabular} \end{tabular}
\caption{Anführungszeichen} \caption{Quotation marks}
\label{tbl:quotation-marks} \label{tbl:quotation-marks}
\end{table} \end{table}
Deutlich flexibler seid ihr aber mit dem Paket \mintinline{tex}{csquotes}, das den Befehl \mintinline{tex}|\enquote{<zitat>}| zur Verfügung stellt. We can also get more flexibility using the \mintinline{tex}{csquote} package, which provides the \mintinline{tex}|\enquote{<quote>}| command.
Abhängig von der Sprache werden die passenden Anführungszeichen verwendet; bei verschachtelten \texttt{enquote}s wird zwischen erster und zweiter Ebene gewechselt. It chooses the correct quotation marks depending on the language being used; also, nested \texttt{enquote}s automatically switch back and forth between first and second level.
Mit der Option \mintinline{tex}|autostyle=true| beim Paketimport setzt der Befehl \mintinline{tex}|\foreignquote{<sprache>}{<zitat>}| je nach Sprache abweichende Anführungszeichen. When enabling the \mintinline{tex}|autostyle=true| option on package import, \mintinline{tex}|\foreignquote{<language>}{<quote>}| selects varying quotation marks for each quotation.
\section{Diakritika} \section{Diacritics}
Wenn ihr Buchstaben mit diakritischen Zeichen direkt über die Tastatur eingeben könnt beispielsweise die deutschen Umlaute oder gängige Akzente auf einer deutschen Tastatur , könnt ihr das auch direkt im Quelltext tun. If we are able to insert letters with diacritics via our keyboard\,---\,e.\,g., the German Umlauts or common accents\,---\,we can also do this within our source code:
Die Zeichen bleiben dann im Output erhalten. The characters will remain intact in the output.
Ansonsten können die Diakritika auch per Escape-Codes erzeugt werden. If not, we can also create the diacritics via escape codes.
\cref{tbl:diacritics} gibt nur einige Beispiele an die Buchstaben lassen sich natürlich austauschen, es gibt aber auch noch viele andere Diakritika. \Cref{tbl:diacritics} shows just a few examples\,---\,the letters can of course be swapped out, but there is still a huge amount of different diacritics.
\begin{table}[H] \begin{table}[H]
\center \center
@ -103,10 +107,10 @@ Ansonsten können die Diakritika auch per Escape-Codes erzeugt werden.
\label{tbl:diacritics} \label{tbl:diacritics}
\end{table} \end{table}
\section{Andere Sonderzeichen} \section{More special characters}
Einige Sonderzeichen, beispielsweise das Prozentzeichen, sind für die \LaTeX{}-Syntax reserviert und können nicht als normale Zeichen verwendet werden. Some special characters, like the percent sign, are reserved as part of the \LaTeX{} syntax and cannot be used as normal characters.
Diese und viele, viele weitere Sonderzeichen können über eigene Befehle erzeugt werden. These and many, many more can be created by their own commands.
Dabei ist zu beachten, dass manche Sonderzeichen nur in Mathe-Umgebungen (siehe \cref{sec:maths}) funktionieren, andere brauchen zusätzliche Pakete. Please note that some of them only work in maths environments (c.\,f. \cref{sec:maths}), others might require additional packages.
\begin{table}[H] \begin{table}[H]
\center \center
@ -128,15 +132,15 @@ Dabei ist zu beachten, dass manche Sonderzeichen nur in Mathe-Umgebungen (siehe
\textless/\textgreater & \verb|\textless/\textgreater| & \\ \textless/\textgreater & \verb|\textless/\textgreater| & \\
\textperthousand & \verb|\textperthousand| & \\ \textperthousand & \verb|\textperthousand| & \\
\textsection & \verb|\textsection| & \\ \textsection & \verb|\textsection| & \\
$\delta, \pi, \Sigma$ & \verb|\delta, \pi, \Sigma|, … & nur in Mathe-Umgebung \\ $\delta, \pi, \Sigma$ & \verb|\delta, \pi, \Sigma|, … & only in maths environments \\
\euro & \verb|\euro| & nur mit Paket \texttt{eurosym} \\ \euro & \verb|\euro| & requires the \texttt{eurosym} package \\
\textteshlig & \verb|\textteshlig| & nur mit Paket \texttt{tipa} \\ \textteshlig & \verb|\textteshlig| & requires the \texttt{tipa} package \\
\textmusicalnote & \verb|\textmusicalnote| & nur mit Paket \texttt{textcomp} \\ \textmusicalnote & \verb|\textmusicalnote| & requires the \texttt{textcomp} package \\
\bottomrule \bottomrule
\end{tabular} \end{tabular}
\caption{Einige Sonderzeichen} \caption{Some special characters}
\label{tbl:special-characters} \label{tbl:special-characters}
\end{table} \end{table}
Falls ihr mal ein Sonderzeichen braucht, von dem ihr nicht genau wisst, wie es heißt, hilft euch \emph{Detexify}\footnote{\url{http://detexify.kirelabs.org/classify.html}} ihr könnt das Symbol zeichnen und bekommt alle nötigen Infos. Whenever you need a certain symbol and dont know its name, \emph{Detexify}\footnote{\url{http://detexify.kirelabs.org/classify.html}} comes to the rescue: You can draw the symbol and get all necessery information.
Dass es von Keilschrift bis zu technischen Symbolen wirklich \emph{alles} gibt, stellt ihr fest, wenn ihr durch die \emph{Comprehensive \LaTeX{} Symbol List}\footnote{\url{http://tug.ctan.org/info/symbols/comprehensive/symbols-a4.pdf}} blättert. From cuneiforms to technical symbols, there is absolutely \emph{everything}, as you can see scrolling through the \emph{Comprehensive \LaTeX{} Symbol List}.\footnote{\url{http://tug.ctan.org/info/symbols/comprehensive/symbols-a4.pdf}}

View File

@ -1,8 +1,7 @@
Schmale Leerzeichen werden z.\,B. in Thin spaces are used quite often, e.\,g.,
Abkürzungen und zwischen Zahlen und in abbreviations and between numbers and
Einheiten verwendet: 10\,s. units: 10\,s. Normal-width non-breaking
Normalbreite, aber geschützte spaces can, i.\,a., help to keep a title
Leerzeichen können u.\,a. and name in one line around a potential
dabei helfen, Titel und Namen in line break: Dr.~Fooboar.
einer Zeile zu halten: Dr.~Fooboar.