Text FormattingLatin page numbers and tocstyle

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
justincase
Posts: 25
Joined: Sat Sep 04, 2010 1:56 am

Latin page numbers and tocstyle

Post by justincase »

It's anoying I know :D

No I just want to have text a site above the abstract (this is the place where I explain that I was the only one working on the document). So I don't want to have a environment which looks like the abstract with a different title. Also this page has the number "i" and the abstract has also the number "i". And now the the sep-lines are missing after the table of contents...

I have it like this now. I'm missing the lines at the top and bottom after the table of contents and the roman page numbers are miscounted - as I said above

Code: Select all

\documentclass[12pt,a4paper, twoside, abstracton]{scrreprt}

\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage{graphicx}
\usepackage{tocloft}
\usepackage{scrpage2}

\renewcommand\cftchapdotsep{1}
\renewcommand\cftsecdotsep{1}
\setheadsepline{0.4pt}
\setfootsepline{0.4pt}


\begin{document}
    \input{deckblatt}
    
    \maketitle[-3]
  
  \pagestyle{scrheadings}
  \pagenumbering{roman}
  
    Test  % This is the explanation that I was the only one working on the project. There should be lines at the top and bottom (done) and page numbers starting with "i"

    \begin{abstract}\thispagestyle{scrheadings}\pagenumbering{roman}
        This is a test. Hello World.\\
        I'm a abstract chapter!
    \end{abstract}% The abstract should have the page number "ii"
    
    {\addtocontents{toc}{\protect\thispagestyle{scrheadings}}\tableofcontents}
    
    \clearpage
    \pagenumbering{arabic}
    
    \chapter{Test}
    \Section{Test}

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

justincase
Posts: 25
Joined: Sat Sep 04, 2010 1:56 am

Re: Latin page numbers and tocstyle

Post by justincase »

I just had to move y = pulstran(t,d,'func') :)
justincase
Posts: 25
Joined: Sat Sep 04, 2010 1:56 am

Latin page numbers and tocstyle

Post by justincase »

It's me again

The complete structure of my document looks like this (I think this is minimal enough)

Code: Select all

\documentclass[12pt,a4paper, twoside, abstracton]{scrreprt}

\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage{graphicx}
\usepackage{tocloft}
\usepackage{scrpage2}
\usepackage{setspace}
\usepackage{amsmath}


\renewcommand\cftchapdotsep{1}
\renewcommand\cftsecdotsep{1}
\setheadsepline{0.4pt}
\setfootsepline{0.4pt}

\begin{document}
	\input{deckblatt}
	\pagestyle{scrheadings}
	  
	  
	\maketitle[-4]
	\pagenumbering{roman}	
  
	\begin{abstract}\thispagestyle{scrheadings}
		This is a test. Hello World.\\
		I'm a abstract chapter!
	\end{abstract}
	
	{\addtocontents{toc}{\protect\thispagestyle{scrheadings}}\tableofcontents}
	
	\clearpage
	\pagenumbering{arabic}
	\pagestyle{scrheadings}
	\doublespacing
	
	\input{Ch1/introduction}
	
	\input{Ch2/background}
\end{document}
I am missing the scrheadings in Ch1 and 2. When I add

Code: Select all

\pagestyle{scrheadings}
into the input file

Code: Select all

\chapter{Introduction}
\thispagestyle{scrheadings}
like this, then I have the scrheadings. But: The header tells me that the actual chapter is "Content" ... I can't find a solution for that ... maybe someone can help me out again :/

Cheers
justincase
Posts: 25
Joined: Sat Sep 04, 2010 1:56 am

Re: Latin page numbers and tocstyle

Post by justincase »

No one?
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Latin page numbers and tocstyle

Post by frabjous »

I appreciate that English is not your first language, but I for one cannot understand enough of your post to understand what question you're asking.

But more importantly, your sample code does not compile. Please see the Post on Avoidable Mistakes.

You have been a member of this community long enough to know what proper minimal working example looks like.
justincase
Posts: 25
Joined: Sat Sep 04, 2010 1:56 am

Latin page numbers and tocstyle

Post by justincase »

Woops true - this can't be run 'cause of the inputs. Sorry for that.

My plan was it to have a line in the header and footer and inside the header the name of the actual chapter. With the help of this thread I got it so far that I have a line in the header and footer until the table of contents.
As you can see, after that I clear the page and say that the pagestyle is scrheadings again. The result is that the scrheadings start at page 2 of chapter 2 and the name of the chapter shown in the header is "Contents" which is wrong. Scrheadings disappear after chapter 2.

And another strange thing: If I run the code below I don't get scrheadings after the table of contents. Which doesn't make sense 'cause inside the code which is put in via \input{} is no \pagestyle ...

Code: Select all

\documentclass[12pt,a4paper, twoside, abstracton]{scrreprt}

\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage{graphicx}
\usepackage[subfigure]{tocloft}
\usepackage{subfigure}
\usepackage{scrpage2}
\usepackage{setspace}
\usepackage{amsmath}
\usepackage{nicefrac}
\usepackage{graphicx}
\usepackage{ifpdf}
\ifpdf%
  \usepackage{pdftricks}
  \begin{psinputs}
    \usepackage{pstricks}
  \end{psinputs}
\else
  \usepackage{pstricks}
  \newenvironment{pdfpic}{}{}
\fi

\renewcommand\cftchapdotsep{1}
\renewcommand\cftsecdotsep{1}
\setheadsepline{0.4pt}
\setfootsepline{0.4pt}

\begin{document}
	\input{deckblatt}
	
	\pagestyle{scrheadings}  
	\maketitle[-4]
	\pagenumbering{roman}	
  
	\begin{abstract}\thispagestyle{scrheadings}
		This is a test. Hello World.\\
		I'm a abstract chapter!
	\end{abstract}
	
	{\addtocontents{toc}{\protect\thispagestyle{scrheadings}}\tableofcontents}
	
	\clearpage
	\pagestyle{scrheadings}
	\pagenumbering{arabic}
	\doublespacing
	
	\chapter{Introduction}
		\section{Test Introduction 1}
		\subsection{Sub-Test introduction 1}
		
	\chapter{Background}
		\section{Test Background 1}
		\subsection{Sub-Test Background 1}
%	
%	\input{Ch1/introduction}
%	
%	\input{Ch2/background}
%	
%	\input{Ch3/architecture}
%	
%	\input{Ch4/implementation}
%	
%	\input{Ch5/evaluation}
%	
%	\input{Ch6/conclusion}

\end{document}
The file introduction contains just a \chapter{}
The file background contains a chapter and another \input and inside this file is a normal structure with images, sections, subsections and stuff ... nothing special.

Maybe it is better to understand now.

Cheers

Edit: Okay, problem solved. I had to put \thispagestyle behind every chapter command and it works :)
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Latin page numbers and tocstyle

Post by frabjous »

It still doesn't compile. You still have an \input command in there, and even without it, it returns an error because no \title is even, and maybe more beyond that. Please actually test your sample code.
justincase
Posts: 25
Joined: Sat Sep 04, 2010 1:56 am

Re: Latin page numbers and tocstyle

Post by justincase »

I did, and it worked. Reason why is that I have the needed files. I'm sorry that I forgot the title thing, but ok it's just a comment ;)

Anyhow, it works now and I try to remember the code rules the next time :)
Post Reply