2

can someone help me to do the following?

enter image description here

This is my code:

\documentclass[twocolumn,spanish,10pt, letterpaper,openany]{scrbook}
\usepackage{lipsum}
\usepackage{multicol}
\usepackage{polyglossia}
\setmainlanguage{spanish}
\usepackage[siunitx,european,americanresistors]{circuitikz}
\usepackage{tikz}
\usepackage{pstricks-add}
\usepackage{calc}
\usepackage{amsmath}
\usepackage{epigraph}
\usepackage{graphicx}
\usepackage{pgfplots}
\usepackage[many]{tcolorbox}
\usepackage{etoolbox}
\usepackage{color} 
\usepackage{array}
\definecolor{mygreen}{RGB}{28,172,0} 
\definecolor{mylilas}{RGB}{170,55,241}
\definecolor{lightgray}{gray}{0.5}
\setlength{\parindent}{0pt}
\definecolor{lightgray}{gray}{0.5}
\usepackage{cancel}
\usepackage{mathrsfs}
\setlength\parindent{15pt}
\usepackage[letterpaper]{geometry}
\newlength\imargin
\newlength\omargin
\setlength\imargin{3.2cm}
\setlength\omargin{2.5cm}
\geometry{
  inner  = \imargin ,
  outer  = \omargin ,
  top    = 2.5cm ,
  bottom = 2cm
}
\renewcommand\epigraphflush{flushright}
\renewcommand\epigraphsize{\normalsize}
\setlength\epigraphwidth{0.7\textwidth}
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
\definecolor{logo1}{HTML}{425C00}
\definecolor{logo2}{HTML}{FFFF10}
\definecolor{logo3}{HTML}{425C00}
\definecolor{logo4}{HTML}{854DC1} % Color de la ley de ohm
\colorlet{mygray}{black!20} % 
\usepackage{tikz,xcolor}
\usetikzlibrary{positioning}
\usepackage{scrpage2}
\pagestyle{scrheadings}
\renewcommand*\chapterpagestyle{scrheadings}
\clearscrheadfoot

\newcommand*\logo{%
  \textcolor{logo1}{\scalebox{1.3}{Itm} \scalebox{2}{Ing. electrónica}} \\
  d20\scalebox{2}{MODERN}}
\tikzset{
  logo1/.style={
    color = mygray ,
    font  = \normalfont\sffamily\Large\bfseries ,
    inner sep = .25in ,
    align = center
  },
  page/.style={
    color  = white ,
    fill   = logo1 ,
    font   = \normalfont\sffamily\Huge\bfseries ,
    minimum size = \omargin-.2in ,
    yshift = 2in
  },
  chapter/.style={
    color = mygray ,
    scale = 1.5 ,
    transform shape ,
    font  = \normalfont\sffamily\Huge\bfseries ,
  }
}
\ohead{

\begin{tikzpicture}[remember picture, overlay]

 \ifthispageodd
   {\node[below left,logo1] at (current page.north east)}
   {\node[below right,logo1] at (current page.north west)}
   {\logo1};

 % page number:
 \ifthispageodd
   {\node[left,page] at (current page.east)}
   {\node[right,page] at (current page.west)}
   {\thepage} ;
 % chapter mark:
 \ifthispageodd
   {\node[anchor=north east,rotate=-90,chapter] at (current page.south east)}
   {\node[anchor=north west,rotate=90,chapter] at (current page.south west)}
   {Ing. Electrónica} ;
 \ifthispageodd
   {
     \draw[mygray,very thin]
       (current page.south east)++(-.6in,0)--++(0,.6\paperheight) ;
   }
   {
     \draw[mygray,very thin]
       (current page.south west)++(.6in,0)--++(0,.6\paperheight) ;
   }
\end{tikzpicture}
\ifthispageodd
{}
{}
{};

}

\usepackage{charter}

\usepackage[explicit]{titlesec}
\usepackage{xcolor}
\usepackage{charter}
\definecolor{mybluei}{RGB}{28,138,207}
\definecolor{myblueii}{RGB}{131,197,231}

