I am fighting with a very horrible master thesis template. Some smart _ss designed some features which couldn't be done in MS Word without manual correction so I'm trying to make it works in LaTeX to hack it.

Here is some deal breakers: The thesis template preview

The chapter format - Times New Roman, 14pt, Red color (incl. chapter number), capitalized, with line at the right side for even page and at the left side for odd page and with the number of the chapter.

The section format - Times New Roman, 12pt, with line at the right side for even page and at the left side for odd page and with the number of the section.

Same with subsection.

Heading and footer have colored line with a different page numbering for odd/even pages.

I've worked with LaTeX in past and I have a decent LaTeX knowledge but this is totally out of my skills. Could somebody, please, help me with definitions of those dealbreaker?

  • 1
    Welcome to TeX.SX! Nice nickname! It looks like Italian, but you're writing in Czech. Hmm…
    – egreg
    Jan 24 '17 at 16:17
  • @egreg Just for curiosity, I put "sto cosi cosi" into Google translator from Czech to Italian and I get "un centinaio e qualcosa qualcosa". I'm wondering if they know that in Italian it means "Jsem tak tak"... :):):)
    – CarLaTeX
    Jan 24 '17 at 17:10
  • @CarLaTeX Ofcourse I do! | Certo, lo so. | Samozřejmě, že vím. ;-)
    – KUTlime
    Jan 26 '17 at 6:32
  • A very funny thing!
    – CarLaTeX
    Jan 26 '17 at 6:34
  • It looks like you've got two separate accounts, which means you cannot edit your original post or leave comments. The Stack Exchange staff can merge them together for you.
    – Dai Bowen
    Feb 21 '17 at 16:13

Here is a way the sectioning commands layout with titlesec:

\documentclass[a4paper]{report}% http://ctan.org/pkg/amsproc
\SetTracking[no ligatures={f}]{encoding=*}{80}


{\checkoddpage\ifoddpage\llap{\makebox[\dimexpr\marginparsep+\marginparwidth\relax][l]{\rule[-1.25ex]{\marginparwidth}{0.5ex}\llap{\thechapter}}}\else\thechapter\enspace \fi}
{\MakeUppercase{#1}\checkoddpage\ifoddpage\else\hfill\rlap{\makebox[\dimexpr\textwidth + \marginparsep][l]{\hspace{\marginparsep}\rlap{\rule[-1.25ex]{\marginparwidth}{0.5ex}}\thechapter}}\fi}%\titlerule[1.5pt]
{\checkoddpage\ifoddpage\llap{\makebox[\dimexpr\marginparsep+\marginparwidth\relax][l]{\rule[-1.25ex]{\marginparwidth}{0.5ex}\llap{\thesection}}}\else\thesection\enspace \fi}
{#1\checkoddpage\ifoddpage\else\hfill\rlap{\makebox[\dimexpr\textwidth + \marginparsep][l]{\hspace{\marginparsep}\rlap{\smash{\rule[-1.25ex]{\marginparwidth}{0.5ex}}}\thesection}}\fi}%\titlerule[1.5pt]

{\checkoddpage\ifoddpage\llap{\makebox[\dimexpr\marginparsep+\marginparwidth\relax][l]{\rule[-1.25ex]{\marginparwidth}{0.5ex}\llap{\thesubsection}}}\else\thesubsection\enspace \fi}
{#1\checkoddpage\ifoddpage\else\hfill\rlap{\makebox[\dimexpr\textwidth + \marginparsep][l]{\hspace{\marginparsep}\rlap{\smash{\rule[-1.25ex]{\marginparwidth}{0.5ex}}}\thesubsection}}\fi} \titlespacing*{\subsection}{0pt}{1ex}{0.5ex}





\subsection{A First Motivation}





\subsection{A First Motivation}



enter image description here

  • Bernard, thank you! It is possible to do it somehow with side numbers only on even pages? The odd pages should be only with the color line and no numbers.
    – KUTlime
    Jan 25 '17 at 8:38
  • @Sto.cosi.cosi: Please see my updated answer. I do it with the \isoddpage test from changepage. Note it requires two compilations.
    – Bernard
    Jan 25 '17 at 9:42
  • Thx for the updated version. The lines should at odd pages should be on the left edge, next to numbers. I've tried to mess around little bit with your code but again, I wasn't successful. Could you help me again, please?
    – KUTlime
    Feb 2 '17 at 13:51
  • @Sto.cosi.cosi: I've adjusted my answer. Does it fit better what you want?
    – Bernard
    Feb 3 '17 at 1:31
  • I think the lines should be in the outer margin, and the OP just confused stuff.
    – Johannes_B
    Feb 21 '17 at 17:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.