I want to create something like the images I have below:
( I couldn't draw well the chapter number and its font)
and
( I couldn't draw well the page number)
————–UPDATE According to Gonzalo Medina answer———————
\documentclass[a4paper,12pt,oneside]{report}
\usepackage{fontspec}
\usepackage{xunicode}
\setmainfont{Times New Roman}
\usepackage{polyglossia}
\setmainlanguage{greek}
\setotherlanguage{english}
\usepackage{fixltx2e} %to use _ and ^
\usepackage{url}
\usepackage{indentfirst}
\usepackage{wrapfig} % for wrapping graphics with text
\usepackage{float} % for images
\usepackage[a4paper,left=2cm,top=2.5cm,right=2cm,bottom=2.5cm]{geometry}
\usepackage{graphicx, amsmath, lettrine,amssymb}
\usepackage{fancyhdr,verbatim}
\usepackage{rotating,appendix}
\usepackage{ucs}
\usepackage{longtable}
\usepackage{listings}
\usepackage{caption}
\usepackage{capt-of}
\usepackage{underscore} %in order to use __
\usepackage{hyperref} % to make hyperlinks
%----------------------------for changing the chapter format-------------------
\usepackage[explicit]{titlesec}
\usepackage{tikz}
\titleformat{\chapter}[display]
{\Huge\scshape}
{\filleft\tikz\node[fill=green!50!black!10,rectangle,rounded corners=6pt] (chap) {\chaptertitlename};}
{0ex}
{\colorbox{green!50!black!10}{\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\vskip1ex#1\vskip1ex}}}
%-------------------------------------------------------------------------------
\begin{document}
\thispagestyle{empty}
\renewcommand{\chaptername}{}
\newcommand{\EN}[1]{\foreignlanguage{english}{#1}} %in order to write english as \EN{Some words in English}
\addtocontents{toc}{\protect\thispagestyle{empty}} %to remove numbering the page from table of contents (ToC)
\tableofcontents
\thispagestyle{empty}
\chapter*{Preface}
\thispagestyle{empty}
\indent some text
\chapter {Chapter 1}
\textbf {\LARGE Intro}
\setcounter{page}{1}
\section {History}
\indent Some text ggttg
\section {Another}
\indent some text
\chapter {Chapter 2}
\textbf {\LARGE Two}
\section {History2}
\indent text
\end{document}
Using the above code i receive
I want
Also,for the second layout ,almost the same.It shows "1:Chapter 1" instead of "1:Intro".
All i want is at every page (except from the first page of each chapter) to show the page number and the title of that chapter
Best Answer
Here's one possibility using the
titlesec
package: according to comments, the chapter number had to be removed. Also, there's no need to use the redefinition for\@makechapterhead
; all formatting aspects can be modified/controlled in an easier way using\titleformat
:For the second layout, you can do something like the following (I should mention that having the page number in the chapter heading seems a little strange):
After comments added to the original question, I think that now I know what was requested: the following example shows a modification of the formatting for chapter headings and also a modification to the headers achieved with the help of the fancyhdr package: