Page Layout[KOMA-script] Chapter in header twoside vs oneside

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
PulpFan
Posts: 9
Joined: Thu Aug 08, 2019 8:01 pm

[KOMA-script] Chapter in header twoside vs oneside

Post by PulpFan »

Nutshell I am producing two versions of document (magazine) - twoside that is monochrome/grayscale except for cover art, it has colorlinks but they are defined to black. This is version that will go to print shop.

oneside is for digital distribution. It has linkcolor and urlcolor set so where there are links in the magazine, obvious they can be clicked on. It has background color similar to a scanned 30s era pulp magazine.

Even though it is oneside I want the page header to be the same as for twoside. This is almost working:

Code: Select all

\newif\iftwoside
\twosidefalse % for digital distribution
%twosidetrue  % for the print shop

\iftwoside
\documentclass[twoside,openany]{scrbook}
\else
\documentclass[oneside]{scrbook}
\fi

\KOMAoptions
{
  fontsize=11pt,
  paper=7in:10in,
  pagesize=pdftex,
  DIV=14
}

\usepackage{scrlayer-scrpage}
\clearpairofpagestyles
\iftwoside
\lehead{p0wn3d\ Volume\ 0 Issue\ 0}
\else
\lohead{\ifthispageodd{}{p0wn3d\ Volume\ 0 Issue\ 0}}
\fi
That works to have the magazine title printed on left side of twoside and on same page numbers on oneside.

But nothing I try accomplishes it for chapter name. Two-side it does what I want, right side of right page - but with oneside it puts it on right side of EVERY page and I can't figure out what needs to redefined to prevent that.

Suggestions?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

[KOMA-script] Chapter in header twoside vs oneside

Post by Ijon Tichy »

Single sided documents only have right sides and all pages should have the same layout also for page head and footer. So I do not understand your problem. Nevertheless, if you want margins for single sided documents combined with layout features for double sided documents, KOMA-Script provides option twoside=semi. With twoside=semi package typearea behaves like with twoside=false aka oneside but nevertheless \if@twoside is \iftrue an so most other packages behaves like with twoside=true aka twoside.

If this suggestion does not help you, please show us a Infominimal working example that describes your problem.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
PulpFan
Posts: 9
Joined: Thu Aug 08, 2019 8:01 pm

[KOMA-script] Chapter in header twoside vs oneside

Post by PulpFan »

The problem is I want the twoside and oneside to be identical except the use of colored links and the margins. They aren't identical if the page headers differ. Only reason I'm making a single sided version is digital distribution, it's annoying in PDF viewers when the margin flips which side is wider every page change.

It may break typography customs, but it provides page for page consistency. I'll try your solution.
PulpFan
Posts: 9
Joined: Thu Aug 08, 2019 8:01 pm

[KOMA-script] Chapter in header twoside vs oneside

Post by PulpFan »

Thank you, it worked.
Post Reply