I will try to explain what confuses me using latex for the specific assignment that i need to do.
1) The first thing is that i need to put all my "book" (all pages) in a frame of dimensions 17cm width, 24cm height. I found the way it is made but when i printed it i saw that the dimensions were not correct. I asked in a4 paper to leave margins in top and bottom 2.85cm and in left and right 2cm thinking that a4 paper is 21x29.7 and my frame need to be 17x24 but actually this did not happen.
2)The second problem is that i need my text inside the frame to be in 12.5cm width and 19.5cm height, except from the first page that i want 5cm vertical space until the first title. Although the height of 19.5cm appears correctly in the text, the width is less than 12.5cm asked and i don't know why.
4) The last problem is that I want the title "Chapter 1" to be in capital and with a dot at the number, for example "CHAPTER 1." I made the capital letters but when i managed to put the dot, a dot also appeared in the numbers of the sections making them "1..1 Introduction, 1..2 Brief etc. I would like the dot after the number to be only in the "CHAPTER 1."
Here I will paste the code i wrote for all these and how the pdf looks like.
I am sorry but my assignment is in greek, sorry for the inconvenience.
Code: Select all
\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}{9.5}\selectfont}
\fancyhf{}
\fancyhead[LO]{\changefont{ΕΙΣΑΓΩΓΗ}}
\fancyhead[RO]{\changefont{\thepage}}
\fancyhead[RE]{\changefont{ΚΕΦΑΛΑΙΟ 1.}}
\fancyhead[LE]{\changefont{\thepage}}
\usepackage{lmodern}
\usepackage{titlesec}
\usepackage{mathptmx}
\newcommand{\chapfnt}{\normalfont text}
\newcommand{\secfnt}{\normalfont text}
\titleformat{\chapter}[display]
{\large\bfseries\sffamily}
{\filright\chaptertitlename\ \thechapter}{20pt}{\huge\filcenter}
\titleformat{\section}
{\normalsize\bfseries\sffamily}
{\thesection}{1em}{}
\usepackage{fancyhdr}
\addto\captionsgreek{\renewcommand{\chaptername}{ΚΕΦΑΛΑΙΟ}}
\renewcommand{\thechapter}{\arabic{chapter}.}
\begin{document}
\vspace{5cm}
\chapter{ΕΙΣΑΓΩΓΗ}
\section{Εισαγωγή}
H εισαγωγή περιέχει μια σύντομη επισκόπηση των περιεχομένων του βιβλίου, περιγράφοντας συνοπτικά τα βασικά σημεία κάθε κεφαλαίου.
\section{Σύντομη περίληψη ανά κεφάλαιο}
Το 2ο κεφάλαιο μας εισάγει στους πίνακες και την αντίστοιχη γραμμική άλγεβρα. Πίνακας είναι μια ορθογώνια διάταξη αριθμών, ο οποίος μπορεί να χρησιμοποιηθεί για να αναπαριστά συνοπτικά σύνολα εξισώσεων, συνδέσεις δικτύου, εξελικτικά δυναμικά συστήματα και ούτω καθεξής. Η χρήση των πινάκων γίνεται απαραίτητη για την αποτελεσματική μελέτη των μεγάλων συστημάτων. Το παρακάτω παράδειγμα απεικονίζει το όφελος των πινάκων όταν μεταφερόμαστε από προβλήματα μιας εξίσωσης σε συστήματα εξισώσεων.
\end{document}