Latex ist generating an useless empty page after my appendix - latex

I'm using Latex with my university's template. From my main.tex I am calling
\documentclass[11pt, a4paper]{book}
%%\usepackage[abgabe]{bhtThesis}
\usepackage{listings}
\lstset{
literate={ö}{{\"o}}1
{ä}{{\"a}}1
{ü}{{\"u}}1
{Ö}{{\"O}}1
{Ä}{{\"A}}1
{Ü}{{\"U}}1
{ß}{{\ss}}1
}
\renewcommand{\lstlistlistingname}{Quellcodeverzeichnis}
\renewcommand{\lstlistingname}{Quellcode}
\usepackage{trsym}
\usepackage{showkeys}
\usepackage{bytefield}
\usepackage{acronym}
\usepackage{color}
\definecolor{kisgrey}{RGB}{245, 245, 245}
\usepackage[nolinks]{qrcode}
\usepackage{mathtools}
\usepackage{wrapfig}
\typeout{-----------------------------------------------------------}
\typeout{----> main.tex ---- Zentrales Dokument---------------------}
\typeout{-----------------------------------------------------------}
\begin{document}
\begin{appendix}
\input{anhang.tex}
\clearpage
\end{appendix}
\addcontentsline{toc}{chapter}{Literatur- und Quellenverzeichnis}
\bibliographystyle{myapalike}
\bibliography{bhtThesis}
\end{document}
and at the end of my anhang.tex is a useless empty page, refering to my anhang (the page header refers to my anhang?
\chapter{Dateien}
Alle relevanten Dateien, die für die Funktionsfähigkeit der dargestellten Anwendung erforderlich sind, wurden der Arbeit beigelegt. Dabei handelt es sich um die folgenden Dateien:
\begin{itemize}
\item \texttt{kis\_v100.db\_prefs} Datei für die Erweiterung der primären Datenbankschlüssel
\item \texttt{kis\_v100.obda} beinhaltet die Zuordnungen zwischen Datenbank und Ontologie
\item \texttt{kis\_v100.owl} ist die Datei der Ontologie
\item \texttt{kis\_v100.properties} beispielhafte Darstellung des Verbindungsdokuments für die Datenbank
\item \texttt{kis\_v100.q} beinhaltet die SPARQL-Abfragen
\item \texttt{kis\_v100.pdf} ist die Ausgabedatei dieser Arbeit
\end{itemize}
\clearpage
What can I do to find the reason for this useless empty page? There are no warning about badboxes or something similar.

As I used the documentclass book, all chapters start on an odd page. And so my "anhang" produced a single free page to start on odd page, thanks to #samcarter_is_at_topanswers.xyz.
So I just had to set my documentclass to \documentclass[11pt, a4paper, openany]{book}. And openany fixed everything for me.

Related

Lyx modifying moderncv empty space

I am new on latex and lyx. I have to realize a resume and used moderncv. Do you know how I can have the space behing my picture being reduced ? (The one hatched in red) . As everything is supposed to fit in one page with a cv, it is important for me.
Thanks for your help
%% LyX 2.3.3 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{moderncv}
\usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=1cm,bmargin=1cm,lmargin=1cm,rmargin=1cm}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setcounter{secnumdepth}{2}
\setcounter{tocdepth}{2}
\usepackage{float}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{xmpmulti}
\usepackage{enumitem}
\moderncvtheme[grey]{classic}
\firstname{John}
\familyname{Do}
\title{Title}
\address{adress}{city}
\mobile{+33 6 §§ §§ §§ §§}
\email{john.do#ens.psl.eu}
\photo[100pt]{Mii_Artwork.png}
\makeatother
\usepackage{babel}
\begin{document}
\maketitle
\section{Formation}
\cventry{2021/2022}{Master de Science cognitive}{Ecole normale supérieure rue d'Ulm}{Paris}{France}{}
\end{document}
Quick hack: add \vspace{-1.5cm} after \maketitle :
`
%% LyX 2.3.3 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{moderncv}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=1cm,bmargin=1cm,lmargin=1cm,rmargin=1cm}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setcounter{secnumdepth}{2}
\setcounter{tocdepth}{2}
\usepackage{float}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{xmpmulti}
\usepackage{enumitem}
\moderncvtheme[grey]{classic}
\firstname{John}
\familyname{Do}
\title{Title}
\address{adress}{city}
\mobile{+33 6 §§ §§ §§ §§}
\email{john.do#ens.psl.eu}
\photo[100pt]{example-image}
\makeatother
\usepackage{babel}
\begin{document}
\maketitle
\vspace{-1.5cm}
\section{Formation}
\cventry{2021/2022}{Master de Science cognitive}{Ecole normale supérieure rue d'Ulm}{Paris}{France}{}
\end{document}

Latex glossary with glossaries package does not appear + adding more columns

I tried to get a grip on the glossaries package and understood a bit of it, but now I am stuck and need your help to get any further. I have written the following piece:
%Dieses Dokument dient der Erprobung von Funktionen des Glossary-Pakages
%Packete, die vor glossaries geladen werden müssen
%Packete, die laut user-guide vor glossaries geladen werden müssen
%polyglossia wird ausgenommen
\documentclass[a4paper,10pt]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
%Weitere Packete, die in IPA_Main aufgelistet werden
%Seitengestaltung und Literaturverwendung werden hier ausgespart
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{amsfonts}
\usepackage{amsmath}
%hyperref muss als letztes vor glossaries geladen werden
\usepackage{hyperref}
%Anlegen des Glossares mit xindy
%Importieren des Packetes glossaries mit den folgenden Eigenschaften:
%Glossar wird mit der Software xindy angelegt, es werden Acronyme angelegt, der Name der Gruppierung
wird angezeigt, die Einträge werden alphabetisch geordnet
\usepackage[xindy, acronyms, style=indexgroup, order=letter]{glossaries}
%hinzufügen eines weiteren glossares
\newglossary[nlg]{notation}{not}{ntn}{Notation}
\makeglossaries
%Eintrag ins Hauptglossar
\newglossaryentry{Test1}
{
name = Test 1,
description = {Test eines Eintrages in ein Hauptglossar}
}
%Eintrag zu den Acronymen
\newacronym{t2}{t2}{Test eines Acronyms im Acronymverzeichnis}
\begin{document}
\printglossaries
\newpage
In diesem Satz wird der Eintrag \gls{Test1} ein erstes mal, dann eines zweites mal getestes
\gls{Test1}.
\newline
Nun folgt der Test des angelegten Acronyms im Acronymverzeichnis \gls{t2}.
\end{document}
As far as the the definition goes, this seems to work. When using the acronym and the glossary-entry, the text in the pdf appears as desired without any error. But somehow, the glossaries do not get printed. I would like to ask what the reasons for that could be.
Also I would like to have a glossary that has the following 4 columns: Symbol\Description\Unit\page. I will have multiple glossaries, but the desired columns should appear only on one specific glossary. If anyone could show me how this could be done, I would be very thankfull.
As always, thanks in advance.

Missing \begin{document}. \chapter{E Latex new blank page

I started to use Latex to write my notes and I've been having some problems when I start a new chapter or blank page
\chapter{ECS, Lambda, Batch, Lightsail}
\section{ECS}
\begin{enumerate}
\item first time
\end{enumerate}
and this is my main
\documentclass[a4paper,12pt]{book}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage[margin=1.0in]{geometry}
\begin{document}
\author{José Santiago Molano Perdomo}
\title{Aws Cloud Practicioneer}
\date{}
\let\cleardoublepage\clearpage
\frontmatter
\maketitle
\tableofcontents
\mainmatter
\include{./TeX_files/chapter01}
\include{./TeX_files/chapter02}
\include{./TeX_files/chapter03}
\include{./Tex_files/chapter04}
\include{./Tex_files/chapter05}
\include{./Tex_files/chapter06}
\include{./Tex_files/chapter07}
\include{./Tex_files/chapter08}
\backmatter
% bibliography, glossary and index would go here.
\end{document}
I get this error when I try compile chaper 08
Undefined control sequence. \chapter
Missing \begin{document}. \chapter{E
Undefined control sequence. \section
Emergency stop.
Overfull \hbox (20.0pt too wide) in paragraph
The character é in the author name is invalid to UTF-8. Please change to \'{e}

Latex: Multiple Table of Contents

What I am looking for is the following table of contents structure:
Table of Contents
1 Vorwort
2 Hallo
3 Und so weiter
Document with these Chapters, but at the beginning of each chapter its specific table of contents:
1 Vorwort
----- here subtoc -----
1.1 subtoc
1.2 Test
---- here the beginning of section test ----
1.2 Test
The problem however is, that in these different chapters all subtocs are combined, such as in my example:
\documentclass{scrbook}
\usepackage[latin1]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{blindtext}% generiert Beispieltext
\usepackage{tocstyle}[2008/10/20]% experimentelles KOMA-Script-Paket
\usetocstyle{standard}
\newcounter{normaltocdepth}
\newcommand*{\startstory}[1]{%
\newpage\chapter{#1}\addtocontents{toc}{\protect\startstory}%
}
\newcommand*{\afterstory}{%
\addtocontents{toc}{\protect\afterstory}
}
\newcommand*{\maintoc}{%
\begingroup
\setcounter{normaltocdepth}{\value{tocdepth}}%
\renewcommand*{\startstory}{%
\setcounter{tocdepth}{1}%
}%
\renewcommand*{\afterstory}{%
\setcounter{tocdepth}{\value{normaltocdepth}}%
}%
\tableofcontents
\endgroup
}
\newcommand*{\storytoc}{%
\begingroup
\setcounter{normaltocdepth}{\value{tocdepth}}%
\setcounter{tocdepth}{-2}%
\renewcommand*{\startstory}{%
\setcounter{tocdepth}{\value{normaltocdepth}}%
}%
\renewcommand*{\afterstory}{%
\setcounter{tocdepth}{-2}%
}%
\showtoc{toc}
\setcounter{tocdepth}{\value{normaltocdepth}}% Hinzugefügt!
\endgroup
}
\newcommand{\neuestory}[3]{
\startstory{#3}
\vspace{10mm}
\section*{Abstract}
\small
\noindent #1
\section*{Personen}
\noindent #2
\normalsize
\vspace{10mm}
\section*{Inhalt}
\storytoc
%\cleardoublepage
}
\begin{document}
\maintoc
\newpage
\chapter{Vorwort}
blabla
\neuestory{ABC}{eine Frau}{Hallo}
\section{Test}
abc
\afterstory
\neuestory{DEF}{eine Mann}{Und so weiter}
\section{weiterheiter}
def
\afterstory
\end{document}
The answer is the minitoc package.
Works fine!

Latex Indentation

I have a list which I want to indent from the section title. I have tried \indent and \hspace{1cm} without success.
Here is my code
\vspace{0.2in}
\section{Affiliations}
\vspace{0.1in}
\indent The American Geophysical Union.\\
\hspace{1cm} The Seismological Society of America.
For consistent indentation of a "somewhat list-like structure", use adjustwidth from changepage:
\documentclass{article}
\usepackage{changepage}
\begin{document}
\section{Affiliations}
\begin{adjustwidth}{1cm}{0pt}
\setlength{\parindent}{0pt}%
The American Geophysical Union.
The Seismological Society of America.
\end{adjustwidth}
\end{document}
However, I'd suggest a regular list-like structure like itemize:
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\section{Affiliations}
\begin{itemize}[leftmargin=1cm]
\item The American Geophysical Union.
\item The Seismological Society of America.
\end{itemize}
\end{document}

Resources