2

How do I get the line under chapter 1 to follow the whole A3 paper? like the line at the bottom does.

 \documentclass[a4paper,11pt,fleqn,twoside,openany]{memoir}
 \usepackage{lipsum}
 \usepackage[dvipsnames]{xcolor}
 \makepagestyle{Uni}
 \makepsmarks{Uni}{%
 \createmark{chapter}{left}{shownumber}{}{. \ }
 \createmark{section}{right}{shownumber}{}{. \ }
 \createplainmark{toc}{both}{\contentsname}
 \createplainmark{lof}{both}{\listfigurename}
 \createplainmark{lot}{both}{\listtablename}
 \createplainmark{bib}{both}{\bibname}
 \createplainmark{index}{both}{\indexname}
 \createplainmark{glossary}{both}{\glossaryname}
 }
 \makeevenhead{Uni}{example}{}{\leftmark}
 \makeoddhead{Uni}{\rightmark}{}{example}           
 \makeevenfoot{Uni}{\thepage}{}{}                           
 \makeoddfoot{Uni}{}{}{\thepage}                                
 \makeheadrule{Uni}{\textwidth}{0.5pt}                      
 \makefootrule{Uni}{\textwidth}{0.5pt}{1mm}                 

 \copypagestyle{Unichap}{Uni}                               
 \makeoddhead{Unichap}{}{}{}
 \makeevenhead{Unichap}{}{}{}
 \makeheadrule{Unichap}{\textwidth}{0pt}
 \aliaspagestyle{chapter}{Unichap}                          
 \pagestyle{Uni}

 \newsavebox{\ChpNumBox}
 \definecolor{ChapBlue}{RGB}{120,200,240}
 \makeatletter
 \newcommand*{\thickhrulefill}{%
 \leavevmode\leaders\hrule height 1\p@ \hfill \kern \z@}
 \newcommand*\BuildChpNum[2]{%
 \begin{tabular}[t]{@{}c@{}}
 \makebox[0pt][c]{#1\strut} \\[.5ex]
 \colorbox{ChapBlue}{%
 \rule[-3,5em]{0pt}{0pt}%
 \rule{1ex}{0pt}\color{black}#2\strut
 \rule{1ex}{0pt}}%
 \end{tabular}}
 \makechapterstyle{BlueBox}{%
 \renewcommand{\chapnamefont}{\large\scshape}
 \renewcommand{\chapnumfont}{\Huge\bfseries}
 \renewcommand{\chaptitlefont}{\raggedright\Huge\bfseries}
 \setlength{\beforechapskip}{10pt}
 \setlength{\midchapskip}{16pt}
 \setlength{\afterchapskip}{10pt}
 \renewcommand{\printchaptername}{}
 \renewcommand{\chapternamenum}{}
 \renewcommand{\printchapternum}{%
 \sbox{\ChpNumBox}{%
 \BuildChpNum{\chapnamefont\@chapapp}%
 {\chapnumfont\thechapter}}}
 \renewcommand{\printchapternonum}{%
 \sbox{\ChpNumBox}{%
 \BuildChpNum{\chapnamefont\vphantom{\@chapapp}}%
 {\chapnumfont\hphantom{\thechapter}}}}
 \renewcommand{\afterchapternum}{}
 \renewcommand{\printchaptertitle}[1]{%
 \usebox{\ChpNumBox}\hfill
 \parbox[t]{\hsize-\wd\ChpNumBox-1em}{%
 \vspace{\midchapskip}%
 \thickhrulefill\par
 \chaptitlefont ##1\par}}%
 } 
 \chapterstyle{BlueBox}    

 \begin{document}



 \thispagestyle{empty}
 {\pdfpagewidth=2\pdfpagewidth
 \textwidth=350mm

 \chapter{example}

 \begin{table}
 \centering
 \begin{tabular}{l|l}
 1.1 & 295 \\
 1.2 & 345 \\
 \end{tabular}
 \end{table}

 \lipsum 

 \end{document}
  • Please extend your code to a minimal working example (MWE), something others can copy and paste and compile to see your problem. Add a minimal preamble including \documentclass{foo} the code you have is not compilable, has a table environment which is empty and the \thispagestyle line is rather lacking a number of necessary }. As it stands it's not clear what your problem is, an MWE will significantly help others understand your issue. – Dai Bowen Oct 25 '16 at 21:28
  • I take it you are familiar with http://tex.stackexchange.com/questions/6834/change-paper-size-in-mid-document?s=2|2.4392, so you know this isn't a standard operation. AFAICT, a3paper is not a page style. Even if you manually change all of the parameters normally set by geometry, that will not necessarily reformat the header. – John Kormylo Oct 25 '16 at 21:46
  • Maybe you'll understand now? – user105888 Oct 26 '16 at 20:15

1 Answers1

1

The easiest solution for your problem is to set the line using the fixed width 350mm, rather than use a leader that spans \textwidth:

\newcommand*{\thickhrulefill}{%
  \makebox[0pt][l]{\rule{350mm}{1pt}}}
  %\leavevmode\leaders\hrule height 1\p@ \hfill \kern \z@}

enter image description here

Werner
  • 603,163