Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with Koma-Script support #17

Closed
jdumke opened this issue Jul 10, 2012 · 21 comments
Closed

Problems with Koma-Script support #17

jdumke opened this issue Jul 10, 2012 · 21 comments

Comments

@jdumke
Copy link

jdumke commented Jul 10, 2012

Hi,
ist it possible to add support for KoMa-script pagestyles-mechnisim (scrplain, scrheadings) It's quite ugly to see, that the bibliography doesn't have the same pagestyles like the rest of the document.

@plk
Copy link
Owner

plk commented Jul 11, 2012

Could you give a minimal example of the problem?

@plk
Copy link
Owner

plk commented Jul 11, 2012

Actually, does his help? It's probably a better solution than hacking Koma macros internally

http://tex.stackexchange.com/questions/62629/using-springer-lncs-and-biblatex-wrong-heading-is-shown-for-last-page

@jdumke
Copy link
Author

jdumke commented Jul 11, 2012

In the attachment ist all needed example stuff.

@plk
Copy link
Owner

plk commented Jul 12, 2012

I can't see any attachment? Does the SE question above help?

@jdumke
Copy link
Author

jdumke commented Jul 12, 2012

This is quite strange. Next try. I will post the file contents directly
to the mail.

pheads.tex:
\documentclass[fontsize=12pt,paper=a4]{scrreprt}
\usepackage[markuppercase]{scrpage2}
\usepackage[ngerman]{babel}

\title{Demotitel}
\author{demoauthor}
\date{}

\usepackage[backend=bibtex8]{biblatex}
\addbibresource{./simple.bib}

\KOMAoptions{numbers=noenddot}
\ihead[]{\headmark}
\chead[]{}
\ohead[\pagemark]{\pagemark}

\begin{document}
\automark[chapter]{chapter}
\pagestyle{scrheadings}
\maketitle
\tableofcontents
\chapter{Ein Kapitel\dots}
Bla
\newpage
Bli
\chapter{Noch eins.}
Tri Tra
\newpage
Trulala
\nocite{*}
\printbibliography
\newpage
Ende
\end{document}

sample.bib:
@book{ AigZieg:04,
title = "Das Buch der der Beweise",
author = {Martin Aigner and G{"u}nter M. Ziegler},
publisher = "Springer",
address = "Berlin, Heidelberg",
edition = "zweite",
year = "2004",
isbn = "3-540-40185-7",
key = "Aigner"
}

The problem is here, that the scrpage2-package from Koma-script has it's
own mechanism for typesetting uppercase headings. I haven't any
practible idea for simulating it with /defbibheading.

Greets.

@aboruvka
Copy link
Collaborator

Since this header is formatted by a package and not the document class, \defbibheading is probably the way to go. From scrpage2.sty casing is done with \MakeMarkcase. Its definition depends on the options passed to scrpage2. Does the following you the desired result?

\defbibheading{bibliography}[\bibname]{%
  \chapter*{#1}%
  \markboth{\MakeMarkcase{#1}}{\MakeMarkcase{#1}}}

@jdumke
Copy link
Author

jdumke commented Jul 14, 2012

Yes, it does. Thanks for helping. It would be nice, if this could be the
default behaviour of biblatex when scrpage2 is also loaded.

@aboruvka
Copy link
Collaborator

Accounting for package-based formatting (versus class-based) opens up a can of worms IMO. \defbibheading does a fine job handling this case. I'll leave it up to Philip to decide.

@plk
Copy link
Owner

plk commented Jul 14, 2012

I think this might be ok - in fact biblatex.def already does this for many Koma styles anyway. I'll have a look.

@aboruvka
Copy link
Collaborator

Yeah, all the KOMA-Script classes are already covered. I took a quick look, but I couldn't find a tidy solution. scrpage2 can be used with any document class. So I guess you could move the existing code to \AtBeginDocument and then condition on \@ifpackageloaded{scrpage2}. Otherwise you can define \MakeMarkcase provisionally and then use it throughout the existing header definitions.

@mhp77
Copy link

mhp77 commented Jul 15, 2012

Additional comment:

\documentclass{scrreprt}
\usepackage[markuppercase]{scrpage2}

should rather be

\documentclass{scrreprt}
\usepackage[standardstyle]{scrpage2}

@jdumke
Copy link
Author

jdumke commented Jul 15, 2012

Hi,
the standardstyle-option for scrpage2 is only for use with
non-KOMA-classes, with scrartcl it doesn't work in the correct way
(scrguide S.251).

@mhp77
Copy link

mhp77 commented Jul 16, 2012

I don’t think so. The standardstyle option is for emulating the page styles of the standard document classes, regardless of the document class that is actually used. On the other hand, the markuppercase option only indicates to the scrpage2 package that the used document class capitalizes the running header. To quote the KOMA-Script guide:

Option markuppercase shows scrpage2 that the document class uses uppercase letters. […]; thus, unexpected effects may occur if the given option does not match the actual behaviour of the document class.

@jdumke
Copy link
Author

jdumke commented Jul 16, 2012

Not scrpage2 or scrbook acts strange, biblatex does. It doesn't generate
any bibliography , if standardstyle is used.
Test source is sent in a former post to this issue.

The given cite belongs to non-Koma-classes, for Koma-classes it's better
to use markuppercase, but this doesn't solve the main problem.

Lieke mentioned in this thread
(https://groups.google.com/group/de.comp.text.tex/browse_thread/thread/ed224b143467c4e5/233a90b4061f01b0?hl=de&#233a90b4061f01b0
) the problem seems to be, that biblatex does not set bib@heading as
default for it's headings, which would make all do-it-yourself-solutions
with \defbibheading unneeded.

@plk
Copy link
Owner

plk commented Jul 17, 2012

Audrey - what do you think about this bib@heading issue?

@mhp77
Copy link

mhp77 commented Jul 17, 2012

The aforementioned thread on de.comp.text.tex is not related to the scrpage2 package. It deals with the ability of biblatex to recognize the KOMA-Script class option bibliography=totoc (and its aliases toc=bibliography, toc=bib). Currently, bibliography=totoc is only taken into account by biblatex if it appears in the optional argument of \documentclass. If it appears in the argument of \KOMAoptions it is ignored.

@aboruvka
Copy link
Collaborator

Thanks for clarifying. PL states this point in the manual. It seems he decided to leave bibliography header definitions at biblatex load time and base these only on the document class options.

A provisional \MakeMarkcase would cover off scrpage2, but this doesn't account for headers customized via other methods including \KOMAoptions. Certainly there are better things to do than trying to support all of these cases. I think it is reasonable to ask users to cook up their own \defbibheading any time they customize headers or sectioning after class load time.

@mhp77
Copy link

mhp77 commented Jul 17, 2012

I think so, too.

@plk
Copy link
Owner

plk commented Jul 19, 2012

This seems sensible to me - what are the OP's feeling on this?

@aboruvka
Copy link
Collaborator

Another case turned up recently on TeX.SE with \pagestyle{myheadings}. My first comment fixes the OP's issue. We could be more explicit in the manual about the need for \defbibheading with changes to headers after class load time. Aside from that I think this should be closed.

plk added a commit that referenced this issue Aug 10, 2012
@johannesbottcher
Copy link

A little late information on the subject: section and addsec set up the headers on their own, just section* needs the mark mechanism. Every KOMA class loads package tocbasic which defines MakeMarkcase. This isn't a matter of scrpage2 (obsolete by now).

\documentclass{article}
\usepackage{tocbasic}
\begin{document}
\MakeMarkcase{Something}
\end{document}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants