Page LayoutHorizontal line before the name of the first chapter

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
sofiagr
Posts: 8
Joined: Thu Oct 24, 2019 12:04 pm

Horizontal line before the name of the first chapter

Post by sofiagr »

Hello!

I need and horizontal line next to the "Chapter 1" or below it but i don't know how. I only managed to make a line after the name of the chapter by using "\rule{\linewidth}{1pt}" but this is not that i want. Could anyone please tell me what to do?

I am sorry that is in greek.

Here is the code:
\documentclass[a4paper,12pt]{book}

\usepackage{calc}
\usepackage{eso-pic}

\newlength{\PageFrameTopMargin}
\newlength{\PageFrameBottomMargin}
\newlength{\PageFrameLeftMargin}
\newlength{\PageFrameRightMargin}

\setlength{\PageFrameTopMargin}{2.85cm}
\setlength{\PageFrameBottomMargin}{2.85cm}
\setlength{\PageFrameLeftMargin}{2cm}
\setlength{\PageFrameRightMargin}{2cm}

\makeatletter

\newlength{\Page@FrameHeight}
\newlength{\Page@FrameWidth}

\AddToShipoutPicture{
\thinlines
\setlength{\Page@FrameHeight}{\paperheight-\PageFrameTopMargin-\PageFrameBottomMargin}
\setlength{\Page@FrameWidth}{\paperwidth-\PageFrameLeftMargin-\PageFrameRightMargin}
\put(\strip@pt\PageFrameLeftMargin,\strip@pt\PageFrameTopMargin){
\framebox(\strip@pt\Page@FrameWidth, \strip@pt\Page@FrameHeight){}}}

\makeatother

\usepackage[left=4cm,textwidth=12.5cm,right=4.5cm,
textheight=19.5cm,top=4.75cm,bottom=4.95cm,
includehead]{geometry}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[english,greek]{babel}
\usepackage[utf8]{inputenc}
\newcommand{\lat } {\latintext}
\DeclareMathOperator{\rank}{rank}
\newcommand{\gr}{\selectlanguage{greek}}
\usepackage{fancyhdr}
\pagestyle{fancy}
\newcommand{\changefont}{%
\fontsize{8.5}{9.5}\selectfont}
\fancyhf{}
\fancyhead[CO]{\changefont{ΕΙΣΑΓΩΓΗ}}
\fancyhead[RO,LE]{\changefont\bfseries\thepage}
\fancyhead[CE]{\changefont{ΚΕΦΑΛΑΙΟ 1}}

\usepackage{kmath,kerkis} % The order of the packages matters; kmath changes the default text font
\usepackage[T1]{fontenc}
\usepackage{titlesec}
\newcommand{\chapfnt}{\upshape\kerkis text}
\newcommand{\secfnt}{\upshape\kerkis text}

\usepackage{lmodern}
\titleformat{\chapter}[display]
{\large\bfseries\sffamily}
{\filright\chaptertitlename\ \thechapter}{17pt}{\Large\filcenter}
\titleformat{\section}
{\large\bfseries\sffamily}
{\thesection}{1em}{}


\addto\captionsgreek{\renewcommand{\chaptername}{ΚΕΦΑΛΑΙΟ}}

\begin{document}
\vspace{5cm}
\chapter{ΕΙΣΑΓΩΓΗ}
\rule{\linewidth}{1pt}
\section{Εισαγωγή}

H εισαγωγή περιέχει μια σύντομη επισκόπηση των περιεχομένων του βιβλίου, περιγράφοντας συνοπτικά τα βασικά σημεία κάθε κεφαλαίου.

\section{Σύντομη περίληψη ανά κεφάλαιο}

Το 2ο κεφάλαιο μας εισάγει στους πίνακες και την αντίστοιχη γραμμική άλγεβρα. Πίνακας είναι μια ορθογώνια διάταξη αριθμών, ο οποίος μπορεί να χρησιμοποιηθεί για να αναπαριστά συνοπτικά σύνολα εξισώσεων, συνδέσεις δικτύου, εξελικτικά δυναμικά συστήματα και ούτω καθεξής. Η χρήση των πινάκων γίνεται απαραίτητη για την αποτελεσματική μελέτη των μεγάλων συστημάτων. Το παρακάτω παράδειγμα απεικονίζει το όφελος των πινάκων όταν μεταφερόμαστε από προβλήματα μιας εξίσωσης σε συστήματα εξισώσεων.

test2.pdf
(110.18 KiB) Downloaded 163 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
Post Reply