zepinglee / citeproc-lua

A Lua implementation of the Citation Style Language (CSL)
MIT License
62 stars 7 forks source link

Change headings font size and margin #19

Closed Sciler closed 1 year ago

Sciler commented 1 year ago

I've ran into the problem that I wanted to get the heading of \printbibliography to another font size and remove the space between page top and heading.

Is there any command to do this?

Thank you very much!

Sciler commented 1 year ago

Sometimes it's just funny. I've been searching half of the day for this but found the solution right after posting it here.

The best way to get rid of the heading space is using something like that:

\renewcommand{\bibname}{\vspace{-7ex}\LARGE Literaturverzeichnis}

zepinglee commented 1 year ago

https://github.com/zepinglee/citeproc-lua/blob/33fafb77c2fbdf99180496e7f0286702e52611a1/latex/citation-style-language.sty#L755-L764

The package just calls \chapter* to produce the bibliography heading and it has nothing to do with the formats inside it. I suggest using packages specialized in section heading formatting like titlesec to change the font size and spacing. It might be a little complicated if you're inexperienced in writing latex templates.

\renewcommand{\bibname}{\vspace{-7ex}\LARGE Literaturverzeichnis}

Generally I don't recommend directly adding the formatting commands into \bibname. The \bibname command is also used in the headers, TOC, pdf bookmarks with different formats and it may cause unexpected output by mixing the formatting commands.