I'm trying to get the following code to work. But the command \c@section simply does not work. I'm unable to get the section number using \the\c@section as well. I want to apply the layout if the section number is greater or equal to 1.
Code: Select all
\fancyput(0cm,0cm){
\ifthenelse{\c@section<1}%
{}%
{\ifthenelse{\isodd{\thepage}}%
{{\dottedline{2}(383,70)(383,-691)(550,-691)}}%
{{\dottedline{2}(87,70)(87,-691)(-70,-691)}}
}}%
What am I doing wrong? The section number is given by \c@section, right?
Thank you!
The full example is:
Code: Select all
\documentclass[% -- opções da classe memoir --
book, % indica que é um artigo acadêmico
12pt, % tamanho da fonte
twoside, % para impressão apenas no verso. Oposto a twoside
a4paper, % tamanho do papel.
% -- opções da classe abntex2 --
%chapter=TITLE, % títulos de capítulos convertidos em letras maiúsculas
%section=TITLE, \ % títulos de seções convertidos em letras maiúsculas
%subsection=TITLE, % títulos de subseções convertidos em letras maiúsculas
%subsubsection=TITLE % títulos de subsubseções convertidos em letras maiúsculas
% -- opções do pacote babel --
english, % idioma adicional para hifenização
brazil, % o último idioma é o principal do documento
sumario=tradicional]{memoir}
\let\footruleskip\undefined
\usepackage{fancyhdr}
\usepackage{lipsum}
\usepackage[brazil]{babel}
\usepackage{color}
\usepackage{fancybox, epic, ifthen}
\usepackage[authoryear]{natbib}
\usepackage[font=small,format=hang,singlelinecheck=false,skip=12pt,labelsep=quad,labelfont=bf]{caption}
\usepackage{concrete}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[letterpaper]{geometry}
\addto\captionsbrazil{\renewcommand\indexname{Índice Remissivo}}
\addto\captionsbrazil{\renewcommand\chaptername{UNIDADE}}
\definecolor{cinzauab}{gray}{0.73}
\newcommand{\tracocima}{{\color{cinzauab}\rule[1cm]{\paperwidth}{1.5cm}}}
\newcommand{\tracobaixo}{{\color{cinzauab}\rule[-2cm]{\paperwidth}{1.5cm}}}
\def\@makechapterhead#1{%
\thispagestyle{empty}%
\vspace*{5.55cm}%
\hspace*{-2.9cm}
\tracocima
\vspace*{0.5cm}
\hspace*{0.4cm}{\fontsize{38}{12}\fontfamily{phv}\fontseries{bc}\selectfont \chaptername \space \thechapter}\par
\vspace*{2.4cm}
\noindent\hspace*{0.3cm}{\huge #1}\par
\vspace*{1in}
\hspace{-2.9cm}
\tracobaixo
\pagebreak
\newpage \thispagestyle{empty}\null \newpage
}
\fancyput(0cm,0cm){
\ifthenelse{\c@section<1}%
{}%
{\ifthenelse{\isodd{\thepage}}%
{{\dottedline{2}(383,70)(383,-691)(550,-691)}}%
{{\dottedline{2}(87,70)(87,-691)(-70,-691)}}
}}%
\fancyhead{}%
\fancyfoot{}%
\fancyfoot[RO]{\vspace*{-1cm}{\large\thepage}\hspace*{-4.7cm}}
\fancyfoot[LE]{\vspace*{-1cm}\hspace*{-4.8cm}{\large\thepage}}
\renewcommand{\headrulewidth}{0pt}
\author{NAME OF AUTHOR}
\author{NAME OF AUTHOR}
\title{TITLE OF BOOK}
\date{}
\begin{document}
\let\cleardoublepage\clearpage
\maketitle
%\chapter{teste}
f
gfgdfg
\section{test}
\lipsum
\end{document}