\newcommand\ChapterFont{\selectfont}
\newcommand\SectionFont{\selectfont}

\newlength{\chapterfontsize}
\setlength{\chapterfontsize}{30pt}
\newlength{\sectionfontsize}
\setlength{\sectionfontsize}{14pt}
\newlength{\subsectionfontsize}
\setlength{\subsectionfontsize}{12pt}

\titleformat{\chapter}[display]
  {\normalfont\ChapterFont\fontsize{\chapterfontsize}{\chapterfontsize}}%
  {\newpage}
  {0pt}
  {% <-- REMOVED INDENTATION
    \begin{tikzpicture}[remember picture, overlay]
        \fill[mygray] (current page.north west) rectangle (current page.south);
        \draw (current page.north) ++(0,-2in) node[white,fill=logo1,inner sep=0.20em,align=center,minimum width=.55\textwidth](chapapp){{}{{\chapapp\space\thechapter:}}};
        \node[anchor=north,white,fill=logo1!85,inner sep=.25em,xshift=-.6in]
        at (chapapp.south)
        {\scalebox{1}{\bfseries\MakeUppercase{#1}\hspace*{.2in}}};
    \end{tikzpicture}
    \vspace{1cm}
    }%
%--------
\begin{document}
\chapter{Test}
\lipsum[1-10]
\section{test}
\lipsum[1-5]
\end{document}  

I can not get the text of the chapters to start in the right column enter image description here

  • 3
    Try putting \null\newpage at the beginning. – barbara beeton Mar 31 at 19:03
  • Thanks, but there is some way to add these commands so that it is done automatically every time a chapter is created? – Pascual Chavez Mar 31 at 19:15
0

The solution I will give is not that good I think, but it perfectly works:

    \documentclass[twocolumn,spanish,10pt, letterpaper,openany]{scrbook}
\usepackage{lipsum}
\usepackage{multicol}
\usepackage{polyglossia}
\setmainlanguage{spanish}
\usepackage[siunitx,european,americanresistors]{circuitikz}
\usepackage{tikz}
\usepackage{pstricks-add}
\usepackage{calc}
\usepackage{amsmath}
\usepackage{epigraph}
\usepackage{graphicx}
\usepackage{pgfplots}
\usepackage[many]{tcolorbox}
\usepackage{etoolbox}
\usepackage{color} 
\usepackage{array}
\definecolor{mygreen}{RGB}{28,172,0} 
\definecolor{mylilas}{RGB}{170,55,241}
\definecolor{lightgray}{gray}{0.5}
\setlength{\parindent}{0pt}
\definecolor{lightgray}{gray}{0.5}
\usepackage{cancel}
\usepackage{mathrsfs}
\setlength\parindent{15pt}
\usepackage[letterpaper]{geometry}
\newlength\imargin
\newlength\omargin
\setlength\imargin{3.2cm}
\setlength\omargin{2.5cm}
\geometry{
  inner  = \imargin ,
  outer  = \omargin ,
  top    = 2.5cm ,
  bottom = 2cm
}
\renewcommand\epigraphflush{flushright}
\renewcommand\epigraphsize{\normalsize}
\setlength\epigraphwidth{0.7\textwidth}
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
\definecolor{logo1}{HTML}{425C00}
\definecolor{logo2}{HTML}{FFFF10}
\definecolor{logo3}{HTML}{425C00}
\definecolor{logo4}{HTML}{854DC1} % Color de la ley de ohm
\colorlet{mygray}{black!20} % 
\usepackage{tikz,xcolor}
\usetikzlibrary{positioning}
\usepackage{scrpage2}
\pagestyle{scrheadings}
\renewcommand*\chapterpagestyle{scrheadings}
\clearscrheadfoot

\newcommand*\logo{%
  \textcolor{logo1}{\scalebox{1.3}{Itm} \scalebox{2}{Ing. electrónica}} \\
  d20\scalebox{2}{MODERN}}
\tikzset{
  logo1/.style={
    color = mygray ,
    font  = \normalfont\sffamily\Large\bfseries ,
    inner sep = .25in ,
    align = center
  },
  page/.style={
    color  = white ,
    fill   = logo1 ,
    font   = \normalfont\sffamily\Huge\bfseries ,
    minimum size = \omargin-.2in ,
    yshift = 2in
  },
  chapter/.style={
    color = mygray ,
    scale = 1.5 ,
    transform shape ,
    font  = \normalfont\sffamily\Huge\bfseries ,
  }
}
\ohead{

\begin{tikzpicture}[remember picture, overlay]

 \ifthispageodd
   {\node[below left,logo1] at (current page.north east)}
   {\node[below right,logo1] at (current page.north west)}
   {\logo1};

 % page number:
 \ifthispageodd
   {\node[left,page] at (current page.east)}
   {\node[right,page] at (current page.west)}
   {\thepage} ;
 % chapter mark:
 \ifthispageodd
   {\node[anchor=north east,rotate=-90,chapter] at (current page.south east)}
   {\node[anchor=north west,rotate=90,chapter] at (current page.south west)}
   {Ing. Electrónica} ;
 \ifthispageodd
   {
     \draw[mygray,very thin]
       (current page.south east)++(-.6in,0)--++(0,.6\paperheight) ;
   }
   {
     \draw[mygray,very thin]
       (current page.south west)++(.6in,0)--++(0,.6\paperheight) ;
   }
\end{tikzpicture}
\ifthispageodd
{}
{}
{};

}

\usepackage{charter}

\usepackage[explicit]{titlesec}
\usepackage{xcolor}
\usepackage{charter}
\definecolor{mybluei}{RGB}{28,138,207}
\definecolor{myblueii}{RGB}{131,197,231}

\newcommand\ChapterFont{\selectfont}
\newcommand\SectionFont{\selectfont}

\newlength{\chapterfontsize}
\setlength{\chapterfontsize}{30pt}
\newlength{\sectionfontsize}
\setlength{\sectionfontsize}{14pt}
\newlength{\subsectionfontsize}
\setlength{\subsectionfontsize}{12pt}

\titleformat{\chapter}[display]
  {\normalfont\ChapterFont\fontsize{\chapterfontsize}{\chapterfontsize}}%
  {\newpage}
  {0pt}
  {% <-- REMOVED INDENTATION
    \begin{tikzpicture}[remember picture, overlay]
        \fill[mygray] (current page.north west) rectangle (current page.south);
        \draw (current page.north) ++(0,-2in) node[white,fill=logo1,inner sep=0.20em,align=center,minimum width=.55\textwidth](chapapp){{}{{\chapapp\space\thechapter:}}};
        \node[anchor=north,white,fill=logo1!85,inner sep=.25em,xshift=-.6in]
        at (chapapp.south)
        {\scalebox{1}{\bfseries\MakeUppercase{#1}\hspace*{.2in}}};
    \end{tikzpicture}
    \vspace{1cm}
    }%
%--------

 %%%%% THIS MAKES IT WORK
 %%%%% THIS MAKES IT WORK
 %%%%% THIS MAKES IT WORK
\newcommand{\starthalfpage}{\quad \\[50em]}
 %%%%% THIS MAKES IT WORK
 %%%%% THIS MAKES IT WORK
 %%%%% THIS MAKES IT WORK

\begin{document}
\chapter{Test}
 % USING THE MACRO
\starthalfpage

\lipsum[1-10]
\section{test}
\lipsum[1-5]
\end{document}  

(nice layout by the way :-)

enter image description here

  • Thanks for your response, but I wanted this to be done automatically every time a chapter is created. – Pascual Chavez Apr 2 at 4:29
  • Maybe redefining the \chapter command with \starthalfpage in it? (did you noticed that on the second chapter, the gray space is crossing the text?) – Arne Timperman Apr 2 at 6:03
  • I will try, and what you mention about the gray box in the even chapters. I could solve it by changing the margins. Although I need to find the way I always take the settings of an odd chapter regardless of whether the sheet is odd or even. – Pascual Chavez Apr 2 at 6:24

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.