2

Take a look at this page layout

enter image description here

I would like to achieve a result like the above in the booklet I am writing. Here is what I have so far

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage[lmargin=0.7cm, rmargin=1cm, vmargin=1.5cm]{geometry}
\renewcommand{\qedsymbol}{$\blacklozenge$}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{eulervm}
\usepackage{esint}

\usepackage{fontawesome}
\renewcommand{\thefootnote}{\faDatabase}

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\lhead{Mathematical Analysis ... }
\chead{... \textit{A collection of problems}} 
\rhead{Version 6}
\cfoot{Page \@ \thepage \@ of 24}
\lfoot{Typesetting \LaTeX }
\rfoot{\textbf{Editor:} Tolaso J. Kos}
\renewcommand{\headrulewidth}{2pt}
\renewcommand{\footrulewidth}{0.5pt}

\usepackage{tcolorbox}


\usepackage{tikz} 
\usetikzlibrary{intersections,backgrounds}
\usepackage{pgfplots}
\usepgfplotslibrary{colormaps}

\usepackage[shortlabels]{enumitem}
\usepackage{bigints}
\usepackage{cancel}
\usepackage{multicol}
\setlength{\parskip}{\baselineskip}%
\setlength{\parindent}{0.5pt}%
\usepackage{xcolor}

%definition of dark red
\definecolor{DarkBlue}{RGB}{102, 153, 255}
\definecolor{LightBlue}{RGB}{51, 102, 255}
\usepackage{afterpage}

