diff --git a/nvim/lua/options.lua b/nvim/lua/options.lua index 1329500..a4e6b5f 100644 --- a/nvim/lua/options.lua +++ b/nvim/lua/options.lua @@ -30,10 +30,13 @@ vim.cmd [[ o.spelllang = "en_us" map('i', '', 'u[s1z=`]au', { noremap = true }) - -vim.cmd('colorscheme theme') +vim.cmd('colorscheme theme-nvim') vim.g.airline_theme = 'theme' +local color = require('base16-colorscheme').colors.base02 + +vim.api.nvim_set_hl(0, 'LineNr', { fg = color, bg = "none" }) + map('n', 's', ':%s//g', {}) map('n', 'e', ':make!', { noremap = true }) map('n', '', ':cclose', { noremap = true }) diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index 08e9db1..efbcac3 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -8,6 +8,8 @@ return require('packer').startup({ function(use) use 'wbthomason/packer.nvim' + use 'RRethy/base16-nvim' + use { 'vim-airline/vim-airline', requires = { @@ -61,34 +63,19 @@ return require('packer').startup({ require('gitsigns').setup { signs = { add = { - hl = 'GitSignsAdd', text = '│', - numhl = 'GitSignsAddNr', - linehl = 'GitSignsAddLn' }, change = { - hl = 'GitSignsChange', text = '│', - numhl = 'GitSignsChangeNr', - linehl = 'GitSignsChangeLn' }, delete = { - hl = 'GitSignsDelete', text = '_', - numhl = 'GitSignsDeleteNr', - linehl = 'GitSignsDeleteLn' }, topdelete = { - hl = 'GitSignsDelete', text = '‾', - numhl = 'GitSignsDeleteNr', - linehl = 'GitSignsDeleteLn' }, changedelete = { - hl = 'GitSignsChange', text = '~', - numhl = 'GitSignsChangeNr', - linehl = 'GitSignsChangeLn' }, }, } diff --git a/nvim/lua/tel.lua b/nvim/lua/tel.lua index 3ac8221..886422d 100644 --- a/nvim/lua/tel.lua +++ b/nvim/lua/tel.lua @@ -193,6 +193,7 @@ map('n', 'p', ':Telescope ', { noremap = true }) map('n', 'p ', ':Telescope ', { noremap = true }) map('n', '.', ':lua vim.lsp.buf.code_action()', { noremap = true }) +map('n', 'pn', 'lua vim.lsp.buf.rename()', { noremap = true }) -- vim.cmd [[ -- function! s:telescope_hlsetup() abort diff --git a/nvim/ultisnips/tex.snippets b/nvim/ultisnips/tex.snippets index 83eaca1..ae8ca50 100644 --- a/nvim/ultisnips/tex.snippets +++ b/nvim/ultisnips/tex.snippets @@ -198,6 +198,11 @@ snippet norm "Norm" iA \|$1\|$0 endsnippet +context "math()" +snippet nrml "Normal Subgroup" iA +\triangleleft +endsnippet + context "math()" snippet nabl "Nabla" iA \nabla diff --git a/scripts/themectl b/scripts/themectl index 981135a..f50d272 100755 Binary files a/scripts/themectl and b/scripts/themectl differ diff --git a/tex/alphaurl.bst b/tex/alphaurl.bst new file mode 100644 index 0000000..ba32372 --- /dev/null +++ b/tex/alphaurl.bst @@ -0,0 +1,1650 @@ +%%% Modification of BibTeX style file /usr/local/texlive/2022/texmf-dist/bibtex/bst/base/alpha.bst +%%% ... by urlbst, version 0.9.1 (marked with "% urlbst") +%%% See and repository +%%% Modifications Copyright 2002–23, Norman Gray, +%%% and distributed under the terms of the LPPL; see README for discussion. +%%% +%%% Added webpage entry type, and url and lastchecked fields. +%%% Added eprint support. +%%% Added DOI support. +%%% Added PUBMED support. +%%% Added hyperref support. +%%% Original headers follow... + +% BibTeX standard bibliography style `alpha' + % Version 0.99b (8-Dec-10 release) for BibTeX versions 0.99a or later. + % Copyright (C) 1984, 1985, 1988, 2010 Howard Trickey and Oren Patashnik. + % Unlimited copying and redistribution of this file are permitted as long as + % it is unmodified. Modifications (and redistribution of modified versions) + % are also permitted, but only if the resulting file is renamed to something + % besides btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst. + % This restriction helps ensure that all standard styles are identical. + % The file btxbst.doc has the documentation for this style. + +ENTRY + { address + author + booktitle + chapter + edition + editor + howpublished + institution + journal + key + month + note + number + organization + pages + publisher + school + series + title + type + volume + year + eprint % urlbst + doi % urlbst + pubmed % urlbst + url % urlbst + lastchecked % urlbst + } + {} + { label extra.label sort.label } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block } + +% urlbst... +% urlbst constants and state variables +STRINGS { urlintro + eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl + citedstring onlinestring linktextstring + openinlinelink closeinlinelink } +INTEGERS { hrefform doiform inlinelinks makeinlinelink + addeprints adddoi addpubmed } +FUNCTION {init.urlbst.variables} +{ + % The following constants may be adjusted by hand, if desired + + % The first set allow you to enable or disable certain functionality. + #1 'addeprints := % 0=no eprints; 1=include eprints + #0 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles + #1 'addpubmed := % 0=no PUBMED resolver; 1=include it + #1 'adddoi := % 0=no DOI resolver; 1=include it + #2 'hrefform := % 0=no crossrefs; 1=hypertex hrefs; 2=hyperref hrefs + #0 'doiform := % 0=with href; 1=with \doi{} + + % String constants, which you _might_ want to tweak. + "doi:" 'doiprefix := % printed text to introduce DOI + "arXiv:" 'eprintprefix := % text prefix printed before eprint ref + "PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref + "[link]" 'linktextstring := % anonymous link text + "cited " 'citedstring := % label in "lastchecked" remark + "http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED + "https://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref + "online" 'onlinestring := % label that a resource is online + "https://doi.org/" 'doiurl := % prefix to make URL from DOI + "URL: " 'urlintro := % text prefix before URL + + % The following are internal state variables, not configuration constants, + % so they shouldn't be fiddled with. + #0 'makeinlinelink := % state variable managed by possibly.setup.inlinelink + "" 'openinlinelink := % ditto + "" 'closeinlinelink := % ditto +} +INTEGERS { + bracket.state + outside.brackets + open.brackets + within.brackets + close.brackets +} +% ...urlbst to here +FUNCTION {init.state.consts} +{ #0 'outside.brackets := % urlbst... + #1 'open.brackets := + #2 'within.brackets := + #3 'close.brackets := % ...urlbst to here + + #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := +} + +STRINGS { s t } + +% urlbst +FUNCTION {output.nonnull.original} +{ 's := + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { add.period$ " " * write$ } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} + +% urlbst... +% Minimal DOI parsing. +% Given a DOI on the stack, check whether it starts with 'doiurl' or not. +% In either case, leave on the stack first a DOI with, and then a DOI without, the URL prefix. +FUNCTION {parse.doi} +{ + #1 doiurl text.length$ substring$ + doiurl = + { doi + doi doiurl text.length$ #1 + #999 substring$ } + { doiurl doi * + doi } + if$ +} +% The following three functions are for handling inlinelink. They wrap +% a block of text which is potentially output with write$ by multiple +% other functions, so we don't know the content a priori. +% They communicate between each other using the variables makeinlinelink +% (which is true if a link should be made), and closeinlinelink (which holds +% the string which should close any current link. They can be called +% at any time, but start.inlinelink will be a no-op unless something has +% previously set makeinlinelink true, and the two ...end.inlinelink functions +% will only do their stuff if start.inlinelink has previously set +% closeinlinelink to be non-empty. +% (thanks to 'ijvm' for suggested code here) +FUNCTION {uand} +{ 'skip$ { pop$ #0 } if$ } % 'and' (which isn't defined at this point in the file) +FUNCTION {possibly.setup.inlinelink} +{ makeinlinelink hrefform #0 > uand + { doi empty$ adddoi uand + { pubmed empty$ addpubmed uand + { eprint empty$ addeprints uand + { url empty$ + { "" } + { url } + if$ } + { eprinturl eprint * } + if$ } + { pubmedurl pubmed * } + if$ } +% { doiurl doi * } + { doi empty$ + { "XXX" } + { doi parse.doi pop$ } + if$ + } + if$ + % an appropriately-formatted URL is now on the stack + hrefform #1 = % hypertex + { "\special {html: }{" * 'openinlinelink := + "\special {html:}" 'closeinlinelink := } + { "\href {" swap$ * "} {" * 'openinlinelink := % hrefform=#2 -- hyperref + % the space between "} {" matters: a URL of just the right length can cause "\% newline em" + "}" 'closeinlinelink := } + if$ + #0 'makeinlinelink := + } + 'skip$ + if$ % makeinlinelink +} +FUNCTION {add.inlinelink} +{ openinlinelink empty$ + 'skip$ + { openinlinelink swap$ * closeinlinelink * + "" 'openinlinelink := + } + if$ +} +FUNCTION {output.nonnull} +{ % Save the thing we've been asked to output + 's := + % If the bracket-state is close.brackets, then add a close-bracket to + % what is currently at the top of the stack, and set bracket.state + % to outside.brackets + bracket.state close.brackets = + { "]" * + outside.brackets 'bracket.state := + } + 'skip$ + if$ + bracket.state outside.brackets = + { % We're outside all brackets -- this is the normal situation. + % Write out what's currently at the top of the stack, using the + % original output.nonnull function. + s + add.inlinelink + output.nonnull.original % invoke the original output.nonnull + } + { % Still in brackets. Add open-bracket or (continuation) comma, add the + % new text (in s) to the top of the stack, and move to the close-brackets + % state, ready for next time (unless inbrackets resets it). If we come + % into this branch, then output.state is carefully undisturbed. + bracket.state open.brackets = + { " [" * } + { ", " * } % bracket.state will be within.brackets + if$ + s * + close.brackets 'bracket.state := + } + if$ +} + +% Call this function just before adding something which should be presented in +% brackets. bracket.state is handled specially within output.nonnull. +FUNCTION {inbrackets} +{ bracket.state close.brackets = + { within.brackets 'bracket.state := } % reset the state: not open nor closed + { open.brackets 'bracket.state := } + if$ +} + +FUNCTION {format.lastchecked} +{ lastchecked empty$ + { "" } + { inbrackets citedstring lastchecked * } + if$ +} +% ...urlbst to here + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {output.bibitem.original} % urlbst (renamed from output.bibitem, so it can be wrapped below) +{ newline$ + "\bibitem[" write$ + label write$ + "]{" write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {fin.entry.original} % urlbst (renamed from fin.entry, so it can be wrapped below) +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "{\em " swap$ * "}" * } + if$ +} + +INTEGERS { nameptr namesleft numnames } + +FUNCTION {format.names} +{ 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := + nameptr #1 > + { namesleft #1 > + { ", " * t * } + { numnames #2 > + { "," * } + 'skip$ + if$ + t "others" = + { " et~al." * } + { " and " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names } + if$ +} + +FUNCTION {format.editors} +{ editor empty$ + { "" } + { editor format.names + editor num.names$ #1 > + { ", editors" * } + { ", editor" * } + if$ + } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title "t" change.case$ } + if$ +} + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {format.date} +{ year empty$ + { month empty$ + { "" } + { "there's a month but no year in " cite$ * warning$ + month + } + if$ + } + { month empty$ + 'year + { month " " * year * } + if$ + } + if$ +} + +FUNCTION {format.btitle} +{ title emphasize +} + +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { "volume" volume tie.or.space.connect + series empty$ + 'skip$ + { " of " * series emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { output.state mid.sentence = + { "number" } + { "Number" } + if$ + number tie.or.space.connect + series empty$ + { "there's a number but no series in " cite$ * warning$ } + { " in " * series * } + if$ + } + if$ + } + { "" } + if$ +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { edition "l" change.case$ " edition" * } + { edition "t" change.case$ " edition" * } + if$ + } + if$ +} + +INTEGERS { multiresult } + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages multi.page.check + { "pages" pages n.dashify tie.or.space.connect } + { "page" pages tie.or.space.connect } + if$ + } + if$ +} + +FUNCTION {format.vol.num.pages} +{ volume field.or.null + number empty$ + 'skip$ + { "(" number * ")" * * + volume empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { ":" * pages n.dashify * } + if$ + } + if$ +} + +FUNCTION {format.chapter.pages} +{ chapter empty$ + 'format.pages + { type empty$ + { "chapter" } + { type "l" change.case$ } + if$ + chapter tie.or.space.connect + pages empty$ + 'skip$ + { ", " * format.pages * } + if$ + } + if$ +} + +FUNCTION {format.in.ed.booktitle} +{ booktitle empty$ + { "" } + { editor empty$ + { "In " booktitle emphasize * } + { "In " format.editors * ", " * booktitle emphasize * } + if$ + } + if$ +} + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type "t" change.case$ + } + if$ +} + +FUNCTION {format.tr.number} +{ type empty$ + { "Technical Report" } + 'type + if$ + number empty$ + { "t" change.case$ } + { number tie.or.space.connect } + if$ +} + +FUNCTION {format.article.crossref} +{ key empty$ + { journal empty$ + { "need key or journal for " cite$ * " to crossref " * crossref * + warning$ + "" + } + { "In {\em " journal * "\/}" * } + if$ + } + { "In " key * } + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {format.crossref.editor} +{ editor #1 "{vv~}{ll}" format.name$ + editor num.names$ duplicate$ + #2 > + { pop$ " et~al." * } + { #2 < + 'skip$ + { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { " et~al." * } + { " and " * editor #2 "{vv~}{ll}" format.name$ * } + if$ + } + if$ + } + if$ +} + +FUNCTION {format.book.crossref} +{ volume empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + "In " + } + { "Volume" volume tie.or.space.connect + " of " * + } + if$ + editor empty$ + editor field.or.null author field.or.null = + or + { key empty$ + { series empty$ + { "need editor, key, or series for " cite$ * " to crossref " * + crossref * warning$ + "" * + } + { "{\em " * series * "\/}" * } + if$ + } + { key * } + if$ + } + { format.crossref.editor * } + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {format.incoll.inproc.crossref} +{ editor empty$ + editor field.or.null author field.or.null = + or + { key empty$ + { booktitle empty$ + { "need editor, key, or booktitle for " cite$ * " to crossref " * + crossref * warning$ + "" + } + { "In {\em " booktitle * "\/}" * } + if$ + } + { "In " key * } + if$ + } + { "In " format.crossref.editor * } + if$ + " \cite{" * crossref * "}" * +} + +% urlbst... +% Functions for making hypertext links. +% In all cases, the stack has (link-text href-url) +% +% make 'null' specials +FUNCTION {make.href.null} +{ + pop$ +} +% make hypertex specials +FUNCTION {make.href.hypertex} +{ + "\special {html: }" * swap$ * + "\special {html:}" * +} +% make hyperref specials +FUNCTION {make.href.hyperref} +{ + "\href {" swap$ * "} {\path{" * swap$ * "}}" * +} +FUNCTION {make.href} +{ hrefform #2 = + 'make.href.hyperref % hrefform = 2 + { hrefform #1 = + 'make.href.hypertex % hrefform = 1 + 'make.href.null % hrefform = 0 (or anything else) + if$ + } + if$ +} + +% If inlinelinks is true, then format.url should be a no-op, since it's +% (a) redundant, and (b) could end up as a link-within-a-link. +FUNCTION {format.url} +{ inlinelinks #1 = url empty$ or + { "" } + { hrefform #1 = + { % special case -- add HyperTeX specials + urlintro "\url{" url * "}" * url make.href.hypertex * } + { urlintro "\url{" * url * "}" * } + if$ + } + if$ +} +FUNCTION {format.eprint} +{ eprint empty$ + { "" } + { eprintprefix eprint * eprinturl eprint * make.href } + if$ +} + +FUNCTION {format.doi} +{ doi empty$ + { "" } + { doi parse.doi % leaves "https://doi.org/DOI" DOI on the stack + 's := 't := + doiform #1 = + { "\doi{" s * "}" * } + { doiprefix s * t make.href } + if$ + } + if$ +} + +FUNCTION {format.pubmed} +{ pubmed empty$ + { "" } + { pubmedprefix pubmed * pubmedurl pubmed * make.href } + if$ +} + +% Output a URL. We can't use the more normal idiom (something like +% `format.url output'), because the `inbrackets' within +% format.lastchecked applies to everything between calls to `output', +% so that `format.url format.lastchecked * output' ends up with both +% the URL and the lastchecked in brackets. +FUNCTION {output.url} +{ url empty$ + 'skip$ + { new.block + format.url output + format.lastchecked output + } + if$ +} + +FUNCTION {output.web.refs} +{ + new.block + inlinelinks + 'skip$ % links were inline -- don't repeat them + { % If the generated DOI will be the same as the URL, + % then don't print the URL (thanks to Joseph Wright + % for (the original version of) this code, + % at http://tex.stackexchange.com/questions/5660) + adddoi + doi empty$ { "X" } { doi parse.doi pop$ } if$ % DOI URL to be generated + url empty$ { "Y" } { url } if$ % the URL, or "Y" if empty + = % are the strings equal? + and + 'skip$ + { output.url } + if$ + addeprints eprint empty$ not and + { format.eprint output.nonnull } + 'skip$ + if$ + adddoi doi empty$ not and + { format.doi output.nonnull } + 'skip$ + if$ + addpubmed pubmed empty$ not and + { format.pubmed output.nonnull } + 'skip$ + if$ + } + if$ +} + +% Wrapper for output.bibitem.original. +% If the URL field is not empty, set makeinlinelink to be true, +% so that an inline link will be started at the next opportunity +FUNCTION {output.bibitem} +{ outside.brackets 'bracket.state := + output.bibitem.original + inlinelinks url empty$ not doi empty$ not or pubmed empty$ not or eprint empty$ not or and + { #1 'makeinlinelink := } + { #0 'makeinlinelink := } + if$ +} + +% Wrapper for fin.entry.original +FUNCTION {fin.entry} +{ output.web.refs % urlbst + makeinlinelink % ooops, it appears we didn't have a title for inlinelink + { possibly.setup.inlinelink % add some artificial link text here, as a fallback + linktextstring output.nonnull } + 'skip$ + if$ + bracket.state close.brackets = % urlbst + { "]" * } + 'skip$ + if$ + fin.entry.original +} + +% Webpage entry type. +% Title and url fields required; +% author, note, year, month, and lastchecked fields optional +% See references +% ISO 690-2 http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm +% http://www.classroom.net/classroom/CitingNetResources.html +% http://neal.ctstateu.edu/history/cite.html +% http://www.cas.usf.edu/english/walker/mla.html +% for citation formats for web pages. +FUNCTION {webpage} +{ output.bibitem + author empty$ + { editor empty$ + 'skip$ % author and editor both optional + { format.editors output.nonnull } + if$ + } + { editor empty$ + { format.authors output.nonnull } + { "can't use both author and editor fields in " cite$ * warning$ } + if$ + } + if$ + new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ + format.title "title" output.check + inbrackets onlinestring output + new.block + year empty$ + 'skip$ + { format.date "year" output.check } + if$ + % We don't need to output the URL details ('lastchecked' and 'url'), + % because fin.entry does that for us, using output.web.refs. The only + % reason we would want to put them here is if we were to decide that + % they should go in front of the rather miscellaneous information in 'note'. + new.block + note output + fin.entry +} +% ...urlbst to here + + +FUNCTION {article} +{ output.bibitem + format.authors "author" output.check + new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst + format.title "title" output.check + new.block + crossref missing$ + { journal emphasize "journal" output.check + possibly.setup.inlinelink format.vol.num.pages output% urlbst + format.date "year" output.check + } + { format.article.crossref output.nonnull + format.pages output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {book} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst + format.btitle "title" output.check + crossref missing$ + { format.bvolume output + new.block + format.number.series output + new.sentence + publisher "publisher" output.check + address output + } + { new.block + format.book.crossref output.nonnull + } + if$ + format.edition output + format.date "year" output.check + new.block + note output + fin.entry +} + +FUNCTION {booklet} +{ output.bibitem + format.authors output + new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst + format.title "title" output.check + howpublished address new.block.checkb + howpublished output + address output + format.date output + new.block + note output + fin.entry +} + +FUNCTION {inbook} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst + format.btitle "title" output.check + crossref missing$ + { format.bvolume output + format.chapter.pages "chapter and pages" output.check + new.block + format.number.series output + new.sentence + publisher "publisher" output.check + address output + } + { format.chapter.pages "chapter and pages" output.check + new.block + format.book.crossref output.nonnull + } + if$ + format.edition output + format.date "year" output.check + new.block + note output + fin.entry +} + +FUNCTION {incollection} +{ output.bibitem + format.authors "author" output.check + new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst + format.title "title" output.check + new.block + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.bvolume output + format.number.series output + format.chapter.pages output + new.sentence + publisher "publisher" output.check + address output + format.edition output + format.date "year" output.check + } + { format.incoll.inproc.crossref output.nonnull + format.chapter.pages output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + format.authors "author" output.check + new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst + format.title "title" output.check + new.block + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.bvolume output + format.number.series output + format.pages output + address empty$ + { organization publisher new.sentence.checkb + organization output + publisher output + format.date "year" output.check + } + { address output.nonnull + format.date "year" output.check + new.sentence + organization output + publisher output + } + if$ + } + { format.incoll.inproc.crossref output.nonnull + format.pages output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {manual} +{ output.bibitem + author empty$ + { organization empty$ + 'skip$ + { organization output.nonnull + address output + } + if$ + } + { format.authors output.nonnull } + if$ + new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst + format.btitle "title" output.check + author empty$ + { organization empty$ + { address new.block.checka + address output + } + 'skip$ + if$ + } + { organization address new.block.checkb + organization output + address output + } + if$ + format.edition output + format.date output + new.block + note output + fin.entry +} + +FUNCTION {mastersthesis} +{ output.bibitem + format.authors "author" output.check + new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst + format.title "title" output.check + new.block + "Master's thesis" format.thesis.type output.nonnull + school "school" output.check + address output + format.date "year" output.check + new.block + note output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + title howpublished new.block.checkb + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst + format.title output + howpublished new.block.checka + howpublished output + format.date output + new.block + note output + fin.entry + empty.misc.check +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst + format.btitle "title" output.check + new.block + "PhD thesis" format.thesis.type output.nonnull + school "school" output.check + address output + format.date "year" output.check + new.block + note output + fin.entry +} + +FUNCTION {proceedings} +{ output.bibitem + editor empty$ + { organization output } + { format.editors output.nonnull } + if$ + new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst + format.btitle "title" output.check + format.bvolume output + format.number.series output + address empty$ + { editor empty$ + { publisher new.sentence.checka } + { organization publisher new.sentence.checkb + organization output + } + if$ + publisher output + format.date "year" output.check + } + { address output.nonnull + format.date "year" output.check + new.sentence + editor empty$ + 'skip$ + { organization output } + if$ + publisher output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {techreport} +{ output.bibitem + format.authors "author" output.check + new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst + format.title "title" output.check + new.block + format.tr.number output.nonnull + institution "institution" output.check + address output + format.date "year" output.check + new.block + note output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + format.authors "author" output.check + new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst + format.title "title" output.check + new.block + note "note" output.check + format.date output + fin.entry +} + +FUNCTION {default.type} { misc } + +MACRO {jan} {"January"} + +MACRO {feb} {"February"} + +MACRO {mar} {"March"} + +MACRO {apr} {"April"} + +MACRO {may} {"May"} + +MACRO {jun} {"June"} + +MACRO {jul} {"July"} + +MACRO {aug} {"August"} + +MACRO {sep} {"September"} + +MACRO {oct} {"October"} + +MACRO {nov} {"November"} + +MACRO {dec} {"December"} + +MACRO {acmcs} {"ACM Computing Surveys"} + +MACRO {acta} {"Acta Informatica"} + +MACRO {cacm} {"Communications of the ACM"} + +MACRO {ibmjrd} {"IBM Journal of Research and Development"} + +MACRO {ibmsj} {"IBM Systems Journal"} + +MACRO {ieeese} {"IEEE Transactions on Software Engineering"} + +MACRO {ieeetc} {"IEEE Transactions on Computers"} + +MACRO {ieeetcad} + {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} + +MACRO {ipl} {"Information Processing Letters"} + +MACRO {jacm} {"Journal of the ACM"} + +MACRO {jcss} {"Journal of Computer and System Sciences"} + +MACRO {scp} {"Science of Computer Programming"} + +MACRO {sicomp} {"SIAM Journal on Computing"} + +MACRO {tocs} {"ACM Transactions on Computer Systems"} + +MACRO {tods} {"ACM Transactions on Database Systems"} + +MACRO {tog} {"ACM Transactions on Graphics"} + +MACRO {toms} {"ACM Transactions on Mathematical Software"} + +MACRO {toois} {"ACM Transactions on Office Information Systems"} + +MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} + +MACRO {tcs} {"Theoretical Computer Science"} + +READ + +FUNCTION {sortify} +{ purify$ + "l" change.case$ +} + +INTEGERS { len } + +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} + +INTEGERS { et.al.char.used } + +FUNCTION {initialize.et.al.char.used} +{ #0 'et.al.char.used := +} + +EXECUTE {initialize.et.al.char.used} + +FUNCTION {format.lab.names} +{ 's := + s num.names$ 'numnames := + numnames #1 > + { numnames #4 > + { #3 'namesleft := } + { numnames 'namesleft := } + if$ + #1 'nameptr := + "" + { namesleft #0 > } + { nameptr numnames = + { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { "{\etalchar{+}}" * + #1 'et.al.char.used := + } + { s nameptr "{v{}}{l{}}" format.name$ * } + if$ + } + { s nameptr "{v{}}{l{}}" format.name$ * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + numnames #4 > + { "{\etalchar{+}}" * + #1 'et.al.char.used := + } + 'skip$ + if$ + } + { s #1 "{v{}}{l{}}" format.name$ + duplicate$ text.length$ #2 < + { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ } + 'skip$ + if$ + } + if$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + { key #3 text.prefix$ } + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + { key #3 text.prefix$ } + if$ + } + { editor format.lab.names } + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {author.key.organization.label} +{ author empty$ + { key empty$ + { organization empty$ + { cite$ #1 #3 substring$ } + { "The " #4 organization chop.word #3 text.prefix$ } + if$ + } + { key #3 text.prefix$ } + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {editor.key.organization.label} +{ editor empty$ + { key empty$ + { organization empty$ + { cite$ #1 #3 substring$ } + { "The " #4 organization chop.word #3 text.prefix$ } + if$ + } + { key #3 text.prefix$ } + if$ + } + { editor format.lab.names } + if$ +} + +FUNCTION {calc.label} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.label + { type$ "proceedings" = + 'editor.key.organization.label + { type$ "manual" = + 'author.key.organization.label + 'author.key.label + if$ + } + if$ + } + if$ + duplicate$ + year field.or.null purify$ #-1 #2 substring$ + * + 'label := + year field.or.null purify$ #-1 #4 substring$ + * + sortify 'sort.label := +} + +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { nameptr #1 > + { " " * } + 'skip$ + if$ + s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't := + nameptr numnames = t "others" = and + { "et al" * } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} + +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {author.organization.sort} +{ author empty$ + { organization empty$ + { key empty$ + { "to sort, need author, organization, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { "The " #4 organization chop.word sortify } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {editor.organization.sort} +{ editor empty$ + { organization empty$ + { key empty$ + { "to sort, need editor, organization, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { "The " #4 organization chop.word sortify } + if$ + } + { editor sort.format.names } + if$ +} + +FUNCTION {presort} +{ calc.label + sort.label + " " + * + type$ "book" = + type$ "inbook" = + or + 'author.editor.sort + { type$ "proceedings" = + 'editor.organization.sort + { type$ "manual" = + 'author.organization.sort + 'author.sort + if$ + } + if$ + } + if$ + * + " " + * + year field.or.null sortify + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {presort} + +SORT + +STRINGS { longest.label last.sort.label next.extra } + +INTEGERS { longest.label.width last.extra.num } + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #0 int.to.chr$ 'last.sort.label := + "" 'next.extra := + #0 'longest.label.width := + #0 'last.extra.num := +} + +FUNCTION {forward.pass} +{ last.sort.label sort.label = + { last.extra.num #1 + 'last.extra.num := + last.extra.num int.to.chr$ 'extra.label := + } + { "a" chr.to.int$ 'last.extra.num := + "" 'extra.label := + sort.label 'last.sort.label := + } + if$ +} + +FUNCTION {reverse.pass} +{ next.extra "b" = + { "a" 'extra.label := } + 'skip$ + if$ + label extra.label * 'label := + label width$ longest.label.width > + { label 'longest.label := + label width$ 'longest.label.width := + } + 'skip$ + if$ + extra.label 'next.extra := +} + +EXECUTE {initialize.longest.label} + +ITERATE {forward.pass} + +REVERSE {reverse.pass} + +FUNCTION {begin.bib} +{ et.al.char.used + { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ } + 'skip$ + if$ + preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{" longest.label * "}" * write$ newline$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.urlbst.variables} % urlbst +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} diff --git a/tex/beamercolorthememetropolis-highcontrast.sty b/tex/beamercolorthememetropolis-highcontrast.sty new file mode 100644 index 0000000..85665dc --- /dev/null +++ b/tex/beamercolorthememetropolis-highcontrast.sty @@ -0,0 +1,39 @@ +%% +%% This is file `beamercolorthememetropolis-highcontrast.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% beamercolorthememetropolis-highcontrast.dtx (with options: `package') +%% --------------------------------------------------------------------------- +%% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of +%% contributors can be found at +%% +%% https://github.com/matze/mtheme/graphs/contributors +%% +%% and the original template was based on the HSRM theme by Benjamin Weiss. +%% +%% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 +%% International License (https://creativecommons.org/licenses/by-sa/4.0/). +%% --------------------------------------------------------------------------- +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{beamercolorthememetropolis-highcontrast}[2017/01/23 Metropolis color theme] +\usecolortheme{metropolis} + +\definecolor{mAlert}{HTML}{AD003D} +\definecolor{mExample}{HTML}{005580} + +\setbeamercolor{normal text}{% + fg=black, + bg=white +} +\setbeamercolor{alerted text}{% + fg=mAlert, +} +\setbeamercolor{example text}{% + fg=mExample, +} +\mode +\endinput +%% +%% End of file `beamercolorthememetropolis-highcontrast.sty'. diff --git a/tex/beamercolorthememetropolis.sty b/tex/beamercolorthememetropolis.sty new file mode 100644 index 0000000..cdc497a --- /dev/null +++ b/tex/beamercolorthememetropolis.sty @@ -0,0 +1,138 @@ +%% +%% This is file `beamercolorthememetropolis.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% beamercolorthememetropolis.dtx (with options: `package') +%% --------------------------------------------------------------------------- +%% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of +%% contributors can be found at +%% +%% https://github.com/matze/mtheme/graphs/contributors +%% +%% and the original template was based on the HSRM theme by Benjamin Weiss. +%% +%% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 +%% International License (https://creativecommons.org/licenses/by-sa/4.0/). +%% --------------------------------------------------------------------------- +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{beamercolorthememetropolis}[2017/01/23 Metropolis color theme] +\RequirePackage{pgfopts} +\pgfkeys{ + /metropolis/color/block/.cd, + .is choice, + transparent/.code=\metropolis@block@transparent, + fill/.code=\metropolis@block@fill, +} +\pgfkeys{ + /metropolis/color/background/.cd, + .is choice, + dark/.code=\metropolis@colors@dark, + light/.code=\metropolis@colors@light, +} +\newcommand{\metropolis@color@setdefaults}{ + \pgfkeys{/metropolis/color/.cd, + background=light, + block=transparent, + } +} +\definecolor{mDarkBrown}{HTML}{604c38} +\definecolor{mDarkTeal}{HTML}{23373b} +\definecolor{mLightBrown}{HTML}{EB811B} +\definecolor{mLightGreen}{HTML}{14B03D} +\newcommand{\metropolis@colors@dark}{ + \setbeamercolor{normal text}{% + fg=black!2, + bg=mDarkTeal + } + \usebeamercolor[fg]{normal text} +} +\newcommand{\metropolis@colors@light}{ + \setbeamercolor{normal text}{% + fg=mDarkTeal, + bg=black!2 + } +} +\setbeamercolor{alerted text}{% + fg=mLightBrown +} +\setbeamercolor{example text}{% + fg=mLightGreen +} +\setbeamercolor{titlelike}{use=normal text, parent=normal text} +\setbeamercolor{author}{use=normal text, parent=normal text} +\setbeamercolor{date}{use=normal text, parent=normal text} +\setbeamercolor{institute}{use=normal text, parent=normal text} +\setbeamercolor{structure}{use=normal text, fg=normal text.fg} +\setbeamercolor{palette primary}{% + use=normal text, + fg=normal text.bg, + bg=normal text.fg +} +\setbeamercolor{frametitle}{% + use=palette primary, + parent=palette primary +} +\setbeamercolor{progress bar}{% + use=alerted text, + fg=alerted text.fg, + bg=alerted text.fg!50!black!30 +} +\setbeamercolor{title separator}{ + use=progress bar, + parent=progress bar +} +\setbeamercolor{progress bar in head/foot}{% + use=progress bar, + parent=progress bar +} +\setbeamercolor{progress bar in section page}{ + use=progress bar, + parent=progress bar +} +\newcommand{\metropolis@block@transparent}{ + \setbeamercolor{block title}{% + use=normal text, + fg=normal text.fg, + bg= + } + \setbeamercolor{block body}{ + bg= + } +} +\newcommand{\metropolis@block@fill}{ + \setbeamercolor{block title}{% + use=normal text, + fg=normal text.fg, + bg=normal text.bg!80!fg + } + \setbeamercolor{block body}{ + use={block title, normal text}, + bg=block title.bg!50!normal text.bg + } +} +\setbeamercolor{block title alerted}{% + use={block title, alerted text}, + bg=block title.bg, + fg=alerted text.fg +} +\setbeamercolor{block title example}{% + use={block title, example text}, + bg=block title.bg, + fg=example text.fg +} +\setbeamercolor{block body alerted}{use=block body, parent=block body} +\setbeamercolor{block body example}{use=block body, parent=block body} +\setbeamercolor{footnote}{fg=normal text.fg!90} +\setbeamercolor{footnote mark}{fg=.} +\setbeamercolor{bibliography entry author}{fg=, bg=} +\setbeamercolor{bibliography entry title}{fg=, bg=} +\setbeamercolor{bibliography entry location}{fg=, bg=} +\setbeamercolor{bibliography entry note}{fg=, bg=} +\metropolis@color@setdefaults +\ProcessPgfPackageOptions{/metropolis/color} +\mode +\endinput +%% +%% End of file `beamercolorthememetropolis.sty'. diff --git a/tex/beamerfontthememetropolis.sty b/tex/beamerfontthememetropolis.sty new file mode 100644 index 0000000..15cced3 --- /dev/null +++ b/tex/beamerfontthememetropolis.sty @@ -0,0 +1,325 @@ +%% +%% This is file `beamerfontthememetropolis.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% beamerfontthememetropolis.dtx (with options: `package') +%% --------------------------------------------------------------------------- +%% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of +%% contributors can be found at +%% +%% https://github.com/matze/mtheme/graphs/contributors +%% +%% and the original template was based on the HSRM theme by Benjamin Weiss. +%% +%% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 +%% International License (https://creativecommons.org/licenses/by-sa/4.0/). +%% --------------------------------------------------------------------------- +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{beamerfontthememetropolis}[2017/01/23 Metropolis font theme] +\RequirePackage{etoolbox} +\RequirePackage{ifxetex} +\RequirePackage{ifluatex} +\RequirePackage{pgfopts} +\ifboolexpr{bool {xetex} or bool {luatex}}{ + \@ifpackageloaded{fontspec}{ + \PassOptionsToPackage{no-math}{fontspec} + }{ + \RequirePackage[no-math]{fontspec} + } + \newcounter{fontsnotfound} + \newcommand{\checkfont}[1]{% + \suppressfontnotfounderror=1% + \font\x = "#1" at 10pt + \selectfont + \ifx\x\nullfont% + \stepcounter{fontsnotfound}% + \fi% + \suppressfontnotfounderror=0% + } + + \newcommand{\iffontsavailable}[3]{% + \setcounter{fontsnotfound}{0}% + \expandafter\forcsvlist\expandafter% + \checkfont\expandafter{#1}% + \ifnum\value{fontsnotfound}=0% + #2% + \else% + #3% + \fi% + } + \iffontsavailable{Fira Sans Light,% + Fira Sans Light Italic,% + Fira Sans,% + Fira Sans Italic}% + {% + \setsansfont[ItalicFont={Fira Sans Light Italic},% + BoldFont={Fira Sans},% + BoldItalicFont={Fira Sans Italic}]% + {Fira Sans Light}% + }{% + \iffontsavailable{Fira Sans Light OT,% + Fira Sans Light Italic OT,% + Fira Sans OT,% + Fira Sans Italic OT}% + {% + \setsansfont[ItalicFont={Fira Sans Light Italic OT},% + BoldFont={Fira Sans OT},% + BoldItalicFont={Fira Sans Italic OT}]% + {Fira Sans Light OT}% + }{% + \PackageWarning{beamerthememetropolis}{% + Could not find Fira Sans fonts% + } + } + } + \iffontsavailable{Fira Mono, Fira Mono Bold}{% + \setmonofont[BoldFont={Fira Mono Medium}]{Fira Mono}% + }{% + \iffontsavailable{Fira Mono OT, Fira Mono Bold OT}{% + \setmonofont[BoldFont={Fira Mono Medium OT}]{Fira Mono OT}% + }{% + \PackageWarning{beamerthememetropolis}{% + Could not find Fira Mono fonts% + } + } + } + \AtBeginEnvironment{tabular}{% + \addfontfeature{Numbers={Monospaced}}% + } +}{% + \PackageWarning{beamerthememetropolis}{% + You need to compile with XeLaTeX or LuaLaTeX to use the Fira fonts% + } +} +\setbeamerfont{title}{size=\Large,% + series=\bfseries} +\setbeamerfont{author}{size=\small} +\setbeamerfont{date}{size=\small} +\setbeamerfont{section title}{size=\Large,% + series=\bfseries} +\setbeamerfont{block title}{size=\normalsize,% + series=\bfseries} +\setbeamerfont{block title alerted}{size=\normalsize,% + series=\bfseries} +\setbeamerfont*{subtitle}{size=\large} +\setbeamerfont{frametitle}{size=\large,% + series=\bfseries} +\setbeamerfont{caption}{size=\small} +\setbeamerfont{caption name}{series=\bfseries} +\setbeamerfont{description item}{series=\bfseries} +\setbeamerfont{page number in head/foot}{size=\scriptsize} +\setbeamerfont{bibliography entry author}{size=\normalsize,% + series=\normalfont} +\setbeamerfont{bibliography entry title}{size=\normalsize,% + series=\bfseries} +\setbeamerfont{bibliography entry location}{size=\normalsize,% + series=\normalfont} +\setbeamerfont{bibliography entry note}{size=\small,% + series=\normalfont} +\setbeamerfont{standout}{size=\Large,% + series=\bfseries} +\pgfkeys{ + /metropolis/font/titleformat title/.cd, + .is choice, + regular/.code={% + \let\metropolis@titleformat\@empty% + \setbeamerfont{title}{shape=\normalfont}% + }, + smallcaps/.code={% + \let\metropolis@titleformat\@empty% + \setbeamerfont{title}{shape=\scshape}% + }, + allsmallcaps/.code={% + \let\metropolis@titleformat\lowercase% + \setbeamerfont{title}{shape=\scshape}% + \PackageWarning{beamerthememetropolis}{% + Be aware that titleformat title=allsmallcaps can lead to problems% + } + }, + allcaps/.code={% + \let\metropolis@titleformat\uppercase% + \setbeamerfont{title}{shape=\normalfont} + \PackageWarning{beamerthememetropolis}{% + Be aware that titleformat title=allcaps can lead to problems% + } + }, +} +\pgfkeys{ + /metropolis/font/titleformat subtitle/.cd, + .is choice, + regular/.code={% + \let\metropolis@subtitleformat\@empty% + \setbeamerfont{subtitle}{shape=\normalfont}% + }, + smallcaps/.code={% + \let\metropolis@subtitleformat\@empty% + \setbeamerfont{subtitle}{shape=\scshape}% + }, + allsmallcaps/.code={% + \let\metropolis@subtitleformat\lowercase% + \setbeamerfont{subtitle}{shape=\scshape}% + \PackageWarning{beamerthememetropolis}{% + Be aware that titleformat subtitle=allsmallcaps can lead to problems% + } + }, + allcaps/.code={% + \let\metropolis@subtitleformat\uppercase% + \setbeamerfont{subtitle}{shape=\normalfont}% + \PackageWarning{beamerthememetropolis}{% + Be aware that titleformat subtitle=allcaps can lead to problems% + } + }, +} +\pgfkeys{ + /metropolis/font/titleformat section/.cd, + .is choice, + regular/.code={% + \let\metropolis@sectiontitleformat\@empty% + \setbeamerfont{section title}{shape=\normalfont}% + }, + smallcaps/.code={% + \let\metropolis@sectiontitleformat\@empty% + \setbeamerfont{section title}{shape=\scshape}% + }, + allsmallcaps/.code={% + \let\metropolis@sectiontitleformat\MakeLowercase% + \setbeamerfont{section title}{shape=\scshape}% + \PackageWarning{beamerthememetropolis}{% + Be aware that titleformat section=allsmallcaps can lead to problems% + } + }, + allcaps/.code={% + \let\metropolis@sectiontitleformat\MakeUppercase% + \setbeamerfont{section title}{shape=\normalfont}% + \PackageWarning{beamerthememetropolis}{% + Be aware that titleformat section=allcaps can lead to problems% + } + }, +} +\pgfkeys{ + /metropolis/font/titleformat frame/.cd, + .is choice, + regular/.code={% + \let\metropolis@frametitleformat\@empty% + \setbeamerfont{frametitle}{shape=\normalfont}% + }, + smallcaps/.code={% + \let\metropolis@frametitleformat\@empty% + \setbeamerfont{frametitle}{shape=\scshape}% + }, + allsmallcaps/.code={% + \let\metropolis@frametitleformat\MakeLowercase% + \setbeamerfont{frametitle}{shape=\scshape}% + \PackageWarning{beamerthememetropolis}{% + Be aware that titleformat frame=allsmallcaps can lead to problems% + } + }, + allcaps/.code={% + \let\metropolis@frametitleformat\MakeUppercase% + \setbeamerfont{frametitle}{shape=\normalfont} + \PackageWarning{beamerthememetropolis}{% + Be aware that titleformat frame=allcaps can lead to problems% + } + }, +} +\pgfkeys{ + /metropolis/font/.cd, + titleformattitle/.code=\pgfkeysalso{titleformat title=#1}, + titleformatsubtitle/.code=\pgfkeysalso{titleformat subtitle=#1}, + titleformatsection/.code=\pgfkeysalso{titleformat section=#1}, + titleformatframe/.code=\pgfkeysalso{titleformat frame=#1}, +} +\newcommand{\metropolis@font@setdefaults}{ + \pgfkeys{/metropolis/font/.cd, + titleformat title=regular, + titleformat subtitle=regular, + titleformat section=regular, + titleformat frame=regular, + } +} +\def\metropolis@titleformat#1{#1} +\def\metropolis@subtitleformat#1{#1} +\def\metropolis@sectiontitleformat#1{#1} +\def\metropolis@frametitleformat#1{#1} +\patchcmd{\beamer@title}% + {\def\inserttitle{#2}}% + {\def\inserttitle{\metropolis@titleformat{#2}}}% + {}% + {\PackageError{beamerfontthememetropolis}{Patching title failed}\@ehc} +\patchcmd{\beamer@subtitle}% + {\def\insertsubtitle{#2}}% + {\def\insertsubtitle{\metropolis@subtitleformat{#2}}}% + {}% + {\PackageError{beamerfontthememetropolis}{Patching subtitle failed}\@ehc} +\patchcmd{\sectionentry} + {\def\insertsectionhead{#2}} + {\def\insertsectionhead{\metropolis@sectiontitleformat{#2}}} + {} + {\PackageError{beamerfontthememetropolis}{Patching section title failed}\@ehc} +\@tempswafalse +\patchcmd{\beamer@section} + {\edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\unexpanded{#1}}}} + {\edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{% + \noexpand\metropolis@sectiontitleformat{\unexpanded{#1}}}}} + {\@tempswatrue} + {} +\patchcmd{\beamer@section} + {\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}} + {\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{% + \metropolis@sectiontitleformat{#1}}}} + {\@tempswatrue} + {} +\patchcmd{\beamer@section} + {\protected@edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}} + {\protected@edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{% + \noexpand\metropolis@sectiontitleformat{#1}}}} + {\@tempswatrue} + {} +\if@tempswa\else + \PackageError{beamerfontthememetropolis}{Patching section title failed}\@ehc +\fi +\@tempswafalse +\patchcmd{\beamer@subsection} + {\edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\unexpanded{#1}}}} + {\edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{% + \noexpand\metropolis@sectiontitleformat{\unexpanded{#1}}}}} + {\@tempswatrue} + {} +\patchcmd{\beamer@subsection} + {\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{#1}}} + {\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{% + \metropolis@sectiontitleformat{#1}}}} + {\@tempswatrue} + {} +\patchcmd{\beamer@subsection} + {\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}} + {\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{% + \noexpand\metropolis@sectiontitleformat{#1}}}} + {\@tempswatrue} + {} +\if@tempswa\else + \PackageError{beamerfontthememetropolis}{Patching section title failed}\@ehc +\fi +\patchcmd{\beamer@@frametitle} + {{% + \gdef\insertframetitle{{#2\ifnum\beamer@autobreakcount>0\relax{}\space% + \usebeamertemplate*{frametitle continuation}\fi}}% + \gdef\beamer@frametitle{#2}% + \gdef\beamer@shortframetitle{#1}% + }} + {{% + \gdef\insertframetitle{{\metropolis@frametitleformat{#2}\ifnum% + \beamer@autobreakcount>0\relax{}\space% + \usebeamertemplate*{frametitle continuation}\fi}}% + \gdef\beamer@frametitle{#2}% + \gdef\beamer@shortframetitle{#1}% + }} + {} + {\PackageError{beamerfontthememetropolis}{Patching frame title failed}\@ehc} +\metropolis@font@setdefaults +\ProcessPgfPackageOptions{/metropolis/font} +\endinput +%% +%% End of file `beamerfontthememetropolis.sty'. diff --git a/tex/beamerinnerthememetropolis.sty b/tex/beamerinnerthememetropolis.sty new file mode 100644 index 0000000..415b46f --- /dev/null +++ b/tex/beamerinnerthememetropolis.sty @@ -0,0 +1,297 @@ +%% +%% This is file `beamerinnerthememetropolis.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% beamerinnerthememetropolis.dtx (with options: `package') +%% --------------------------------------------------------------------------- +%% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of +%% contributors can be found at +%% +%% https://github.com/matze/mtheme/graphs/contributors +%% +%% and the original template was based on the HSRM theme by Benjamin Weiss. +%% +%% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 +%% International License (https://creativecommons.org/licenses/by-sa/4.0/). +%% --------------------------------------------------------------------------- +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{beamerinnerthememetropolis}[2017/01/23 Metropolis inner theme] +\RequirePackage{etoolbox} +\RequirePackage{keyval} +\RequirePackage{calc} +\RequirePackage{pgfopts} +\RequirePackage{tikz} +\pgfkeys{ + /metropolis/inner/sectionpage/.cd, + .is choice, + none/.code=\metropolis@disablesectionpage, + simple/.code={\metropolis@enablesectionpage + \setbeamertemplate{section page}[simple]}, + progressbar/.code={\metropolis@enablesectionpage + \setbeamertemplate{section page}[progressbar]}, +} +\pgfkeys{ + /metropolis/inner/subsectionpage/.cd, + .is choice, + none/.code=\metropolis@disablesubsectionpage, + simple/.code={\metropolis@enablesubsectionpage + \setbeamertemplate{section page}[simple]}, + progressbar/.code={\metropolis@enablesubsectionpage + \setbeamertemplate{section page}[progressbar]}, +} +\newcommand{\metropolis@inner@setdefaults}{ + \pgfkeys{/metropolis/inner/.cd, + sectionpage=progressbar, + subsectionpage=none + } +} +\setbeamertemplate{title page}{ + \begin{minipage}[b][\paperheight]{\textwidth} + \ifx\inserttitlegraphic\@empty\else\usebeamertemplate*{title graphic}\fi + \vfill% + \ifx\inserttitle\@empty\else\usebeamertemplate*{title}\fi + \ifx\insertsubtitle\@empty\else\usebeamertemplate*{subtitle}\fi + \usebeamertemplate*{title separator} + \ifx\beamer@shortauthor\@empty\else\usebeamertemplate*{author}\fi + \ifx\insertdate\@empty\else\usebeamertemplate*{date}\fi + \ifx\insertinstitute\@empty\else\usebeamertemplate*{institute}\fi + \vfill + \vspace*{1mm} + \end{minipage} +} +\def\maketitle{% + \ifbeamer@inframe + \titlepage + \else + \frame[plain,noframenumbering]{\titlepage} + \fi +} +\def\titlepage{% + \usebeamertemplate{title page} +} +\setbeamertemplate{title graphic}{ + \vbox to 0pt { + \vspace*{2em} + \inserttitlegraphic% + }% + \nointerlineskip% +} +\setbeamertemplate{title}{ + \raggedright% + \linespread{1.0}% + \inserttitle% + \par% + \vspace*{0.5em} +} +\setbeamertemplate{subtitle}{ + \raggedright% + \insertsubtitle% + \par% + \vspace*{0.5em} +} +\newlength{\metropolis@titleseparator@linewidth} +\setlength{\metropolis@titleseparator@linewidth}{0.4pt} +\setbeamertemplate{title separator}{ + \tikzexternaldisable% + \begin{tikzpicture} + \fill[fg] (0,0) rectangle (\textwidth, \metropolis@titleseparator@linewidth); + \end{tikzpicture}% + \tikzexternalenable% + \par% +} +\setbeamertemplate{author}{ + \vspace*{2em} + \insertauthor% + \par% + \vspace*{0.25em} +} +\setbeamertemplate{date}{ + \insertdate% + \par% +} +\setbeamertemplate{institute}{ + \vspace*{3mm} + \insertinstitute% + \par% +} +\defbeamertemplate{section page}{simple}{ + \begin{center} + \usebeamercolor[fg]{section title} + \usebeamerfont{section title} + \insertsectionhead\par + \ifx\insertsubsectionhead\@empty\else + \usebeamercolor[fg]{subsection title} + \usebeamerfont{subsection title} + \insertsubsectionhead + \fi + \end{center} +} +\defbeamertemplate{section page}{progressbar}{ + \centering + \begin{minipage}{22em} + \raggedright + \usebeamercolor[fg]{section title} + \usebeamerfont{section title} + \insertsectionhead\\[-1ex] + \usebeamertemplate*{progress bar in section page} + \par + \ifx\insertsubsectionhead\@empty\else% + \usebeamercolor[fg]{subsection title}% + \usebeamerfont{subsection title}% + \insertsubsectionhead + \fi + \end{minipage} + \par + \vspace{\baselineskip} +} +\newcommand{\metropolis@disablesectionpage}{ + \AtBeginSection{ + % intentionally empty + } +} +\newcommand{\metropolis@enablesectionpage}{ + \AtBeginSection{ + \ifbeamer@inframe + \sectionpage + \else + \frame[plain,c,noframenumbering]{\sectionpage} + \fi + } +} +\setbeamertemplate{subsection page}{% + \usebeamertemplate*{section page} +} +\newcommand{\metropolis@disablesubsectionpage}{ + \AtBeginSubsection{ + % intentionally empty + } +} +\newcommand{\metropolis@enablesubsectionpage}{ + \AtBeginSubsection{ + \ifbeamer@inframe + \subsectionpage + \else + \frame[plain,c,noframenumbering]{\subsectionpage} + \fi + } +} +\newlength{\metropolis@progressonsectionpage} +\newlength{\metropolis@progressonsectionpage@linewidth} +\setlength{\metropolis@progressonsectionpage@linewidth}{0.4pt} +\setbeamertemplate{progress bar in section page}{ + \setlength{\metropolis@progressonsectionpage}{% + \textwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}% + }% + \tikzexternaldisable% + \begin{tikzpicture} + \fill[bg] (0,0) rectangle (\textwidth, \metropolis@progressonsectionpage@linewidth); + \fill[fg] (0,0) rectangle (\metropolis@progressonsectionpage, \metropolis@progressonsectionpage@linewidth); + \end{tikzpicture}% + \tikzexternalenable% +} +\def\inserttotalframenumber{100} +\newlength{\metropolis@blocksep} +\newlength{\metropolis@blockadjust} +\setlength{\metropolis@blocksep}{0.75ex} +\setlength{\metropolis@blockadjust}{0.25ex} +\providecommand{\metropolis@strut}{% + \vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz()}% +} +\newcommand{\metropolis@block}[1]{ + \par\vskip\medskipamount% + \setlength{\parskip}{0pt} + \ifbeamercolorempty[bg]{block title#1}{% + \begin{beamercolorbox}[rightskip=0pt plus 4em]{block title#1}}{% + \ifbeamercolorempty[bg]{block title}{% + \begin{beamercolorbox}[rightskip=0pt plus 4em]{block title#1}% + }% + {% + \begin{beamercolorbox}[ + sep=\dimexpr\metropolis@blocksep-\metropolis@blockadjust\relax, + leftskip=\metropolis@blockadjust, + rightskip=\dimexpr\metropolis@blockadjust plus 4em\relax + ]{block title#1}% + }}% + \usebeamerfont*{block title#1}% + \metropolis@strut% + \insertblocktitle% + \metropolis@strut% + \end{beamercolorbox}% + \nointerlineskip% + \ifbeamercolorempty[bg]{block body#1}{% + \begin{beamercolorbox}[vmode]{block body#1}}{ + \ifbeamercolorempty[bg]{block body}{% + \begin{beamercolorbox}[vmode]{block body#1}% + }{% + \begin{beamercolorbox}[sep=\metropolis@blocksep, vmode]{block body#1}% + \vspace{-\metropolis@parskip} + }}% + \usebeamerfont{block body#1}% + \setlength{\parskip}{\metropolis@parskip}% +} +\setbeamertemplate{block begin}{\metropolis@block{}} +\setbeamertemplate{block alerted begin}{\metropolis@block{ alerted}} +\setbeamertemplate{block example begin}{\metropolis@block{ example}} +\setbeamertemplate{block end}{\end{beamercolorbox}\vspace*{0.2ex}} +\setbeamertemplate{block alerted end}{\end{beamercolorbox}\vspace*{0.2ex}} +\setbeamertemplate{block example end}{\end{beamercolorbox}\vspace*{0.2ex}} +\setbeamertemplate{itemize items}{\textbullet} +\setbeamertemplate{caption label separator}{: } +\setbeamertemplate{caption}[numbered] +\setbeamertemplate{footnote}{% + \parindent 0em\noindent% + \raggedright + \usebeamercolor{footnote}\hbox to 0.8em{\hfil\insertfootnotemark}\insertfootnotetext\par% +} +\newlength{\metropolis@parskip} +\setlength{\metropolis@parskip}{0.5em} +\setlength{\parskip}{\metropolis@parskip} +\linespread{1.15} +\define@key{beamerframe}{c}[true]{% centered + \beamer@frametopskip=0pt plus 1fill\relax% + \beamer@framebottomskip=0pt plus 1fill\relax% + \beamer@frametopskipautobreak=0pt plus .4\paperheight\relax% + \beamer@framebottomskipautobreak=0pt plus .6\paperheight\relax% + \def\beamer@initfirstlineunskip{}% +} +\providebool{metropolis@standout} +\define@key{beamerframe}{standout}[true]{% + \booltrue{metropolis@standout} + \begingroup + \setkeys{beamerframe}{c} + \setkeys{beamerframe}{noframenumbering} + \ifbeamercolorempty[bg]{palette primary}{ + \setbeamercolor{background canvas}{ + use=palette primary, + bg=-palette primary.fg + } + }{ + \setbeamercolor{background canvas}{ + use=palette primary, + bg=palette primary.bg + } + } + \setbeamercolor{local structure}{ + fg=palette primary.fg + } + \usebeamercolor[fg]{palette primary} +} + \pretocmd{\beamer@reseteecodes}{% + \ifbool{metropolis@standout}{ + \endgroup + \boolfalse{metropolis@standout} + }{} + }{}{} + \AtBeginEnvironment{beamer@frameslide}{ + \ifbool{metropolis@standout}{ + \centering + \usebeamerfont{standout} + }{} + } +\metropolis@inner@setdefaults +\ProcessPgfPackageOptions{/metropolis/inner} +\endinput +%% +%% End of file `beamerinnerthememetropolis.sty'. diff --git a/tex/beamerouterthememetropolis.sty b/tex/beamerouterthememetropolis.sty new file mode 100644 index 0000000..928a122 --- /dev/null +++ b/tex/beamerouterthememetropolis.sty @@ -0,0 +1,137 @@ +%% +%% This is file `beamerouterthememetropolis.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% beamerouterthememetropolis.dtx (with options: `package') +%% --------------------------------------------------------------------------- +%% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of +%% contributors can be found at +%% +%% https://github.com/matze/mtheme/graphs/contributors +%% +%% and the original template was based on the HSRM theme by Benjamin Weiss. +%% +%% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 +%% International License (https://creativecommons.org/licenses/by-sa/4.0/). +%% --------------------------------------------------------------------------- +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{beamerouterthememetropolis}[2017/01/23 Metropolis outer theme] +\RequirePackage{etoolbox} +\RequirePackage{calc} +\RequirePackage{pgfopts} +\pgfkeys{ + /metropolis/outer/numbering/.cd, + .is choice, + none/.code=\setbeamertemplate{frame numbering}[none], + counter/.code=\setbeamertemplate{frame numbering}[counter], + fraction/.code=\setbeamertemplate{frame numbering}[fraction], +} +\pgfkeys{ + /metropolis/outer/progressbar/.cd, + .is choice, + none/.code={% + \setbeamertemplate{headline}[plain] + \setbeamertemplate{frametitle}[plain] + \setbeamertemplate{footline}[plain] + }, + head/.code={\pgfkeys{/metropolis/outer/progressbar=none} + \addtobeamertemplate{headline}{}{% + \usebeamertemplate*{progress bar in head/foot} + } + }, + frametitle/.code={\pgfkeys{/metropolis/outer/progressbar=none} + \addtobeamertemplate{frametitle}{}{% + \usebeamertemplate*{progress bar in head/foot} + } + }, + foot/.code={\pgfkeys{/metropolis/outer/progressbar=none} + \addtobeamertemplate{footline}{}{% + \usebeamertemplate*{progress bar in head/foot}% + } + }, +} +\newcommand{\metropolis@outer@setdefaults}{ + \pgfkeys{/metropolis/outer/.cd, + numbering=counter, + progressbar=none, + } +} +\setbeamertemplate{navigation symbols}{} +\defbeamertemplate{frame footer}{none}{} +\defbeamertemplate{frame footer}{custom}[1]{ #1 } +\defbeamertemplate{frame numbering}{none}{} +\defbeamertemplate{frame numbering}{counter}{\insertframenumber} +\defbeamertemplate{frame numbering}{fraction}{ + \insertframenumber/\inserttotalframenumber +} +\defbeamertemplate{headline}{plain}{} +\defbeamertemplate{footline}{plain}{% + \begin{beamercolorbox}[wd=\textwidth, sep=3ex]{footline}% + \usebeamerfont{page number in head/foot}% + \usebeamertemplate*{frame footer} + \hfill% + \usebeamertemplate*{frame numbering} + \end{beamercolorbox}% +} +\newlength{\metropolis@frametitle@padding} +\setlength{\metropolis@frametitle@padding}{2.2ex} +\newcommand{\metropolis@frametitlestrut@start}{ + \rule{0pt}{\metropolis@frametitle@padding +% + \totalheightof{% + \ifcsdef{metropolis@frametitleformat}{\metropolis@frametitleformat X}{X}% + }% + }% +} +\newcommand{\metropolis@frametitlestrut@end}{ + \rule[-\metropolis@frametitle@padding]{0pt}{\metropolis@frametitle@padding} +} +\defbeamertemplate{frametitle}{plain}{% + \nointerlineskip% + \begin{beamercolorbox}[% + wd=\paperwidth,% + sep=0pt,% + leftskip=\metropolis@frametitle@padding,% + rightskip=\metropolis@frametitle@padding,% + ]{frametitle}% + \metropolis@frametitlestrut@start% + \insertframetitle% + \nolinebreak% + \metropolis@frametitlestrut@end% + \end{beamercolorbox}% +} +\setbeamertemplate{frametitle continuation}{% + \usebeamerfont{frametitle} + \romannumeral \insertcontinuationcount +} +\newlength{\metropolis@progressinheadfoot} +\newlength{\metropolis@progressinheadfoot@linewidth} +\setlength{\metropolis@progressinheadfoot@linewidth}{0.4pt} +\setbeamertemplate{progress bar in head/foot}{ + \nointerlineskip + \setlength{\metropolis@progressinheadfoot}{% + \paperwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}% + }% + \begin{beamercolorbox}[wd=\paperwidth]{progress bar in head/foot} + \tikzexternaldisable% + \begin{tikzpicture} + \fill[bg] (0,0) rectangle (\paperwidth, \metropolis@progressinheadfoot@linewidth); + \fill[fg] (0,0) rectangle (\metropolis@progressinheadfoot, \metropolis@progressinheadfoot@linewidth); + \end{tikzpicture}% + \tikzexternalenable% + \end{beamercolorbox} +} +\AtBeginDocument{% + \apptocmd{\appendix}{% + \pgfkeys{% + /metropolis/outer/.cd, + numbering=none, + progressbar=none} + }{}{} +} +\metropolis@outer@setdefaults +\ProcessPgfPackageOptions{/metropolis/outer} +\endinput +%% +%% End of file `beamerouterthememetropolis.sty'. diff --git a/tex/beamerthememetropolis.sty b/tex/beamerthememetropolis.sty new file mode 100644 index 0000000..9fbe86e --- /dev/null +++ b/tex/beamerthememetropolis.sty @@ -0,0 +1,107 @@ +%% +%% This is file `beamerthememetropolis.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% beamerthememetropolis.dtx (with options: `package') +%% --------------------------------------------------------------------------- +%% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of +%% contributors can be found at +%% +%% https://github.com/matze/mtheme/graphs/contributors +%% +%% and the original template was based on the HSRM theme by Benjamin Weiss. +%% +%% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 +%% International License (https://creativecommons.org/licenses/by-sa/4.0/). +%% --------------------------------------------------------------------------- +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{beamerthememetropolis} + [2017/01/23 v1.2 Metropolis Beamer theme] +\RequirePackage{etoolbox} +\RequirePackage{pgfopts} +\pgfkeys{/metropolis/.cd, + .search also={ + /metropolis/inner, + /metropolis/outer, + /metropolis/color, + /metropolis/font, + } +} +\pgfkeys{ + /metropolis/titleformat plain/.cd, + .is choice, + regular/.code={% + \let\metropolis@plaintitleformat\@empty% + \setbeamerfont{standout}{shape=\normalfont}% + }, + smallcaps/.code={% + \let\metropolis@plaintitleformat\@empty% + \setbeamerfont{standout}{shape=\scshape}% + }, + allsmallcaps/.code={% + \let\metropolis@plaintitleformat\MakeLowercase% + \setbeamerfont{standout}{shape=\scshape}% + \PackageWarning{beamerthememetropolis}{% + Be aware that titleformat plain=allsmallcaps can lead to problems% + } + }, + allcaps/.code={% + \let\metropolis@plaintitleformat\MakeUppercase% + \setbeamerfont{standout}{shape=\normalfont}% + \PackageWarning{beamerthememetropolis}{% + Be aware that titleformat plain=allcaps can lead to problems% + } + }, +} +\pgfkeys{ + /metropolis/titleformat/.code=\pgfkeysalso{ + font/titleformat title=#1, + font/titleformat subtitle=#1, + font/titleformat section=#1, + font/titleformat frame=#1, + titleformat plain=#1, + } +} +\pgfkeys{/metropolis/.cd, + usetitleprogressbar/.code=\pgfkeysalso{outer/progressbar=frametitle}, + noslidenumbers/.code=\pgfkeysalso{outer/numbering=none}, + usetotalslideindicator/.code=\pgfkeysalso{outer/numbering=fraction}, + nosectionslide/.code=\pgfkeysalso{inner/sectionpage=none}, + darkcolors/.code=\pgfkeysalso{color/background=dark}, + blockbg/.code=\pgfkeysalso{color/block=fill, inner/block=fill}, +} +\newcommand{\metropolis@setdefaults}{ + \pgfkeys{/metropolis/.cd, + titleformat plain=regular, + } +} +\providecommand{\tikzexternalenable}{} +\providecommand{\tikzexternaldisable}{} +\useinnertheme{metropolis} +\useoutertheme{metropolis} +\usecolortheme{metropolis} +\usefonttheme{metropolis} +\AtEndPreamble{% + \@ifpackageloaded{pgfplots}{% + \RequirePackage{pgfplotsthemetol} + }{} +} +\newcommand{\metroset}[1]{\pgfkeys{/metropolis/.cd,#1}} +\def\metropolis@plaintitleformat#1{#1} +\newcommand{\plain}[2][]{% + \PackageWarning{beamerthememetropolis}{% + The syntax `\plain' may be deprecated in a future version of Metropolis. + Please use a frame with [standout] instead. + } + \begin{frame}[standout]{#1} + \metropolis@plaintitleformat{#2} + \end{frame} +} +\newcommand{\mreducelistspacing}{\vspace{-\topsep}} +\metropolis@setdefaults +\ProcessPgfOptions{/metropolis} +\endinput +%% +%% End of file `beamerthememetropolis.sty'. diff --git a/tex/pgfplotsthemetol.sty b/tex/pgfplotsthemetol.sty new file mode 100644 index 0000000..7f07743 --- /dev/null +++ b/tex/pgfplotsthemetol.sty @@ -0,0 +1,123 @@ +%% +%% This is file `pgfplotsthemetol.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pgfplotsthemetol.dtx (with options: `package') +%% --------------------------------------------------------------------------- +%% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of +%% contributors can be found at +%% +%% https://github.com/matze/mtheme/graphs/contributors +%% +%% and the original template was based on the HSRM theme by Benjamin Weiss. +%% +%% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 +%% International License (https://creativecommons.org/licenses/by-sa/4.0/). +%% --------------------------------------------------------------------------- +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{pgfplotsthemetol} + [2017/01/23 PGFplots colors based on Paul Tol's SRON technical note] +\definecolor{TolDarkPurple}{HTML}{332288} +\definecolor{TolDarkBlue}{HTML}{6699CC} +\definecolor{TolLightBlue}{HTML}{88CCEE} +\definecolor{TolLightGreen}{HTML}{44AA99} +\definecolor{TolDarkGreen}{HTML}{117733} +\definecolor{TolDarkBrown}{HTML}{999933} +\definecolor{TolLightBrown}{HTML}{DDCC77} +\definecolor{TolDarkRed}{HTML}{661100} +\definecolor{TolLightRed}{HTML}{CC6677} +\definecolor{TolLightPink}{HTML}{AA4466} +\definecolor{TolDarkPink}{HTML}{882255} +\definecolor{TolLightPurple}{HTML}{AA4499} +\pgfplotscreateplotcyclelist{mbarplot cycle}{% + {draw=TolDarkBlue, fill=TolDarkBlue!70}, + {draw=TolLightBrown, fill=TolLightBrown!70}, + {draw=TolLightGreen, fill=TolLightGreen!70}, + {draw=TolDarkPink, fill=TolDarkPink!70}, + {draw=TolDarkPurple, fill=TolDarkPurple!70}, + {draw=TolDarkRed, fill=TolDarkRed!70}, + {draw=TolDarkBrown, fill=TolDarkBrown!70}, + {draw=TolLightRed, fill=TolLightRed!70}, + {draw=TolLightPink, fill=TolLightPink!70}, + {draw=TolLightPurple, fill=TolLightPurple!70}, + {draw=TolLightBlue, fill=TolLightBlue!70}, + {draw=TolDarkGreen, fill=TolDarkGreen!70}, +} +\pgfplotscreateplotcyclelist{mlineplot cycle}{% + {TolDarkBlue, mark=*, mark size=1.5pt}, + {TolLightBrown, mark=square*, mark size=1.3pt}, + {TolLightGreen, mark=triangle*, mark size=1.5pt}, + {TolDarkBrown, mark=diamond*, mark size=1.5pt}, +} +\pgfplotsset{ + compat=1.9, + mlineplot/.style={ + mbaseplot, + xmajorgrids=true, + ymajorgrids=true, + major grid style={dotted}, + axis x line=bottom, + axis y line=left, + legend style={ + cells={anchor=west}, + draw=none + }, + cycle list name=mlineplot cycle, + }, + mbarplot base/.style={ + mbaseplot, + bar width=6pt, + axis y line*=none, + }, + mbarplot/.style={ + mbarplot base, + ybar, + xmajorgrids=false, + ymajorgrids=true, + area legend, + legend image code/.code={% + \draw[#1] (0cm,-0.1cm) rectangle (0.15cm,0.1cm); + }, + cycle list name=mbarplot cycle, + }, + horizontal mbarplot/.style={ + mbarplot base, + xmajorgrids=true, + ymajorgrids=false, + xbar stacked, + area legend, + legend image code/.code={% + \draw[#1] (0cm,-0.1cm) rectangle (0.15cm,0.1cm); + }, + cycle list name=mbarplot cycle, + }, + mbaseplot/.style={ + legend style={ + draw=none, + fill=none, + cells={anchor=west}, + }, + x tick label style={ + font=\footnotesize + }, + y tick label style={ + font=\footnotesize + }, + legend style={ + font=\footnotesize + }, + major grid style={ + dotted, + }, + axis x line*=bottom, + }, + disable thousands separator/.style={ + /pgf/number format/.cd, + 1000 sep={} + }, +} +\endinput +%% +%% End of file `pgfplotsthemetol.sty'. diff --git a/tex/tex-macros.sty b/tex/tex-macros.sty index 7d8fde7..c732041 100644 --- a/tex/tex-macros.sty +++ b/tex/tex-macros.sty @@ -20,6 +20,8 @@ \newcommand{\BigOm}{\ensuremath{\Omega}} \newcommand{\BigT}{\ensuremath{\Theta}} +\newcommand{\gen}[1]{\ensuremath{\langle #1\rangle}} + \DeclareMathOperator{\GL}{GL} \DeclareMathOperator{\Imm}{Im} \DeclareMathOperator{\Ker}{Ker} @@ -31,3 +33,4 @@ \DeclareMathOperator{\Var}{Var} \DeclareMathOperator{\Cov}{Cov} \DeclareMathOperator{\supp}{supp} + diff --git a/themectl/config.toml b/themectl/config.toml index cf71945..735e4e1 100644 --- a/themectl/config.toml +++ b/themectl/config.toml @@ -1,6 +1,7 @@ [apps] vim-custom = "~/.config/nvim/colors/theme.vim" +neovim-custom = "~/.config/nvim/colors/theme-nvim.lua" airline = "~/.config/nvim/autoload/airline/themes/theme.vim" shell-custom = { file = "~/.cache/theme/colors.sh", post = "(bspc wm -r &) ; (source ~/.cache/theme/colors.sh)" } diff --git a/themectl/templates/neovim-custom.mustache b/themectl/templates/neovim-custom.mustache new file mode 100644 index 0000000..dec5e56 --- /dev/null +++ b/themectl/templates/neovim-custom.mustache @@ -0,0 +1,22 @@ +require('base16-colorscheme').with_config { + telescope = false, +} + +require('base16-colorscheme').setup({ + base00 = "#{{base00-hex}}", + base01 = "#{{base01-hex}}", + base02 = "#{{base02-hex}}", + base03 = "#{{base03-hex}}", + base04 = "#{{base04-hex}}", + base05 = "#{{base05-hex}}", + base06 = "#{{base06-hex}}", + base07 = "#{{base07-hex}}", + base08 = "#{{base08-hex}}", + base09 = "#{{base09-hex}}", + base0A = "#{{base0A-hex}}", + base0B = "#{{base0B-hex}}", + base0C = "#{{base0C-hex}}", + base0D = "#{{base0D-hex}}", + base0E = "#{{base0E-hex}}", + base0F = "#{{base0F-hex}}", +}) diff --git a/themectl/templates/vim-custom.mustache b/themectl/templates/vim-custom.mustache index 4865636..b84285e 100644 --- a/themectl/templates/vim-custom.mustache +++ b/themectl/templates/vim-custom.mustache @@ -8,9 +8,11 @@ " :colorscheme works in terminals supported by base16-shell scripts " User must set this variable in .vimrc " let g:base16_shell_path=base16-builder/output/shell/ + if !has("gui_running") if exists("g:base16_shell_path") - execute "silent !/bin/sh ".g:base16_shell_path."/base16-{{scheme-slug}}.sh" + " execute "silent !/bin/sh ".g:base16_shell_path."/base16-{{scheme-slug}}.sh" + execute "silent !/bin/sh $HOME/.cache/theme/variables.sh" endif endif diff --git a/zsh/zshrc b/zsh/zshrc index dbe12c1..89efe8d 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -1,6 +1,6 @@ -export PATH=$HOME/.config/bin/$(cat /etc/hostname):$HOME/.config/bin:$HOME/.local/bin:$HOME/.local/share/texlive/2023/bin/x86_64-linux:$HOME/.local/share/cargo/bin:/home/emh/.local/share/solana/install/active_release/bin:$HOME/.local/share/npm/bin:$PATH -export MANPATH=$MANPATH:$HOME/.local/share/texlive/2023/texmf-dist/doc/man -export INFOPATH=$INFOPATH:$HOME/.local/share/texlive/2023/texmf-dist/doc/info +export PATH=$HOME/.config/bin/$(cat /etc/hostname):$HOME/.config/bin:$HOME/.local/bin:$HOME/.local/share/texlive/2024/bin/x86_64-linux:$HOME/.local/share/cargo/bin:/home/emh/.local/share/solana/install/active_release/bin:$HOME/.local/share/npm/bin:$PATH +export MANPATH=$MANPATH:$HOME/.local/share/texlive/2024/texmf-dist/doc/man +export INFOPATH=$INFOPATH:$HOME/.local/share/texlive/2024/texmf-dist/doc/info . "$HOME"/.cache/theme/colors.sh . "$HOME"/.cache/theme/variables.sh