LaTeX forum ⇒ Page Layout[KOMA-script] Chapter in header twoside vs oneside Topic is solved

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

[KOMA-script] Chapter in header twoside vs oneside

Postby PulpFan » Wed Aug 14, 2019 7:57 am

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:

  1. \newif\iftwoside
  2. \twosidefalse % for digital distribution
  3. %twosidetrue % for the print shop
  4.  
  5. \iftwoside
  6. \documentclass[twoside,openany]{scrbook}
  7. \else
  8. \documentclass[oneside]{scrbook}
  9. \fi
  10.  
  11. \KOMAoptions
  12. {
  13. fontsize=11pt,
  14. paper=7in:10in,
  15. pagesize=pdftex,
  16. DIV=14
  17. }
  18.  
  19. \usepackage{scrlayer-scrpage}
  20. \clearpairofpagestyles
  21. \iftwoside
  22. \lehead{p0wn3d\ Volume\ 0 Issue\ 0}
  23. \else
  24. \lohead{\ifthispageodd{}{p0wn3d\ Volume\ 0 Issue\ 0}}
  25. \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?

User avatar
Ijon Tichy
Posts: 57
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Wed Aug 14, 2019 8:48 am

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.

PulpFan
Posts: 9
Joined: Thu Aug 08, 2019 8:01 pm

Postby PulpFan » Wed Aug 14, 2019 10:22 am

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

Postby PulpFan » Wed Aug 14, 2019 10:25 am

Thank you, it worked.


Return to “Page Layout”

Who is online

Users browsing this forum: No registered users and 4 guests