\makeatletter
% Macro \changepagecolor has the same syntax as \pagecolor or \color
% with an optional argument and a mandatory argument.
\newcommand*{\changepagecolor}{%
  \@ifnextchar[\@changepagecolor@i\@changepagecolor@ii
}
% Case: \changepagecolor[...]{...}
\def\@changepagecolor@i[#1]#2{%
  \@changepagecolor@do{[{#1}]{#2}}%
}
% Case: \changepagecolor{...}
\newcommand*{\@changepagecolor@ii}[1]{%
  \@changepagecolor@do{{#1}}%
}
\newcommand*{\@changepagecolor@do}[1]{%
  % Fill the remaining space with a colored rule
  \begingroup
    \offinterlineskip
    \hbox to 0pt{%
      \kern-\paperwidth
      \vtop to 0pt{%
        \color#1%
        \hrule width 5\paperwidth height \paperheight
        \vss
      }%
      \hss
    }%
  \endgroup
}
\makeatother

\usepackage{pagecolor}
\usepackage{atbegshi} % for '\AtBeginShipout' macro
% Make page color "light red" *after* page 2
\AtBeginShipout{\ifnum\value{page}=1\pagecolor{white}\fi}

%the title of this project

\newcommand{\mytitle}{\textbf{Mathematical Analysis}}
\newcommand{\mydescription}{\textbf{A collection of problems}}
\newcommand{\mytiny}{\textbf{Real \& Complex Analysis - General Topology - Multivariable Calculus  - Integrals and Series}}

%font for name

\usepackage{pbsi}


\begin{document}
\begin{flushleft}

\thispagestyle{empty}

\pagecolor{DarkBlue}

\begin{center}
{\Huge \mytitle} 

{\Large \mydescription}

{\tiny \mytiny}
\end{center}

\topskip0pt
\vspace*{\fill}

\changepagecolor{LightBlue}

\begin{multicols}{2}
    \begin{tikzpicture}
    \begin{axis}[
    view={120}{40},
    grid=major,
    xmin=-4,xmax=4,
    ymin=-4,ymax=4,
    zmin=-1,zmax=10,
    enlargelimits=upper,
    colormap/bone,
    trig format plots=rad,
    ]
    \addplot3 [ surf, domain=-4:4, domain y=-4:4,
    samples=20, samples y=20,
    variable=\u, variable y=\v,
    point meta=u*v ]
    ( {u}, {v}, {cos(u) + cos(v)} );
    \end{axis}
    \end{tikzpicture}

    \begin{tikzpicture}
    %axis 
    \draw (-.5,0) -- (6.5,0);  

    %curve  
    \draw[yshift=1cm,name path=curve] (-.5,0) %vertically shiftable
    to[out=70,in=180] (.7,1.5)
    to[out=0,in=180] (2,.5)
    to[out=0,in=180] (4.5,2.5)
    to[out=0,in=160] (6.5,1);

    %rectangles
    \begin{scope}[on background layer]
    \foreach \x in {0,1,2,3, 4,5}{
        \path[name path=line \x] (\x,0) -- (\x,4);
        \path[name intersections={of=curve and line \x, by={isect \x}}];    
        \draw[fill=gray!50] (isect \x) rectangle (\x+1,0);
        \draw[fill] (isect \x) circle [radius=2pt];
    }
    \end{scope}    
    \end{tikzpicture}
\end{multicols}
\vspace*{\fill}


\begin{center}

    {\Huge {\color{white}{Version 6 }}}
\end{center}

\vfill


\begin{center}
    {\Huge \textbf{\textbsi{Tolaso J. Kos}}}
\end{center}

\end{flushleft}
\end{document}

and produces

enter image description here

which is not that bad . But I would like to have a result like the above. I have read some topics here in TeX SE but I find it quite complicated. I would really appreciate your help.

  • It's not clear to me what you are looking for... It's the color gradient? – Rmano Nov 18 '17 at 20:41
  • Well I am looking for a way to produce something like the first photo I attached !! I cannot match neither the gradient nor the transparency of the blue color ... in my example I have used two different colors to do my job but there must be something else !! – Tolaso Nov 18 '17 at 20:48
  • If it's just the first page I would do it with a big, full page scale tikzpicture positioning it "by hand". No time now, I'll see if I can do something tomorrow... You can look at tex.stackexchange.com/questions/59672/titlepage-with-tikz – Rmano Nov 18 '17 at 23:01
  • I do not see how this answers my question – Tolaso Nov 19 '17 at 4:58
3

Just a starting point, from Titlepage with tikz:

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{calc,positioning, shadings}% [0]

\begin{document}
\begin{titlepage}
\begin{tikzpicture}[overlay,remember picture]
    % set a new origin [1]
    \coordinate (O) at (current page.south west);
    % bg
    \fill [left color=orange!60!yellow, right color=red!50!black] 
        (current page.south west) rectangle (current page.north east) ;
    % inset; position coordinates
    \coordinate (A) at ($(O)+(0.2\paperwidth,0.7\paperheight)$);
    \coordinate (B) at ($(O)+(0.2\paperwidth,0.3\paperheight)$);
    % maybe you need to do tricks if you want best color merging
    % note that I store the position of the rigth-lower point of the inset
    \fill [red!60!black, ] 
        (A) rectangle ($(B)+(0.6\paperwidth,0)$) coordinate(C);
    % the last coordinate is the point reached horizontally from A and 
    % vertically from C 
    \draw[white] (C) -- (B) -- (A) -- (A -| C);
    % next node will be midway between A and C, anchored at the center
    \node at ($(A)!0.5!(C)$) [%
        anchor = center,
        ] {\includegraphics[width=5cm]{example-image}};
    % white framed box
    \node at (current page.south) [%
        draw=red,
        inner sep=15pt,
        fill=white,
        above=5cm,
        font=\sffamily\bfseries\Huge
    ] {The book title};
\end{tikzpicture}
\end{titlepage}
\end{document}

...which you can change to adapt to your style, I think, quite easily.

shadings

  • This is perfect. I had to hack that code a bit to adjust it to my needs. For example I had to remove the option for the includegraphics etc. Now I have another problem. I am using the package geometry to set margins e.g \usepackage[lmargin=0.7cm, rmargin=1cm, vmargin=1.5cm]{geometry} and the titlepage goes to page 2 automatically ... Is there any way I disable this or at least force LaTeX to place the titlepage in Page 1? – Tolaso Nov 19 '17 at 13:22

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.