Closed ret2src closed 2 years ago
I've just added some additional control over listings when the --listings
option is used:
By default, Eisvogel uses the following colorscheme and sets the language to java
when the --listings
option is used:
The first improvement in this pull request lets you set the language to a custom value using the listings-syntax-highlighting-language
option, e. g. python
(note the color of the comment and some Python-specific keywords):
Next, I've introduced variables that let the user change the colors used in listings completely:
Additionally, I've added the option listings-disable-font-styling
to disable bold and italic font styles in listings:
I know this might allow users to create pretty ugly code listings that do not pair well with the overall design of the Eisvogel template.
However, some users might need these options because they have specific requirements. For example, you might be aware of the noraj/OSCP-Exam-Report-Template-Markdown project which makes extensive use of the Eisvogel template. I'm currently using this project to write my report and one of the recommendations by Offensive Security is to highlight commands in blue and important code changes in red. To follow this recommendation, I mix LaTeX with Markdown, set all code listing text colors to black and disable font styling. This allows me to create listings like this:
Listings like this allow the reader to instantly grasp important details without being overloaded with styles and colors.
Could you split these two distinct changes into two Pull Requests?
For the second change: I prefer if users can't style the listings on their own. However, the option to change the default language from java to something other is very much appreciated. Could you change the name from listings-syntax-highlighting-language
to listings-default-language
.
Hi,
I think that commit 4b7c6f41e4bda1645eb5b88d9e510348dcf261f3 introduced an unintended side-effect caused by a difference in the syntax of
scrlayer-scrpage
andfancyhdr
.When building a document with the option
oneside
set, I still get two different versions of the headers and footers:In my opinion, this should not be the case. Instead, if
oneside
is set, I should always get the same headers and footers, like this (taken from the version in this pull request):On page 267 of the KOMA-Script manual we can see that
scrlayer-scrpage
only requires two arguments for plainscrheadings
and normalscrheadings
, e. g.\ihead*[plain.scrheadings content]{scrheadings content}
.fancyhdr on the other side requires two arguments for even and odd pages, as can be seen on page 45 of the manual:
Previous versions of Eisvogel (i. e. v 2.0.0) had a completely different plain style for headers and footers (a centered page number in a footer without a rule and no header at all):
If my suspicions about the author's intentions are correct, we can simply replace the code with two arguments with the star-version - as has been done in this pull request.
By the way - this also has the correct behavior if
oneside
is not set: