Page LayoutIBM Technical Handbook - Chapter in black box

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
darkcruix
Posts: 2
Joined: Sat Aug 22, 2020 5:25 pm

IBM Technical Handbook - Chapter in black box

Post by darkcruix »

I am trying to mimic the IBM manuals with a black box and white text towards the outside of a page to have a visual marker when looking from the side of the page.
Example here e.g. on page 20 http://www.minuszerodegrees.net/manuals ... _APR84.pdf

I could create the box and that simulates it, but not as part of a chapter marker on each page:

Code: Select all

\documentclass{article}
\usepackage[explicit]{titlesec}
\usepackage{xcolor}
\usepackage{lipsum}
\usepackage{array}
\usepackage{makecell}
\usepackage{graphicx}
\usepackage{titlesec}
\newdimen\parboxheight
\makeatletter
\newcommand*{\org@iiiparbox}{}
\let\org@iiiparbox\@iiiparbox
\renewcommand*{\@iiiparbox}[2]{%
  \ifx\relax#2%
    \setlength{\parboxheight}{0pt}%
  \else
    \setlength{\parboxheight}{#2}%
  \fi
  \org@iiiparbox{#1}{#2}%
}
\makeatother
\setlength{\fboxsep}{-\fboxrule}
\titleformat{\section}[display]
{\normalfont\normalsize\bfseries}{}{0pt}{\colorbox{black}{\fbox{\parbox[][3.7cm][c]{1cm}{\centering\rotatebox{90}{\textcolor{white}{\thesection\quad#1}}}}}}
\titleformat{name=\section,numberless}
{\normalfont\normalsize\bfseries}{}{0em}{\colorbox{black}{\parbox{1cm}{\textcolor{white}{#1}}}}

\begin{document}
\setlength{\fboxsep}{-\fboxrule}
\section{Hardware}
\lipsum[4]
\section{Another Test Section}
\lipsum[4]
\section{Another Test Section with a long title spanning more than one line}
\lipsum[4]
\section*{An Unnumbered Test Section}
\lipsum[4]

\end{document}
Last edited by cgnieder on Sun Aug 23, 2020 8:09 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

darkcruix
Posts: 2
Joined: Sat Aug 22, 2020 5:25 pm

IBM Technical Handbook - Chapter in black box

Post by darkcruix »

To better describe it: I would like to have the Header (which should be exactly like the black box in the picture below with the Section name in it) displayed on every page within the section range:
Screen Shot 2020-08-24 at 21.07.24.png
Screen Shot 2020-08-24 at 21.07.24.png (258.68 KiB) Viewed 2577 times
Post Reply