Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to produce this particular template in LaTeX. With no page numbering, and rectangles in colours in a a4paper.

sample made with Word

share|improve this question
6  
I think this question is too localised. "How to create this exact layout" is not a good question for the Q&A format. Perhaps rephrase the question to ask about one specific thing you're having trouble doing. What have you tried so far? –  Seamus Nov 1 '11 at 12:46
3  
@Patrick: This question shows no effort whatsoever. At least getting rid of page numbers is trivial (to find out about), even for beginners. Finding out about headers isn't too hard, either. The colored box is trickier; asking about that would be a specific and valid question. The way it is now, it smells too much like "please do the work for me" if you're asking me. Thinking about tex.sx as a resource for other users, it's pretty unlikely other users will benefit a lot from this question, unless they're searching for "this particular template" ... –  doncherry Nov 1 '11 at 13:15
1  
Have a look at Title page using TikZ which should also work for general headers. Just put the tikzpicture environment in the header. –  Martin Scharrer Nov 1 '11 at 13:28
4  
No page numbering trivial: agree. Colored box trivial: agree. But this color box in header is not trivial for me, and that is the question, and I dont want "anyone do the work for me", maybe my english is poor (Im Chilean Math&Stat teacher at University) sorry for that but this Q&A format page is the best way to question for that... And I love this page (Is my Homepage in Safari!!). –  hsigrist Nov 1 '11 at 13:32
1  
@Patrick If the question were rephrased to "How do I create a coloured header, then I think it would be a great, focused, answerable, useful question. How about it, @hsigrist? –  Seamus Nov 1 '11 at 15:19
show 6 more comments

1 Answer 1

up vote 16 down vote accepted

Eventhough this question does not show a large amount of effort on your part, you can remove page numbering with \thispagestyle{empty}. To draw the box you desire at the top of the page, you can use TikZ.

\documentclass{book}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{lipsum}
\def\particulartemplate#1{
  \thispagestyle{empty}
  \begin{tikzpicture}[overlay, remember picture]
    \draw let \p1 = (current page.west), \p2 = (current page.east) in
      node[minimum width=\x2-\x1, minimum height=2cm, draw, rectangle, fill=blue!20, anchor=north west, align=left, text width=\x2-\x1] at ($(current page.north west)$) {\Large\bfseries \quad #1};
  \end{tikzpicture}
}
\begin{document}
  \chapter{Chapter one}
    \particulartemplate{NATURAL SCIENCES}
    \lipsum[1-7]
\end{document}

This will make every page on which you invoke \particulartemplate{Text for box} to be layed out according to your particular template. The example code provided will look like this:

page with box typeset at top

It should be relatively straightforward to modify this code to be a little more flexible. (As in, take the color as an argument, whether or not there should be a border, how the text should be justified, etc.)

share|improve this answer
    
I use texlive2011, compile this code under PDFTeXify two times, then get the image. But when I compile it under XeLaTeX two times, the "NATURAL SCIENCES" is in the top of the box. Sometimes, XeLaTeX makes a problem. –  Pig Cry Nov 1 '11 at 14:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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