-
Notifications
You must be signed in to change notification settings - Fork 834
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
Pgfkeys based options #98
Conversation
The case settings are now also package options and the most important parts are documented. |
Great work! The changes look reasonable at first glance and I'll test it out when I get the chance.
Might
Have you tried adding |
Originally I wanted only to omit it if the code would fit in one 80-char line. But later I dismissed this strict rule. So now I would say, yes we can probably omit it.
I just had a quick look after I discovered this behavior and that's what I checked first. And as far as I have seen it then, they all had a |
I had another look at the font color bug and found the problem. Some of the colors in \setbeamercolor{author}{} And these lazy defined colors do not update after \setbeamercolor{author}{parent=titlelike} the |
How is progress coming along on this? I've finally gotten a chance to play around with it and the only issues I've come across so far involve the First (a quick fix) you use the key Second (and relatedly) I would much prefer this option value be called Finally, and relatedly to the above, I think that |
No progress the last week. I was waiting for your feedback.
I renamed it in the progress and obviously broke it.
Makes sense. So
The |
Ah — sorry for holding up development, then!
Sounds good. Once this PR is through we can investigate options for de-duplicating the resulting code. |
2e59a08
to
4b85ff9
Compare
In the process I reorganized the Makefile - renamed manual to doc (mainly because I’m too lazy to write `make manual`) - fixed missing dependency in for DOC_PDF - sorted macros (directories, files, commands)
- uses now frametitle template instead of progressbar template - renamed metropolisset → metroset - reformulated progress bar option description in documentation
4b85ff9
to
2d84826
Compare
No problem. It was actually quite good this way. Because I worked more on my report I have to write for my studies instead of distracting myself with working on the mtheme. 😃
I committed the changes. Now everything should work how it should. I also renamed the Maybe you could look over it a last time, but I think this PR is then ready to merge. By the way, shall we keep my |
Seems to work for me. If we've missed anything we can always fix it later!
Since
Since its code is already contained in the manual, I don't see the need to keep it around. |
Ok, now I get it. @matze You can merge this PR now. Just as a reminder: this PR also closes #90 and #94 and #89 is still open but was fixed with #93. |
Thanks for the effort @benjamin-weiss. Concerning closing issues associated with a particular PR: you can do that automatically with a prefix such as |
Although it is not ready to merge yet, here is my
pgfopts
implementation. To sum up the discussion in #90 here is how the implementation works.Every package
Options are set up with a
.is choice
handler. E.g.\pgfkeys{ /metropolis/outer/progressbar/.cd, .is choice, none/.code={•}, head/.code={•}, }
The main key is
metropolis
and each sub-package has its own subkey (inner
,outer
,color
). Depending on if the options is an "insert-like" or and "execute-like" option each possible option value sets either abeamertemplate
or calls a designated macro.If the code for an "execute-like" option is very short the intermediate macro step is omitted and the code is executed directly.
To be able to keep most of the
pgfopts
code on top of each document, the default values are set in a separate macro which will be called together with\ProcessPgfPackageOptions
at the end of each document.Main package
The main package contains a macro for the user to set options mid-document. It expects a list of comma separated key=value options.
The main package also must pass on unknown options to the sub-packages. This is done with the
.search also
handler.\pgfkeys{/metropolis/.cd, .search also={ /metropolis/inner, /metropolis/outer, /metropolis/color, }, }
Sadly if an option is present in multiple sub-packages, the options must be passed on manually.
block/.code=\pgfkeysalso{ inner/block=#1, color/block=#1, }
Documentation
I defined a new
DescribeOption
macro to get a nice layout for the options.\DescribeOption{key}{list of possible values}{default value}{ A short description of the option. }
Before merging I want to add some more documentation and add a
titleformat
option.During testing I noticed a bug in the
colortheme
. If you change thenormal text
color mid-document, not all the derived colors are set properly. If anyone sees a quick fix I will implement it here in this PR otherwise I will open a new issue.So, what do you think?