I see some layout in a book that I liked, and I'm trying to make something that looks like it, but I'm unaware of how it should be done.

Layout intended (these are two pages separated)

  1. First page

enter image description here

2.Second page

enter image description here

But I'm stuck, since I can't fix the location of the elements, and the color of the rule, can't get the line of the square to go out or be the same as the fill. And I have no idea about making the example cages (I'm aware there is a bitmap pattern there, it doesn't matter, I wanted the same color to fill all the box).







  \draw[fill=color1] (0, 0) rectangle (2, 2);
    (0, 0) node[below left] {}
    (2, 0) node[below right] {}
    (2, 2) node[above right] {}
    (0, 2) node[above left] {}

enter image description here

  • 1
    1) Don't load xcolor twice 2) Is your actual class article? I'm asking it because \copypagestyle is a memoir command.
    – CarLaTeX
    Commented Nov 26, 2021 at 6:33
  • Hum... to be fair I have always used \copypagestyle in this way, so I was thinking this is from the article family. But indeed, the intended classis article.
    – riccs_0x
    Commented Nov 26, 2021 at 17:48
  • \copypagestyle gives Undefined control sequence. with article class
    – CarLaTeX
    Commented Nov 26, 2021 at 20:11

1 Answer 1


I hope to have understood (almost) all your needs.

I did the example box breakable, but if you would like it not to break across pages, just leave out breakable option.

I did the example title background gray, but you can also add an image, to reproduce the background you like.

Look also at the comments in my MWE:

\documentclass[12pt, twoside]{article}
%\usepackage[utf8]{inputenc}%<--- no more needed since April 2018
%\geometry{verbose,tmargin=1.5cm,bmargin=1.5cm,lmargin=1.5cm,rmargin=1.5cm}%<--- Are you sure of these dimensions? They don't correspond to the pictures of your posted
\geometry{verbose,tmargin=3cm,bmargin=2cm,lmargin=2cm,rmargin=2cm, nomarginpar}

%\usepackage{fancyhdr,xcolor}<-- Load xcolor only once


%\usepackage{color}<--- You already loaded xcolor

% Page numenber layout
% Section layout

% Caption layout
\captionsetup[figure]{singlelinecheck=off,format=myformat, name=FIGURE, width=.7\textwidth}

% Example layout


    extitle/.style={adjusted title={\bfseries EXAMPLE~\thetcbcounter\ifstrempty{#1}{\ignorespaces}{~#1}}}}

\newtcolorbox[auto counter, number within=section]{example}[1][]{%
    before skip = 8pt plus 2pt minus 2pt,
    before upper={\parindent0pt},
    enhanced jigsaw,
    sharp corners,

\usepackage{lipsum}%<--- for testing purpose only

\section{Are you sure you want an article?}
From you image it seems you need a book or a report.
\lipsum[1]%<--- for testing purpose only
\lipsum[1]%<--- for testing purpose only
\lipsum[1]%<--- for testing purpose only
\lipsum[1]%<--- for testing purpose only
\lipsum[1]%<--- for testing purpose only

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .