LaTeX forum ⇒ Page Layoutsidebar question

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
comandos
Posts: 13
Joined: Sat Dec 15, 2018 3:46 pm

sidebar question

Postby comandos » Sun Dec 08, 2019 1:40 pm

Greetings all,

I have a quick question :)
I’m using the following example code (https://tex.stackexchange.com/questions ... n-headings) and I would like to know is there a way to permanently fix the position of the middle text in the side bar (attached picture for better clarity, but I would like to write the following in the side bar-> chapter title (always far left on the page)…..company name (always in center of the pag) …..rightmark (always far right on the page)).

The attached picture shows the desired effect, my problem is when the chapter title or the section are longer they move the center of the side bar and the company name is moving (up and down) compared to different pages.


Hope I am being clear enough.
Attachments
1.JPG
1.JPG (297.84 KiB) Viewed 863 times

User avatar
Stefan Kottwitz
Site Admin
Posts: 9582
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Mon Dec 09, 2019 4:52 pm

Hi,

I don't see code for the sidebar at the link you provided. That's about section headings.

Can you post your current code with the sidebar here?

Thanks!

Stefan
LaTeX.org admin

comandos
Posts: 13
Joined: Sat Dec 15, 2018 3:46 pm

Postby comandos » Tue Dec 10, 2019 7:28 pm

I'm sorry for the delay I have attached bellow my latest code. And marked where I think the side bar was created, if there is a way to achieve the desired effect with less code I’m all ears :)

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass[11pt,fleqn]{book}
  2. \usepackage[english]{babel}
  3. \usepackage{lipsum}
  4. \usepackage{xcolor}
  5. \usepackage{tikz}
  6. \usepackage{mathtools,amsfonts,amssymb,amsthm}
  7. \usepackage[most]{tcolorbox}
  8. \definecolor{ocre}{RGB}{52,177,201}
  9. \definecolor{ultramarine}{RGB}{0,45,97}
  10. \definecolor{mybluei}{RGB}{0,173,239}
  11. \definecolor{myblueii}{RGB}{63,200,244}
  12. \definecolor{myblueiii}{RGB}{199,234,253}
  13.  
  14.  
  15. \usepackage{blindtext}
  16. \usepackage{fourier}
  17. \usepackage[explicit,calcwidth]{titlesec}
  18.  
  19. \renewcommand\thechapter{\arabic{chapter}}
  20.  
  21. \newcommand\chapnumfont{%
  22. \fontsize{38}{13}\color{myblueii}\selectfont%380-130
  23. }
  24.  
  25. \newcommand\chapnamefont{%
  26. \normalfont\color{white}\scshape\small\bfseries
  27. }
  28.  
  29. \titleformat{\chapter}
  30. {\normalfont\huge\filleft}
  31. {}
  32. {0pt}
  33. {\stepcounter{chapshift}%
  34. \begin{tikzpicture}[remember picture,overlay]
  35. \fill[myblueiii]
  36. (current page.north west) rectangle ([yshift=-2cm]current page.north east); %svetlomodra
  37. \node[
  38. fill=mybluei,
  39. text width=2\paperwidth,
  40. rounded corners=1cm,
  41. text depth=2cm,%temnomodra
  42. anchor=center,
  43. inner sep=0pt] at (current page.north east) (chaptop)
  44. {\thechapter};%
  45. \node[
  46. anchor=south east,
  47. inner sep=5pt,%notranji odmik
  48. outer sep=0pt] (chapnum) at ([xshift=-20pt]chaptop.south)
  49. {\chapnumfont\thechapter};
  50. \node[
  51. anchor=south,
  52. inner sep=0pt] (chapname) at ([yshift=2pt]chapnum.south)
  53. {};
  54. \node[
  55. anchor=north east,
  56. align=right,
  57. inner xsep=0pt] at ([yshift=0.1cm]chapname.east|-chapnum.south) %polozar NASLOVA
  58. {\parbox{\textwidth}{\raggedleft#1}};%tole poglej da bo cel naslov not
  59. \end{tikzpicture}%
  60. }
  61.  
  62. \titleformat{name=\chapter,numberless}
  63. {\normalfont\huge\filleft}
  64. {}
  65. {0pt}
  66. {\begin{tikzpicture}[remember picture,overlay]
  67. \fill[myblueiii]
  68. (current page.north west) rectangle ([yshift=-13cm]current page.north east);
  69. \node[%BRISI
  70. fill=mybluei,
  71. text width=2\paperwidth,
  72. rounded corners=6cm,
  73. text depth=18cm,
  74. anchor=center,
  75. inner sep=0pt] at (current page.north east) (chaptop)
  76. {};%
  77. \node[ %BRISI
  78. anchor=south east,minimum width=2in,
  79. inner sep=0pt,
  80. outer sep=0pt] (chapnum) at ([xshift=-20pt]chaptop.south)
  81. {};
  82. \node[ %BRISI
  83. anchor=south,
  84. inner sep=0pt] (chapname) at ([yshift=2pt]chapnum.south)
  85. {};
  86. \node[ %BRISI
  87. anchor=north east,
  88. align=right,
  89. inner xsep=0pt] at ([yshift=-0.5cm]chapname.east|-chapnum.south)
  90. {\parbox{\textwidth}{\raggedleft#1}};
  91. \end{tikzpicture}%
  92. }
  93.  
  94. \titlespacing*{\chapter}{0pt}{0pt}{0in} %odmik texta
  95. \titlespacing*{name=\chapter,numberless}{0pt}{0pt}{0in}
  96.  
  97. \titleformat{\section}
  98. {\addtolength{\titlewidth}{4pc}\normalfont\Large\sffamily\bfseries}
  99. {\llap{\colorbox{myblueii}{\parbox{2cm}{\strut\color{white}\hfill\thesection}}\hspace{20pt}}}
  100. {0em}{#1}
  101. [{\titleline*[l]{\hspace*{\dimexpr-2cm-20pt-2\fboxsep\relax}\color{myblueii}\titlerule[1.5pt]}}]
  102. \titleformat{\subsection}
  103. {\addtolength{\titlewidth}{2pc}\normalfont\large\sffamily}
  104. {\llap{\colorbox{myblueii}{\parbox{2cm}{\strut\color{white}\hfill\thesubsection}}\hspace{20pt}}}
  105. {0em}{#1}
  106. [{\titleline*[l]{\hspace*{\dimexpr-2cm-20pt-2\fboxsep\relax}\color{myblueii}\titlerule[1.5pt]}}]
  107.  
  108. \usetikzlibrary{calc}
  109. \pagestyle{plain}
  110.  
  111. \newcounter{chapshift}
  112. \addtocounter{chapshift}{-1}
  113.  
  114. \newcommand\BoxColor{myblueii}
  115.  
  116. \def\subsectiontitle{}
  117. \renewcommand{\sectionmark}[1]{\markright{\sffamily\normalsize#1}{}}
  118. \renewcommand{\subsectionmark}[1]{\def\subsectiontitle{#1}}
  119.  
  120.  
  121. \usepackage{etoolbox,fancyhdr}
  122.  
  123. \pagestyle{fancy}
  124.  
  125. \renewcommand{\headrule}{{\color{myblueii}%
  126. \hrule width\headwidth height\headrulewidth depth\headrulewidth}}
  127.  
  128. \renewcommand{\chaptermark}[1]{\markboth{\sffamily\normalsize\bfseries \ #1}{}}
  129. \renewcommand{\sectionmark}[1]{\markright{\sffamily\normalsize#1}{}}
  130. \fancyhf{} \fancyhead[LE,RO]{\sffamily\normalsize\colorbox{myblueii}{\color{white}\sffamily\bfseries\strut\quad\thepage\quad}}
  131. \fancyhead[LO]{\textcolor{mybluei} \rightmark%
  132.  
  133. %%%%%%%%%%%%%%%%%%%%%%%%CODE FOR SIDE BAR%%%%%%%%%%%%%%%%%%%%%%%%%
  134.  
  135. \begin{tikzpicture}[overlay,remember picture]
  136. \node[fill=\BoxColor,inner sep=-1pt,rectangle,text width=1cm,
  137. text height=28cm,align=center,anchor=north east]
  138. at ($ (current page.north east) $)
  139. {\rotatebox{90}{\parbox{28cm}{%
  140. \centering\textcolor{black}{\bfseries\scshape\thechapter.\leftmark \hspace{2cm}\color{myblueiii} company name }\hspace{2cm}\rightmark}}};
  141. % \raggedright\textcolor{black}{\bfseries\scshape\thechapter.\leftmark \hspace{2cm}\rightmark}\hspace{2cm}\color{myblueiii} company name}}};
  142. \end{tikzpicture}}
  143. \fancyhead[RE]{\textcolor{mybluei}\leftmark%
  144. \begin{tikzpicture}[overlay,remember picture]
  145. \node[fill=\BoxColor,inner sep=0pt,rectangle,text width=1cm,
  146. text height=28cm,align=center,anchor=north west]
  147. at ($ (current page.north west) $)
  148. {\rotatebox{90}{\parbox{28cm}{%
  149. \centering\textcolor{black}{\bfseries\scshape\thechapter.\leftmark \hspace{2cm}\color{myblueiii} company name}\hspace{2cm}\rightmark}}};
  150. \end{tikzpicture}}
  151.  
  152.  
  153. %%%%%%%%%%%%%%%%%%%%%%%% END CODE FOR SIDE BAR%%%%%%%%%%%%%%%%%%%%%%%%%
  154.  
  155. \renewcommand{\headrulewidth}{.5pt}
  156. \addtolength{\headheight}{2.5pt}
  157. \newcommand{\footrulecolor}[1]{\patchcmd{\footrule}{\hrule}{\color{#1}\hrule}{}{}}
  158. \renewcommand{\headrulewidth}{.5pt}
  159. \addtolength{\headheight}{2.5pt}
  160.  
  161.  
  162. \fancypagestyle{plain}{%
  163. \fancyhf{}%
  164. \renewcommand{\headrulewidth}{0pt}
  165. \renewcommand{\footrulewidth}{0pt}
  166. }
  167.  
  168. \makeatletter
  169. \renewcommand{\cleardoublepage}{
  170. \clearpage\ifodd\c@page\else
  171. \hbox{}
  172. \vspace*{\fill}
  173. \thispagestyle{empty}
  174. \newpage
  175. \fi}
  176. \makeatother
  177.  
  178. \begin{document}
  179.  
  180.  
  181.  
  182. \chapter{\textcolor{green}{Uvod}}
  183. \section{\textcolor{green}{Zakonodaja}}
  184. \section{\textcolor{green}{Zasnova sistema za pripravo bazenske vode}}
  185.  
  186. \chapter{Klorirna postaja}
  187. \section{Jama za nevtralizacijo}
  188. \section{Menjava klornih jeklenk}
  189. \section{Opis naprave za doziranje klora} %\section{Dezinfekcija s klorom (kloriranje)} urska je tuki naporej ime gruntam ce bi pustu kloriranje
  190. \subsection{Način delovanja}
  191. \subsection{Priključitev injektorja na vod pogonske vode}
  192.  
  193. \chapter{\textcolor{red}{Klor in reakcija z vodo}} % kr opis
  194.  
  195. \chapter{Avtomatski vakuumski klorinator - AKN}%General+Complete device description
  196. \section{Tipična uporaba sistema}
  197. \section{Seznam delov ter opis delovanja}
  198.  
  199. \chapter{Razvoj elektronike}
  200. \section{Mikrokrmilnik - Kinetis KL05 MKL05Z32VFM4}
  201. \section{Senzor tlaka}
  202. \subsection{Piezoelektrilni senzor tlaka}
  203. \subsection{Ničelna napetost}
  204. \subsection{Senzor tlaka - City sensors OC18-104}
  205. \section{Procesorska ploščica} %pr tem delu elektronsko opises zakaj je ksn element na svojem mestu in kaj dosezemo z tem (kako vezje deluje in zakaj)
  206. \subsection{Napajanje/glajenje vhodne napetosti}
  207. xc,nbcxykljbcnxynmbbmbcxmy
  208. \subsection{Nastavitev merilnega območja senzorja (R3/R2)}
  209. \subsection{Invertirajoči ojačevalnik (preračunavanje meritev)}
  210. \subsection{Izhodni signal za kontrolno enoto}
  211. \subsection{Programiranje mikrokrmilinika}
  212. \section{Vhodno-izhodna ploščica} %pr tem delu elektronsko opises zakaj je ksn element na svojem mestu in kaj dosezemo z tem (kako vezje deluje in zakaj)
  213. \subsection{Matrični zaslon (5 $\times$ 7) - HCMS-3903} %kakšen zaslon mamo in kako deluje,...
  214. \subsection{Nastavitev merilnega območja (Tipki HI/LO)}
  215. \subsection{Vizualna predstavitev odčitkov} % ledice na kerem obmocju svetjo,..
  216. \section{\textcolor{blue}{CAD program za risanje tiskanih vezij Eagle}}
  217. \section{Tiskanina ter montažna shema}
  218. \section{Seznam materiala}
  219.  
  220. \chapter{Razvoj mehanike}
  221. \blindtext [5]
  222. \section{Prednji del ohišja}
  223. \blindtext [5]
  224. \section{Notranji del ohišja}
  225. \blindtext [5]
  226. \blindtext [5]
  227. \section{Zunanji del ohišja}
  228.  
  229. \chapter{Razvoj programske opreme}
  230. \section{Opis programa} %flow chart opises
  231. \section{Opis funkcij} % kako naprava dejansko deluje/kako se jo prizge
  232. \section{Vizualizacija meritev}
  233.  
  234.  
  235. \chapter{Testiranje izdelke/meritve}
  236.  
  237. \chapter{Zaključek}
  238. \includegraphics[width=\textwidth]{example-image}
  239. \blindtext[5]
  240. \chapter{CAD program za risanje tiskanih vezij Eagle}
  241.  
  242. \end{document}

comandos
Posts: 13
Joined: Sat Dec 15, 2018 3:46 pm

Postby comandos » Fri Dec 13, 2019 6:20 pm

Is there another way to create a sidebar that behaves like this in latex?

rais
Posts: 268
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Sat Dec 14, 2019 12:13 am

Well, instead of a single \parbox inside the \rotatebox, you could use 3 smaller ones:
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. {\rotatebox{90}{%
  2. \parbox{10cm}{%
  3. \raggedleft\textcolor{black}{\bfseries\scshape\thechapter.\leftmark}%
  4. }%
  5. \hspace{2cm}%
  6. \parbox{4cm}{\centering\color{red!70!black} company name}%
  7. \hspace{2cm}%
  8. \parbox{10cm}{\raggedright\rightmark}%
  9. }};

(the different color for the center part is not really part of my suggestion, it rather made it easier for me to spot where that ends up, exactly)

Or you could use a {tabular} environment, like
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. {\rotatebox{90}{%
  2. \setlength\tabcolsep{1cm}%
  3. \begin{tabular}{@{}>{\raggedleft}p{10cm}>{\centering}p{4cm}p{10cm}@{}}%
  4. \textcolor{black}{\bfseries\scshape\thechapter.\leftmark}%
  5. & \textcolor{myblueiii}{company name}%
  6. & \rightmark\\
  7. \end{tabular}}};

(I haven't checked if this changes \tabcolsep throughout the document. If it does, double the braces for the second argument to \rotatebox)

You may need to add the table option to the xcolor package (or load array package yourself) for the > modifier to work in the tabular's column specification.

Both snippets show the last argument to their respective \node commands, the rest I left untouched (with the exception of the aforementioned table option).

BTW: your posted code doesn't work, because you've inserted blank lines into the argument of \fancyhead[LO] when you inserted your comment about `code for side bar'

KR
Rainer

comandos
Posts: 13
Joined: Sat Dec 15, 2018 3:46 pm

Postby comandos » Fri Jan 03, 2020 11:26 am

Greetings,
:S sorry must have missed it and sorry for the delay it has been crazy around here lately.

Yes I would prefer the use of tabular, so it’s scalable depending on page size (A3/A4) could you tell me if tabularX is an feasible solution and what am I doing wrong here:
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \begin{tikzpicture}[overlay,remember picture]
  2. \node[fill=\BoxColor,inner sep=-1pt,rectangle,text width=1cm,
  3. text height=28cm,align=center,anchor=north east]
  4. at ($ (current page.north east) $)
  5. {\rotatebox{90}{%
  6. \setlength\tabcolsep{1cm}
  7. \begin{tabularx}{\textwidth}{XXX}
  8. \bfseries\scshape\thechapter.\leftmark & company name & \rightmark\\
  9. \end{tabularx}}};
  10. \end{tikzpicture}}

The sidebar is generated but it’s all squished on the bottom side of the page (if I use the X parameter). If I use any other parameter is’s expectable but not ok (c,l,r) because it moves.


If there is a cleaner/simpler solution to achieve this look I’m all ears.


Current COMPLEATE code:
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass[11pt,fleqn]{book}
  2. \usepackage[english]{babel}
  3. \usepackage{lipsum}
  4. \usepackage{xcolor}
  5. \usepackage{tikz}
  6. \usepackage{array}
  7. \usepackage{tabulary}
  8. \usepackage{tabularx}
  9. \usepackage{mathtools,amsfonts,amssymb,amsthm}
  10. \usepackage[most]{tcolorbox}
  11. \definecolor{ocre}{RGB}{52,177,201}
  12. \definecolor{ultramarine}{RGB}{0,45,97}
  13. \definecolor{mybluei}{RGB}{0,173,239}
  14. \definecolor{myblueii}{RGB}{63,200,244}
  15. \definecolor{myblueiii}{RGB}{199,234,253}
  16.  
  17.  
  18. \usepackage{blindtext}
  19. \usepackage{fourier}
  20. \usepackage[explicit,calcwidth]{titlesec}
  21.  
  22.  
  23. \newcolumntype{Y}{>{\centering\arraybackslash}X} %centrira tabularx
  24.  
  25. \renewcommand\thechapter{\arabic{chapter}}
  26.  
  27. \newcommand\chapnumfont{%
  28. \fontsize{38}{13}\color{myblueii}\selectfont%380-130
  29. }
  30.  
  31. \newcommand\chapnamefont{%
  32. \normalfont\color{white}\scshape\small\bfseries
  33. }
  34.  
  35. \titleformat{\chapter}
  36. {\normalfont\huge\filleft}
  37. {}
  38. {0pt}
  39. {\stepcounter{chapshift}%
  40. \begin{tikzpicture}[remember picture,overlay]
  41. \fill[myblueiii]
  42. (current page.north west) rectangle ([yshift=-2cm]current page.north east); %svetlomodra
  43. \node[
  44. fill=mybluei,
  45. text width=2\paperwidth,
  46. rounded corners=1cm,
  47. text depth=2cm,%temnomodra
  48. anchor=center,
  49. inner sep=0pt] at (current page.north east) (chaptop)
  50. {\thechapter};%
  51. \node[
  52. anchor=south east,
  53. inner sep=5pt,%notranji odmik
  54. outer sep=0pt] (chapnum) at ([xshift=-20pt]chaptop.south)
  55. {\chapnumfont\thechapter};
  56. \node[
  57. anchor=south,
  58. inner sep=0pt] (chapname) at ([yshift=2pt]chapnum.south)
  59. {};
  60. \node[
  61. anchor=north east,
  62. align=right,
  63. inner xsep=0pt] at ([yshift=0.1cm]chapname.east|-chapnum.south) %polozar NASLOVA
  64. {\parbox{\textwidth}{\raggedleft#1}};%tole poglej da bo cel naslov not
  65. \end{tikzpicture}%
  66. }
  67.  
  68. \titleformat{name=\chapter,numberless}
  69. {\normalfont\huge\filleft}
  70. {}
  71. {0pt}
  72. {\begin{tikzpicture}[remember picture,overlay]
  73. \fill[myblueiii]
  74. (current page.north west) rectangle ([yshift=-13cm]current page.north east);
  75. \node[%BRISI
  76. fill=mybluei,
  77. text width=2\paperwidth,
  78. rounded corners=6cm,
  79. text depth=18cm,
  80. anchor=center,
  81. inner sep=0pt] at (current page.north east) (chaptop)
  82. {};%
  83. \node[ %BRISI
  84. anchor=south east,minimum width=2in,
  85. inner sep=0pt,
  86. outer sep=0pt] (chapnum) at ([xshift=-20pt]chaptop.south)
  87. {};
  88. \node[ %BRISI
  89. anchor=south,
  90. inner sep=0pt] (chapname) at ([yshift=2pt]chapnum.south)
  91. {};
  92. \node[ %BRISI
  93. anchor=north east,
  94. align=right,
  95. inner xsep=0pt] at ([yshift=-0.5cm]chapname.east|-chapnum.south)
  96. {\parbox{\textwidth}{\raggedleft#1}};
  97. \end{tikzpicture}%
  98. }
  99.  
  100. \titlespacing*{\chapter}{0pt}{0pt}{0in} %odmik texta
  101. \titlespacing*{name=\chapter,numberless}{0pt}{0pt}{0in}
  102.  
  103. \titleformat{\section}
  104. {\addtolength{\titlewidth}{4pc}\normalfont\Large\sffamily\bfseries}
  105. {\llap{\colorbox{myblueii}{\parbox{2cm}{\strut\color{white}\hfill\thesection}}\hspace{20pt}}}
  106. {0em}{#1}
  107. [{\titleline*[l]{\hspace*{\dimexpr-2cm-20pt-2\fboxsep\relax}\color{myblueii}\titlerule[1.5pt]}}]
  108. \titleformat{\subsection}
  109. {\addtolength{\titlewidth}{2pc}\normalfont\large\sffamily}
  110. {\llap{\colorbox{myblueii}{\parbox{2cm}{\strut\color{white}\hfill\thesubsection}}\hspace{20pt}}}
  111. {0em}{#1}
  112. [{\titleline*[l]{\hspace*{\dimexpr-2cm-20pt-2\fboxsep\relax}\color{myblueii}\titlerule[1.5pt]}}]
  113.  
  114. \usetikzlibrary{calc}
  115. \pagestyle{plain}
  116.  
  117. \newcounter{chapshift}
  118. \addtocounter{chapshift}{-1}
  119.  
  120. \newcommand\BoxColor{myblueii}
  121.  
  122. \def\subsectiontitle{}
  123. \renewcommand{\sectionmark}[1]{\markright{\sffamily\normalsize#1}{}}
  124. \renewcommand{\subsectionmark}[1]{\def\subsectiontitle{#1}}
  125.  
  126.  
  127. \usepackage{etoolbox,fancyhdr}
  128.  
  129. \pagestyle{fancy}
  130.  
  131. \renewcommand{\headrule}{{\color{myblueii}%
  132. \hrule width\headwidth height\headrulewidth depth\headrulewidth}}
  133.  
  134. \renewcommand{\chaptermark}[1]{\markboth{\sffamily\normalsize\bfseries \ #1}{}}
  135. \renewcommand{\sectionmark}[1]{\markright{\sffamily\normalsize#1}{}}
  136. \fancyhf{} \fancyhead[LE,RO]{\sffamily\normalsize\colorbox{myblueii}{\color{white}\sffamily\bfseries\strut\quad\thepage\quad}}
  137. %%%%%%%%%%%%%%%%%%%%%%%%CODE FOR SIDE BAR%%%%%%%%%%%%%%%%%%%%%%%%%
  138. \fancyhead[LO]{\textcolor{mybluei} \rightmark%
  139. \begin{tikzpicture}[overlay,remember picture]
  140. \node[fill=\BoxColor,inner sep=-1pt,rectangle,text width=1cm,
  141. text height=28cm,align=center,anchor=north east]
  142. at ($ (current page.north east) $)
  143. {\rotatebox{90}{%
  144. \setlength\tabcolsep{1cm}
  145. \begin{tabularx}{\textwidth}{XXX}
  146. \bfseries\scshape\thechapter.\leftmark & company name & \rightmark\\
  147. \end{tabularx}}};
  148. % \begin{tabular}{@{}>{\raggedleft}p{10cm}>{\centering}p{8cm}p{10cm}@{}}%
  149. % \textcolor{black}{\bfseries\scshape\thechapter.\leftmark}%
  150. % & \textcolor{myblueiii}{company name}%
  151. % & \rightmark\\
  152. % \end{tabular}}};
  153. \end{tikzpicture}}
  154. %%%%%%%%%%%%%%%%%%%%%%%% END CODE FOR SIDE BAR%%%%%%%%%%%%%%%%%%%%%%%%%
  155. \fancyhead[RE]{\textcolor{mybluei}\leftmark%
  156. \begin{tikzpicture}[overlay,remember picture]
  157. \node[fill=\BoxColor,inner sep=0pt,rectangle,text width=1cm,
  158. text height=28cm,align=center,anchor=north west]
  159. at ($ (current page.north west) $)
  160. {\rotatebox{90}{%
  161. \setlength\tabcolsep{1cm}
  162. \begin{tabular}{@{}>{\raggedleft}p{5cm}>{\centering}p{8cm}p{10cm}@{}}%
  163. \textcolor{black}{\bfseries\scshape\thechapter.\leftmark}%
  164. & \textcolor{myblueiii}{company name}%
  165. & \rightmark\\
  166. \end{tabular}}};
  167. \end{tikzpicture}}
  168. \renewcommand{\headrulewidth}{.5pt}
  169. \addtolength{\headheight}{2.5pt}
  170. \newcommand{\footrulecolor}[1]{\patchcmd{\footrule}{\hrule}{\color{#1}\hrule}{}{}}
  171. \renewcommand{\headrulewidth}{.5pt}
  172. \addtolength{\headheight}{2.5pt}
  173.  
  174.  
  175. \fancypagestyle{plain}{%
  176. \fancyhf{}%
  177. \renewcommand{\headrulewidth}{0pt}
  178. \renewcommand{\footrulewidth}{0pt}
  179. }
  180.  
  181. \makeatletter
  182. \renewcommand{\cleardoublepage}{
  183. \clearpage\ifodd\c@page\else
  184. \hbox{}
  185. \vspace*{\fill}
  186. \thispagestyle{empty}
  187. \newpage
  188. \fi}
  189. \makeatother
  190.  
  191. \begin{document}
  192.  
  193.  
  194.  
  195. \chapter{\textcolor{green}{Uvod}}
  196. \section{\textcolor{green}{Zakonodaja}}
  197. \section{\textcolor{green}{Zasnova sistema za pripravo bazenske vode}}
  198.  
  199. \chapter{Klorirna postaja}
  200. \section{Jama za nevtralizacijo}
  201. \section{Menjava klornih jeklenk}
  202. \section{Opis naprave za doziranje klora} %\section{Dezinfekcija s klorom (kloriranje)} urska je tuki naporej ime gruntam ce bi pustu kloriranje
  203. \subsection{Način delovanja}
  204. \subsection{Priključitev injektorja na vod pogonske vode}
  205.  
  206. \chapter{\textcolor{red}{Klor in reakcija z vodo}} % kr opis
  207.  
  208. \chapter{Avtomatski vakuumski klorinator - AKN}%General+Complete device description
  209. \section{Tipična uporaba sistema}
  210. \section{Seznam delov ter opis delovanja}
  211.  
  212. \chapter{Razvoj elektronike}
  213. \blindtext[20]
  214. \section{Mikrokrmilnik - Kinetis KL05 MKL05Z32VFM4}
  215. \blindtext[20]
  216. \section{Senzor tlaka}
  217. \subsection{Piezoelektrilni senzor tlaka}
  218. \subsection{Ničelna napetost}
  219. \blindtext[20]
  220. \subsection{Senzor tlaka - City sensors OC18-104}
  221. \section{Procesorska ploščica} %pr tem delu elektronsko opises zakaj je ksn element na svojem mestu in kaj dosezemo z tem (kako vezje deluje in zakaj)
  222. \subsection{Napajanje/glajenje vhodne napetosti}
  223. xc,nbcxykljbcnxynmbbmbcxmy
  224. \subsection{Nastavitev merilnega območja senzorja (R3/R2)}
  225. \subsection{Invertirajoči ojačevalnik (preračunavanje meritev)}
  226. \subsection{Izhodni signal za kontrolno enoto}
  227. \subsection{Programiranje mikrokrmilinika}
  228. \section{Vhodno-izhodna ploščica} %pr tem delu elektronsko opises zakaj je ksn element na svojem mestu in kaj dosezemo z tem (kako vezje deluje in zakaj)
  229. \subsection{Matrični zaslon (5 $\times$ 7) - HCMS-3903} %kakšen zaslon mamo in kako deluje,...
  230. \subsection{Nastavitev merilnega območja (Tipki HI/LO)}
  231. \subsection{Vizualna predstavitev odčitkov} % ledice na kerem obmocju svetjo,..
  232. \section{\textcolor{blue}{CAD program za risanje tiskanih vezij Eagle}}
  233. \section{Tiskanina ter montažna shema}
  234. \section{Seznam materiala}
  235.  
  236. \chapter{Razvoj mehanike}
  237. \blindtext [5]
  238. \section{Prednji del ohišja}
  239. \blindtext [5]
  240. \section{Notranji del ohišja}
  241. \blindtext [5]
  242. \blindtext [5]
  243. \section{Zunanji del ohišja}
  244.  
  245. \chapter{Razvoj programske opreme}
  246. \section{Zunanji del ohišja Razvoj programske opreme }
  247. \blindtext[20]
  248. \section{Opis programa} %flow chart opises
  249. \section{Opis funkcij} % kako naprava dejansko deluje/kako se jo prizge
  250. \section{Vizualizacija meritev}
  251. \blindtext[20]
  252.  
  253. \chapter{Testiranje izdelke/meritve}
  254.  
  255. \chapter{Zaključek}
  256. \includegraphics[width=\textwidth]{example-image}
  257. \blindtext[5]
  258. \chapter{CAD program za risanje tiskanih vezij Eagle}
  259.  
  260. \end{document}
Attachments
1.JPG
1.JPG (28.21 KiB) Viewed 564 times

rais
Posts: 268
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Sat Jan 04, 2020 6:57 pm

comandos wrote:The sidebar is generated but it’s all squished on the bottom side of the page (if I use the X parameter).

You're limiting the `width' of your {tabularx} to \textwidth.
Then you have raised \tabcolsep to 1 cm, which is inserted `left' and `right' of each of the three columns, that leaves \textwidth - 6cm space for the three columns.
Try
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \begin{tabularx}{\paperheight}{XXX}

instead.

If you further change the second column specifier to Y, the company name should be centered at page's height.

KR

Rainer

comandos
Posts: 13
Joined: Sat Dec 15, 2018 3:46 pm

Postby comandos » Sat Jan 04, 2020 10:22 pm

Will try
thank you!


Return to “Page Layout”

Who is online

Users browsing this forum: No registered users and 4 guests