[Tex/LaTex] How to design a nice looking chapter title and page

chaptersheader-footernumberingpositioningreport

I want to create something like the images I have below:

this

( I couldn't draw well the chapter number and its font)

and

this

( 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 this image

I want that image

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:

\documentclass{book}
\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}

\chapter{A Test Chapter}

\end{document}

enter image description here

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):

\documentclass{book}
\usepackage[explicit]{titlesec}
\usepackage{tikz}

\titleformat{\chapter}[display]
  {\Large\scshape}
  {}{0ex}
  {\colorbox{green!50!black!10}{\colorbox{green!50!black!20}{\parbox{1cm}{\thepage}}\parbox{\dimexpr\textwidth-2\fboxsep-1cm\relax}{\filcenter\vskip1ex\chaptername~\thechapter: #1\vskip1ex}}}

\begin{document}

\chapter{A Test Chapter}

\end{document}

enter image description here

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:

\documentclass[a4paper,12pt,oneside]{report} 
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage[explicit]{titlesec}
\usepackage{fancyhdr}
\usepackage{tikz}
\usepackage{lipsum}% just to generate filler text for the example

 %----------------------------for changing the chapter format-------------------
\titleformat{\chapter}[display]
  {\LARGE\scshape\bfseries}
  {\filleft\tikz\node[fill=green!50!black!10,rectangle,rounded corners=6pt] (chap) {\chaptertitlename~\thechapter};}
  {0ex}
  {\colorbox{green!50!black!10}{\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\vskip1ex#1\vskip1ex}}}

 %----------------------------for changing the header-------------------
\fancyhf{}
\fancyhead[L]{\colorbox{green!50!black!10}{\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\colorbox{green!50!black!40}{\thepage:} \leftmark}}}
\renewcommand\headrulewidth{0pt}
\setlength\headheight{24pt}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{% 
  \markboth{#1}{}} 

\makeatletter
\let\ps@plain\ps@empty
\makeatother

\begin{document}

\tableofcontents

\chapter {Intro}
\section {Another}
\lipsum[1-15]
\chapter {Two}
\section {History2}
\lipsum[1-15]

\end{document}
Related Question