PK!eSTsphinxience/__init__.py__version_tuple__ = (0, 4, 2) __version__ = '.'.join(map(str, __version_tuple__)) __version_date_latex__ = "2018/10/01" # in LaTeX format __all__ = [] import logging, os.path from os import path from sphinx.locale import __ from sphinx.util.fileutil import copy_asset_file SUBMODULES = [ "collapse", "skip", ] ASSET_FILES = [ "sphinxience-article.cls_t", "sphinxience.sty_t", ] package_dir = path.abspath(path.dirname(__file__)) logger = logging.getLogger(__name__) def latex_is_active(app): return app.builder.format == 'latex' def update_context(app, pagename, templatename, context, doctree): context["sphinxience_version"] = __version__ def on_build_finished(app, exc): # Copy static files for LaTeX after the rest of the build process is done. if exc is None and latex_is_active(app): context = dict( sphinxience_version = __version__, sphinxience_version_date_latex = __version_date_latex__ ) src = path.join(package_dir, 'templates') for asset_file in ASSET_FILES: src_path = path.join(src, asset_file) logger.info(__("Copying file %s into %s" % (src_path, app.outdir))) copy_asset_file(src_path, app.outdir, context=context) def setup(app): app.require_sphinx('1.7') app.add_html_theme('sphinxience', os.path.abspath(os.path.dirname(__file__))) app.connect("html-page-context", update_context) app.connect("build-finished", on_build_finished) for submodule in SUBMODULES: app.setup_extension("sphinxience.{}".format(submodule)) return {'version': __version__, "parallel_read_safe": True}PK!{[sphinxience/collapse.py# -*- coding: utf-8 -*- """ Collapse directive. :copyright: Copyright 2014 by Bram Geron. :license: BSD 3-clause. """ from docutils import nodes from docutils.nodes import paragraph, emphasis import docutils.parsers.rst.directives.admonitions from docutils.parsers.rst import Directive, directives from docutils.parsers.rst.roles import set_classes from . import latex_is_active, logger, package_dir from os import path from sphinx.locale import __ from sphinx.util.fileutil import copy_asset_file CSS_FILES = [ "collapse-details-polyfill.css", ] JS_FILES = [ "jquery.details.min.js", "collapse-details-polyfill.js", ] " ------- SETUP ------ " def setup(app): # * When rendering a collapse node in HTML, add certain HTML tags, then # render the children. # * When rendering a collapse node elsewhere, just render its children. html_actions = (visit_collapse_html, depart_collapse_html) latex_actions = (visit_collapse_latex, depart_collapse_latex) other_actions = (passthrough, passthrough) # * When rendering a replacement in HTML, ignore it. # * When rendering a replacement elsewhere replacement_html_actions = (visit_skipnode, depart_skipnode) replacement_other_actions = (visit_skipsiblings, depart_skipsiblings) app.add_node(collapse, html=html_actions, latex=latex_actions, text=other_actions, man=other_actions, texinfo=other_actions) app.add_node(replacement, html=replacement_html_actions, latex=replacement_other_actions, text=replacement_other_actions, man=replacement_other_actions, texinfo=replacement_other_actions) app.add_directive('collapse', CollapseDirective) # No directive for replacement, because we only want to create it programmatically. app.connect('builder-inited', on_builder_inited) app.connect("build-finished", on_build_finished) return { 'version': "0.1", 'parallel_read_safe': True, 'parallel_write_safe': True, } def on_builder_inited(app): for css in CSS_FILES: app.add_stylesheet(css) for js in JS_FILES: app.add_javascript(js) def on_build_finished(app, exc): # Copy static files for LaTeX after the rest of the build process is done. if exc is None and latex_is_active(app): for file in CSS_FILES + JS_FILES: src = path.join(package_dir, 'static', file) dest = path.join(app.outdir, '_static') logger.info(__("Copying file %s into %s" % (src, dest))) copy_asset_file(src, dest) " ------- NODES ------ " class collapse(nodes.Admonition, nodes.Element): pass class replacement(nodes.General, nodes.Element): """A node that serves as a replacement in case we're not writing to HTML, in a sense similar to the HTML element. If we're visiting as HTML, we skip this node. If we're visiting otherwise, we visit the children and skip the siblings. """ " ------- DIRECTIVES ------ " class CollapseDirective(directives.admonitions.BaseAdmonition): node_class = collapse def run(self): (node,) = super(CollapseDirective, self).run() # Add a replacement node with some text. replnode = replacement(node.rawsource, paragraph(node.rawsource, "", emphasis(node.rawsource, "(Some stuff hidden.)"))) node.insert(0, replnode) return [node] " ------- VISITOR FUNCTIONS ------ " def visit_collapse_html(self, node): self.body.append(self.starttag(node, 'details')) self.body.append(self.starttag(node, 'summary')) # self.visit_title(node.title) self.body.append("(collapsed)") self.body.append("</summary>") self.body.append(self.starttag(node, 'div')) def depart_collapse_html(self, node): self.body.append('</div>') self.body.append('</details>') def visit_collapse_latex(self, node): self.body.append('\n\n' + r'{\scriptsize ') # Replacement text will follow. def depart_collapse_latex(self, node): self.body.append('}\n\n') def passthrough(self, node): pass def visit_skipnode(self, node): raise nodes.SkipNode def depart_skipnode(self, node): pass def visit_skipsiblings(self, node): pass def depart_skipsiblings(self, node): raise nodes.SkipSiblings PK�������!� ʟ�������sphinxience/layout.html{%- extends "basic/layout.html" %} {%- block footer %} <div class="footer"> {% if show_copyright %}&copy;{{ copyright }}.{% endif %} {% if theme_show_powered_by|lower == 'true' %} {% if show_copyright %}|{% endif %} Powered by <a href="http://sphinx-doc.org/">Sphinx {{ sphinx_version }}</a> &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster {{ alabaster_version }}</a> &amp; <a href="https://github.com/bgeron/sphinxience">Sphinxience {{ sphinxience_version }}</a> {% endif %} {%- if show_source and has_source and sourcename %} {% if show_copyright or theme_show_powered_by %}|{% endif %} <a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow">{{ _('Page source') }}</a> {%- endif %} </div> {% if theme_github_banner|lower != 'false' %} <a href="https://github.com/{{ theme_github_user }}/{{ theme_github_repo }}" class="github"> <img style="position: absolute; top: 0; right: 0; border: 0;" src="{{ pathto('_static/' ~ theme_github_banner, 1) if theme_github_banner|lower != 'true' else 'https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png' }}" alt="Fork me on GitHub" class="github"/> </a> {% endif %} {% if theme_analytics_id %} <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', '{{ theme_analytics_id }}']); _gaq.push(['_setDomainName', 'none']); _gaq.push(['_setAllowLinker', true]); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> {% endif %} {%- endblock %} PK�������!�AM`��`�����sphinxience/skip.pyr""" Skip directive. Adds a bit of vertical space. Usage: .. skip:: big This adds a \bigskip in the LaTeX, and a vertical space in the HTML. For HTML standards, the space is not very big. It is not possible to give a custom skip size. But of course, you can make your own tweaks to this file of Sphinxience. Maybe even send in a pull request if you think it will be popular! The current skip sizes are as follows: - ``para``: Paragraph break in LaTeX (two newlines), nothing in HTML. - ``paramed``: Paragraph break + ``\medskip`` in LaTeX, nothing in HTML. - ``big``: Paragraph break + ``\bigskip`` in LaTeX, a similar amount in HTML. - ``xxlarge``: An absurdly large skip in both LaTeX and HTML. Can be useful for visually separating parts of your notes. - ``forceabovedisplaysmallskip``: When used between a paragraph and display math, forcibly turns a ``\abovedisplayskip`` into a ``\abovedisplayshortskip``. Note that the Sphinx LaTeX writer does already insert paragraph breaks between paragraphs. It does not insert paragraph breaks in certain other situations, like a math display following a paragraph, or a paragraph following a math display. So the combination (paragraph + math display + paragraph) will come out in LaTeX as one paragraph, as if you wrote ``paragraph1\[math\]paragraph2``. """ from docutils import nodes from docutils.parsers.rst import Directive import docutils.parsers.rst.directives as directives from sphinx.errors import SphinxError def setup(app): app.add_node(skip, html=(visit_skip_html, depart_skip_html), latex=(visit_skip_tex, depart_skip_tex)) app.add_directive('skip', SkipDirective) return { 'version': "0.1", 'parallel_read_safe': True, 'parallel_write_safe': True, } class skip(nodes.General, nodes.Element): pass class SkipError(SphinxError): pass class SkipDirective(Directive): has_content = True option_spec = {} def run(self): if self.content.data == []: raise self.error("missing skip size") elif not isinstance(self.content.data, list) or len(self.content.data) != 1: raise self.error("skip size decl not recognised: " + repr(self.content.data)) size = self.content.data[0] if size in ALLOWEDSIZES: return [skip(size=size)] else: raise self.error("skip size not recognised: " + repr(size)) ALLOWEDSIZES = ['para', 'paramed', 'big', 'xxlarge', 'forceabovedisplaysmallskip'] def visit_skip_tex(self, node): if node['size'] == 'para': self.body.append("\n\n") elif node['size'] == 'paramed': self.body.append("\n\n\\medskip\n\n") elif node['size'] == 'big': self.body.append("\n\n\\bigskip\n\n") elif node['size'] == 'xxlarge': self.body.append("\n\n\\vfill\n\n") elif node['size'] == 'forceabovedisplaysmallskip': self.body.append(r'\vspace{\abovedisplayshortskip}\vspace{-\abovedisplayskip}') else: raise SkipError("cannot render skip size %r to latex" % (node['size'],)) def depart_skip_tex(self, node): pass def visit_skip_html(self, node): if node['size'] in ['para', 'paramed', 'forceabovedisplaysmallskip']: pass # not necessary in HTML elif node['size'] in ['big', 'xxlarge']: self.body.append( self.starttag(node, 'div', **{'class': 'sphinxience-skip-%s' % (node['size'],)})) self.body.append("</div>") else: raise SkipError("cannot render skip size %s to HTML" % (node['size'],)) def depart_skip_html(self, node): pass PK�������!�|CZ��Z��0���sphinxience/static/collapse-details-polyfill.css/* from the polyfill at http://mathiasbynens.be/notes/html5-details-jquery */ details { display: block; border: 1px #666; border-style: none none none solid; border-radius: .4em; margin: .4em 0em; padding: .2em .3em; } /* The grey button you can click to open/close the directive in HTML. */ summary { padding: .2em; margin: .1em 0em; display: block; color: #333; font-size: smaller; background-color: #ddd; border: thin solid #bbb; border-radius: .2em; } /* Apply a pointer cursor and style the background upon hover to indicate <summary> is a clickable element. */ /* These styles can be applied regardless of whether the fallback is needed */ summary { cursor: pointer; } summary:hover, summary:focus { background: #ccc; } /* The following styles are not really needed, since the jQuery script takes care of hiding/displaying the elements. */ /* However, we’re still gonna use CSS as well to prevent FOUC in browsers that understand these selectors. */ /* Remember: by default (and probably most of the time), the contents of the <details> element are hidden. */ .no-details details > * { display: none; } /* And yes, it should really be ::before, but that doesn’t work in IE8 */ .no-details details > summary:before { float: left; width: 20px; content: '► '; } .no-details details.open > summary:before { content: '▼ '; } /* Make sure summary remains visible */ .no-details details summary { display: block; } /* Make sure that list bullets fall inside the collapse-box, not outside */ details > ul, details > ol, details > div > ul, details > div > ol { padding-left: 40px; } PK�������!�Uհ������/���sphinxience/static/collapse-details-polyfill.jsjQuery(document).ready(function () { jQuery("details").details(); jQuery('html').addClass(jQuery.fn.details.support ? 'details' : 'no-details'); });PK�������!�AvNH����(���sphinxience/static/jquery.details.min.js/*! http://mths.be/details v0.1.0 by @mathias | includes http://mths.be/noselect v1.0.3 */ ;(function(a,f){var e=f.fn,d,c=Object.prototype.toString.call(window.opera)=='[object Opera]',g=(function(l){var j=l.createElement('details'),i,h,k;if(!('open' in j)){return false}h=l.body||(function(){var m=l.documentElement;i=true;return m.insertBefore(l.createElement('body'),m.firstElementChild||m.firstChild)}());j.innerHTML='<summary>a</summary>b';j.style.display='block';h.appendChild(j);k=j.offsetHeight;j.open=true;k=k!=j.offsetHeight;h.removeChild(j);if(i){h.parentNode.removeChild(h)}return k}(a)),b=function(i,l,k,h){var j=i.prop('open'),m=j&&h||!j&&!h;if(m){i.removeClass('open').prop('open',false).triggerHandler('close.details');l.attr('aria-expanded',false);k.hide()}else{i.addClass('open').prop('open',true).triggerHandler('open.details');l.attr('aria-expanded',true);k.show()}};e.noSelect=function(){var h='none';return this.bind('selectstart dragstart mousedown',function(){return false}).css({MozUserSelect:h,msUserSelect:h,webkitUserSelect:h,userSelect:h})};if(g){d=e.details=function(){return this.each(function(){var i=f(this),h=f('summary',i).first();h.attr({role:'button','aria-expanded':i.prop('open')}).on('click',function(){var j=i.prop('open');h.attr('aria-expanded',!j);i.triggerHandler((j?'close':'open')+'.details')})})};d.support=g}else{d=e.details=function(){return this.each(function(){var h=f(this),j=f('summary',h).first(),i=h.children(':not(summary)'),k=h.contents(':not(summary)');if(!j.length){j=f('<summary>').text('Details').prependTo(h)}if(i.length!=k.length){k.filter(function(){return this.nodeType==3&&/[^ \t\n\f\r]/.test(this.data)}).wrap('<span>');i=h.children(':not(summary)')}h.prop('open',typeof h.attr('open')=='string');b(h,j,i);j.attr('role','button').noSelect().prop('tabIndex',0).on('click',function(){j.focus();b(h,j,i,true)}).keyup(function(l){if(32==l.keyCode||(13==l.keyCode&&!c)){l.preventDefault();j.click()}})})};d.support=g}}(document,jQuery));PK�������!�5����"���sphinxience/static/sphinxience.css@import url("alabaster.css"); div.sphinxience-skip-big { height: .5rem; margin: 1rem 0rem; } div.sphinxience-skip-xxlarge { height: 50rem; /* Flexbox properties */ display: flex; flex-direction: column; justify-content: space-between; } div.sphinxience-skip-xxlarge:before, div.sphinxience-skip-xxlarge::after { content: "- space intentionally left blank -"; color: #888; font-variant: small-caps; margin: 2rem 0; text-align: center; }PK�������!�X@kY��Y��/���sphinxience/templates/sphinxience-article.cls_t\NeedsTeXFormat{LaTeX2e} \ProvidesClass{sphinxience-article}[{{ sphinxience_version_date_latex }} Sphinxience {{ sphinxience_version }}] {% raw %} % Pass all options to the 'article' class \DeclareOption*{% \PassOptionsToClass{\CurrentOption}{article}% } \ProcessOptions\relax \LoadClass{article} \RequirePackage{sphinxience} {% endraw %}PK�������!�o߾����'���sphinxience/templates/sphinxience.sty_t% ----- Some things taken from sphinx.sty, then ----- % ----- some things taken from sphinxhowto.cls, then ----- % ----- some additions from sphienxience. Meant to ----- % ----- replace sphinx.sty. ----- % % sphinx.sty was originally adapted from the old % python.sty, mostly written by Fred Drake, by Georg Brandl. % \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesPackage{sphinxience}[{{ sphinxience_version_date_latex }} Sphinxience {{ sphinxience_version }}] {% raw %} % provides \ltx@ifundefined % (many packages load ltxcmds: graphicx does for pdftex and lualatex but % not xelatex, and anyhow kvoptions does, but it may be needed in future to % use \sphinxdeprecationwarning earlier, and it needs \ltx@ifundefined) \RequirePackage{ltxcmds} \newcommand{\sphinxtableofcontents}{\tableofcontents} \newcommand\release[1]{} \newcommand\releasename{} %% for deprecation warnings \newcommand\sphinxdeprecationwarning[4]{% #1 the deprecated macro or name, % #2 = when deprecated, #3 = when removed, #4 = additional info \edef\spx@tempa{\detokenize{#1}}% \ltx@ifundefined{sphinx_depr_\spx@tempa}{% \global\expandafter\let\csname sphinx_depr_\spx@tempa\endcsname\spx@tempa \expandafter\AtEndDocument\expandafter{\expandafter\let\expandafter \sphinxdeprecatedmacro\csname sphinx_depr_\spx@tempa\endcsname \PackageWarningNoLine{sphinx}{^^J**** SPHINX DEPRECATION WARNING:^^J \sphinxdeprecatedmacro^^J \@spaces- is deprecated at Sphinx #2^^J \@spaces- and removed at Sphinx #3.^^J #4^^J****}}% }{% warning already emitted (at end of latex log), don't repeat }} \usepackage{ifthen,framed,fancybox,color,makeidx} % For highlighted code. \RequirePackage{fancyvrb} \fvset{fontsize=\small} \define@key{FV}{hllines}{\def\sphinx@verbatim@checkifhl##1{\in@{, ##1,}{#1}}} % For hyperlinked footnotes in tables; also for gathering footnotes from % topic and warning blocks. Also to allow code-blocks in footnotes. \RequirePackage{footnotehyper-sphinx} % For the H specifier. Do not \restylefloat{figure}, it breaks Sphinx code % for allowing figures in tables. \RequirePackage{float} % For floating figures in the text. Better to load after float. \RequirePackage{wrapfig} % Separate paragraphs by space by default. % % In Sphinxience we don't do shit, because it does not work well % together with amsthm. % % \RequirePackage{parskip} % % For parsed-literal blocks. \RequirePackage{alltt} % Display "real" single quotes in literal blocks. \RequirePackage{upquote} \ifx\@jsc@uplatextrue\@undefined\else \PassOptionsToPackage{setpagesize=false}{hyperref} \fi % Redefine these colors to your liking in the preamble. \definecolor{TitleColor}{rgb}{0.126,0.263,0.361} \definecolor{InnerLinkColor}{rgb}{0.208,0.374,0.486} \definecolor{OuterLinkColor}{rgb}{0.216,0.439,0.388} % Redefine these colors to something if you want to have colored % background and border for code examples. \definecolor{VerbatimColor}{rgb}{1,1,1} \definecolor{VerbatimBorderColor}{rgb}{1,1,1} % stylesheet for highlighting with pygments \RequirePackage{sphinxhighlight} % fix baseline increase from Pygments latex formatter in case of error tokens % and keep \fboxsep's scope local via added braces \def\PYG@tok@err{% \def\PYG@bc##1{{\setlength{\fboxsep}{-\fboxrule}% \fcolorbox[rgb]{1.00,0.00,0.00}{1,1,1}{\strut ##1}}}% } \def\PYG@tok@cs{% \def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}% \def\PYG@bc##1{{\setlength{\fboxsep}{0pt}% \colorbox[rgb]{1.00,0.94,0.94}{\strut ##1}}}% }% %% OPTIONS % % Handle options via "kvoptions" (later loaded by hyperref anyhow) \RequirePackage{kvoptions} \SetupKeyvalOptions{prefix=spx@opt@} % use \spx@opt@ prefix % Sphinx legacy text layout: 1in margins on all four sides \ifx\@jsc@uplatextrue\@undefined \DeclareStringOption[1in]{hmargin} \DeclareStringOption[1in]{vmargin} \DeclareStringOption[.5in]{marginpar} \else % Japanese standard document classes handle \mag in a special way \DeclareStringOption[\inv@mag in]{hmargin} \DeclareStringOption[\inv@mag in]{vmargin} \DeclareStringOption[.5\dimexpr\inv@mag in\relax]{marginpar} \fi \DeclareStringOption[0]{maxlistdepth}% \newcommand*\spx@opt@maxlistdepth{0} \DeclareStringOption[-1]{numfigreset} \DeclareBoolOption[false]{nonumfigreset} \DeclareBoolOption[false]{mathnumfig} % \DeclareBoolOption[false]{usespart}% not used % dimensions, we declare the \dimen registers here. \newdimen\sphinxverbatimsep \newdimen\sphinxverbatimborder \newdimen\sphinxshadowsep \newdimen\sphinxshadowsize \newdimen\sphinxshadowrule % \DeclareStringOption is not convenient for the handling of these dimensions % because we want to assign the values to the corresponding registers. Even if % we added the code to the key handler it would be too late for the initial % set-up and we would need to do initial assignments explicitely. We end up % using \define@key directly. % verbatim \sphinxverbatimsep=\fboxsep \define@key{sphinx}{verbatimsep}{\sphinxverbatimsep\dimexpr #1\relax} \sphinxverbatimborder=\fboxrule \define@key{sphinx}{verbatimborder}{\sphinxverbatimborder\dimexpr #1\relax} % topic boxes \sphinxshadowsep =5pt \define@key{sphinx}{shadowsep}{\sphinxshadowsep\dimexpr #1\relax} \sphinxshadowsize=4pt \define@key{sphinx}{shadowsize}{\sphinxshadowsize\dimexpr #1\relax} \sphinxshadowrule=\fboxrule \define@key{sphinx}{shadowrule}{\sphinxshadowrule\dimexpr #1\relax} % verbatim \DeclareBoolOption[true]{verbatimwithframe} \DeclareBoolOption[true]{verbatimwrapslines} \DeclareBoolOption[true]{verbatimhintsturnover} \DeclareBoolOption[true]{inlineliteralwraps} \DeclareStringOption[t]{literalblockcappos} \DeclareStringOption[r]{verbatimcontinuedalign} \DeclareStringOption[r]{verbatimcontinuesalign} % parsed literal \DeclareBoolOption[true]{parsedliteralwraps} % \textvisiblespace for compatibility with fontspec+XeTeX/LuaTeX \DeclareStringOption[\textcolor{red}{\textvisiblespace}]{verbatimvisiblespace} \DeclareStringOption % must use braces to hide the brackets [{\makebox[2\fontcharwd\font`\x][r]{\textcolor{red}{\tiny$\m@th\hookrightarrow$}}}]% {verbatimcontinued} % notices/admonitions % the dimensions for notices/admonitions are kept as macros and assigned to % \spx@notice@border at time of use, hence \DeclareStringOption is ok for this \newdimen\spx@notice@border \DeclareStringOption[0.5pt]{noteborder} \DeclareStringOption[0.5pt]{hintborder} \DeclareStringOption[0.5pt]{importantborder} \DeclareStringOption[0.5pt]{tipborder} \DeclareStringOption[1pt]{warningborder} \DeclareStringOption[1pt]{cautionborder} \DeclareStringOption[1pt]{attentionborder} \DeclareStringOption[1pt]{dangerborder} \DeclareStringOption[1pt]{errorborder} % footnotes \DeclareStringOption[\mbox{ }]{AtStartFootnote} % we need a public macro name for direct use in latex file \newcommand*{\sphinxAtStartFootnote}{\spx@opt@AtStartFootnote} % no such need for this one, as it is used inside other macros \DeclareStringOption[\leavevmode\unskip]{BeforeFootnote} % some font styling. \DeclareStringOption[\sffamily\bfseries]{HeaderFamily} % colours % same problems as for dimensions: we want the key handler to use \definecolor. % first, some colours with no prefix, for backwards compatibility \newcommand*{\sphinxDeclareColorOption}[2]{% \definecolor{#1}#2% \define@key{sphinx}{#1}{\definecolor{#1}##1}% }% \sphinxDeclareColorOption{TitleColor}{{rgb}{0.126,0.263,0.361}} \sphinxDeclareColorOption{InnerLinkColor}{{rgb}{0.208,0.374,0.486}} \sphinxDeclareColorOption{OuterLinkColor}{{rgb}{0.216,0.439,0.388}} \sphinxDeclareColorOption{VerbatimColor}{{rgb}{1,1,1}} \sphinxDeclareColorOption{VerbatimBorderColor}{{rgb}{0,0,0}} % now the colours defined with "sphinx" prefix in their names \newcommand*{\sphinxDeclareSphinxColorOption}[2]{% % set the initial default \definecolor{sphinx#1}#2% % set the key handler. The "value" ##1 must be acceptable by \definecolor. \define@key{sphinx}{#1}{\definecolor{sphinx#1}##1}% }% % Default color chosen to be as in minted.sty LaTeX package! \sphinxDeclareSphinxColorOption{VerbatimHighlightColor}{{rgb}{0.878,1,1}} % admonition boxes, "light" style \sphinxDeclareSphinxColorOption{noteBorderColor}{{rgb}{0,0,0}} \sphinxDeclareSphinxColorOption{hintBorderColor}{{rgb}{0,0,0}} \sphinxDeclareSphinxColorOption{importantBorderColor}{{rgb}{0,0,0}} \sphinxDeclareSphinxColorOption{tipBorderColor}{{rgb}{0,0,0}} % admonition boxes, "heavy" style \sphinxDeclareSphinxColorOption{warningBorderColor}{{rgb}{0,0,0}} \sphinxDeclareSphinxColorOption{cautionBorderColor}{{rgb}{0,0,0}} \sphinxDeclareSphinxColorOption{attentionBorderColor}{{rgb}{0,0,0}} \sphinxDeclareSphinxColorOption{dangerBorderColor}{{rgb}{0,0,0}} \sphinxDeclareSphinxColorOption{errorBorderColor}{{rgb}{0,0,0}} \sphinxDeclareSphinxColorOption{warningBgColor}{{rgb}{1,1,1}} \sphinxDeclareSphinxColorOption{cautionBgColor}{{rgb}{1,1,1}} \sphinxDeclareSphinxColorOption{attentionBgColor}{{rgb}{1,1,1}} \sphinxDeclareSphinxColorOption{dangerBgColor}{{rgb}{1,1,1}} \sphinxDeclareSphinxColorOption{errorBgColor}{{rgb}{1,1,1}} \DeclareDefaultOption{\@unknownoptionerror} \ProcessKeyvalOptions* % don't allow use of maxlistdepth via \sphinxsetup. \DisableKeyvalOption{sphinx}{maxlistdepth} \DisableKeyvalOption{sphinx}{numfigreset} \DisableKeyvalOption{sphinx}{nonumfigreset} \DisableKeyvalOption{sphinx}{mathnumfig} % user interface: options can be changed midway in a document! \newcommand\sphinxsetup[1]{\setkeys{sphinx}{#1}} %% LITERAL BLOCKS % % Based on use of "fancyvrb.sty"'s Verbatim. % - with framing allowing page breaks ("framed.sty") % - with breaking of long lines (exploits Pygments mark-up), % - with possibly of a top caption, non-separable by pagebreak. % - and usable inside tables or footnotes ("footnotehyper-sphinx"). % For extensions which use \OriginalVerbatim and compatibility with Sphinx < % 1.5, we define and use these when (unmodified) Verbatim will be needed. But % Sphinx >= 1.5 does not modify the \Verbatim macro anymore. \let\OriginalVerbatim \Verbatim \let\endOriginalVerbatim\endVerbatim % for captions of literal blocks % at start of caption title \newcommand*{\fnum@literalblock}{\literalblockname\nobreakspace\theliteralblock} % this will be overwritten in document preamble by Babel translation \newcommand*{\literalblockname}{Listing } % file extension needed for \caption's good functioning, the file is created % only if a \listof{literalblock}{foo} command is encountered, which is % analogous to \listoffigures, but for the code listings (foo = chosen title.) \newcommand*{\ext@literalblock}{lol} \newif\ifspx@inframed % flag set if we are already in a framed environment % if forced use of minipage encapsulation is needed (e.g. table cells) \newif\ifsphinxverbatimwithminipage \sphinxverbatimwithminipagefalse % Framing macro for use with framed.sty's \FrameCommand % - it obeys current indentation, % - frame is \fboxsep separated from the contents, % - the contents use the full available text width, % - #1 = color of frame, #2 = color of background, % - #3 = above frame, #4 = below frame, #5 = within frame, % - #3 and #4 must be already typeset boxes; they must issue \normalcolor % or similar, else, they are under scope of color #1 \long\def\spx@fcolorbox #1#2#3#4#5{% \hskip\@totalleftmargin \hskip-\fboxsep\hskip-\fboxrule % use of \color@b@x here is compatible with both xcolor.sty and color.sty \color@b@x {\color{#1}\spx@CustomFBox{#3}{#4}}{\color{#2}}{#5}% \hskip-\fboxsep\hskip-\fboxrule \hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth }% % #1 = for material above frame, such as a caption or a "continued" hint % #2 = for material below frame, such as a caption or "continues on next page" % #3 = actual contents, which will be typeset with a background color \long\def\spx@CustomFBox#1#2#3{% \begingroup \setbox\@tempboxa\hbox{{#3}}% inner braces to avoid color leaks \vbox{#1% above frame % draw frame border _latest_ to avoid pdf viewer issue \kern\fboxrule \hbox{\kern\fboxrule \copy\@tempboxa \kern-\wd\@tempboxa\kern-\fboxrule \vrule\@width\fboxrule \kern\wd\@tempboxa \vrule\@width\fboxrule}% \kern-\dimexpr\ht\@tempboxa+\dp\@tempboxa+\fboxrule\relax \hrule\@height\fboxrule \kern\dimexpr\ht\@tempboxa+\dp\@tempboxa\relax \hrule\@height\fboxrule #2% below frame }% \endgroup }% \def\spx@fcolorbox@put@c#1{% hide width from framed.sty measuring \moveright\dimexpr\fboxrule+.5\wd\@tempboxa\hb@xt@\z@{\hss#1\hss}% }% \def\spx@fcolorbox@put@r#1{% right align with contents, width hidden \moveright\dimexpr\fboxrule+\wd\@tempboxa-\fboxsep\hb@xt@\z@{\hss#1}% }% \def\spx@fcolorbox@put@l#1{% left align with contents, width hidden \moveright\dimexpr\fboxrule+\fboxsep\hb@xt@\z@{#1\hss}% }% % \def\sphinxVerbatim@Continued {\csname spx@fcolorbox@put@\spx@opt@verbatimcontinuedalign\endcsname {\normalcolor\sphinxstylecodecontinued\literalblockcontinuedname}}% \def\sphinxVerbatim@Continues {\csname spx@fcolorbox@put@\spx@opt@verbatimcontinuesalign\endcsname {\normalcolor\sphinxstylecodecontinues\literalblockcontinuesname}}% \def\sphinxVerbatim@Title {\spx@fcolorbox@put@c{\unhcopy\sphinxVerbatim@TitleBox}}% \let\sphinxVerbatim@Before\@empty \let\sphinxVerbatim@After\@empty % Defaults are redefined in document preamble according to language \newcommand*\literalblockcontinuedname{continued from previous page}% \newcommand*\literalblockcontinuesname{continues on next page}% % \def\spx@verbatimfcolorbox{\spx@fcolorbox{VerbatimBorderColor}{VerbatimColor}}% \def\sphinxVerbatim@FrameCommand {\spx@verbatimfcolorbox\sphinxVerbatim@Before\sphinxVerbatim@After}% \def\sphinxVerbatim@FirstFrameCommand {\spx@verbatimfcolorbox\sphinxVerbatim@Before\sphinxVerbatim@Continues}% \def\sphinxVerbatim@MidFrameCommand {\spx@verbatimfcolorbox\sphinxVerbatim@Continued\sphinxVerbatim@Continues}% \def\sphinxVerbatim@LastFrameCommand {\spx@verbatimfcolorbox\sphinxVerbatim@Continued\sphinxVerbatim@After}% % For linebreaks inside Verbatim environment from package fancyvrb. \newbox\sphinxcontinuationbox \newbox\sphinxvisiblespacebox \newcommand*\sphinxafterbreak {\copy\sphinxcontinuationbox} % Take advantage of the already applied Pygments mark-up to insert % potential linebreaks for TeX processing. % {, <, #, %, $, ' and ": go to next line. % _, }, ^, &, >, - and ~: stay at end of broken line. % Use of \textquotesingle for straight quote. % FIXME: convert this to package options ? \newcommand*\sphinxbreaksbeforelist {% \do\PYGZob\{\do\PYGZlt\<\do\PYGZsh\#\do\PYGZpc\%% {, <, #, %, \do\PYGZdl\$\do\PYGZdq\"% $, " \def\PYGZsq {\discretionary{}{\sphinxafterbreak\textquotesingle}{\textquotesingle}}% ' } \newcommand*\sphinxbreaksafterlist {% \do\PYGZus\_\do\PYGZcb\}\do\PYGZca\^\do\PYGZam\&% _, }, ^, &, \do\PYGZgt\>\do\PYGZhy\-\do\PYGZti\~% >, -, ~ } \newcommand*\sphinxbreaksatspecials {% \def\do##1##2% {\def##1{\discretionary{}{\sphinxafterbreak\char`##2}{\char`##2}}}% \sphinxbreaksbeforelist \def\do##1##2% {\def##1{\discretionary{\char`##2}{\sphinxafterbreak}{\char`##2}}}% \sphinxbreaksafterlist } \def\sphinx@verbatim@nolig@list {\do \`}% % Some characters . , ; ? ! / are not pygmentized. % This macro makes them "active" and they will insert potential linebreaks. % Not compatible with math mode (cf \sphinxunactivateextras). \newcommand*\sphinxbreaksbeforeactivelist {}% none \newcommand*\sphinxbreaksafteractivelist {\do\.\do\,\do\;\do\?\do\!\do\/} \newcommand*\sphinxbreaksviaactive {% \def\do##1{\lccode`\~`##1% \lowercase{\def~}{\discretionary{}{\sphinxafterbreak\char`##1}{\char`##1}}% \catcode`##1\active}% \sphinxbreaksbeforeactivelist \def\do##1{\lccode`\~`##1% \lowercase{\def~}{\discretionary{\char`##1}{\sphinxafterbreak}{\char`##1}}% \catcode`##1\active}% \sphinxbreaksafteractivelist \lccode`\~`\~ } % If the linebreak is at a space, the latter will be displayed as visible % space at end of first line, and a continuation symbol starts next line. \def\spx@verbatim@space {% \nobreak\hskip\z@skip \discretionary{\copy\sphinxvisiblespacebox}{\sphinxafterbreak} {\kern\fontdimen2\font}% }% % if the available space on page is less than \literalblockneedspace, insert pagebreak \newcommand{\sphinxliteralblockneedspace}{5\baselineskip} \newcommand{\sphinxliteralblockwithoutcaptionneedspace}{1.5\baselineskip} % The title (caption) is specified from outside as macro \sphinxVerbatimTitle. % \sphinxVerbatimTitle is reset to empty after each use of Verbatim. \newcommand*\sphinxVerbatimTitle {} % This box to typeset the caption before framed.sty multiple passes for framing. \newbox\sphinxVerbatim@TitleBox % This is a workaround to a "feature" of French lists, when literal block % follows immediately; usable generally (does only \par then), a priori... \newcommand*\sphinxvspacefixafterfrenchlists{% \ifvmode\ifdim\lastskip<\z@ \vskip\parskip\fi\else\par\fi } % Holder macro for labels of literal blocks. Set-up by LaTeX writer. \newcommand*\sphinxLiteralBlockLabel {} \newcommand*\sphinxSetupCaptionForVerbatim [1] {% \sphinxvspacefixafterfrenchlists \needspace{\sphinxliteralblockneedspace}% % insert a \label via \sphinxLiteralBlockLabel % reset to normal the color for the literal block caption \def\sphinxVerbatimTitle {\py@NormalColor\sphinxcaption{\sphinxLiteralBlockLabel #1}}% } \newcommand*\sphinxSetupCodeBlockInFootnote {% \fvset{fontsize=\footnotesize}\let\caption\sphinxfigcaption \sphinxverbatimwithminipagetrue % reduces vertical spaces % we counteract (this is in a group) the \@normalsize from \caption \let\normalsize\footnotesize\let\@parboxrestore\relax \def\spx@abovecaptionskip{\sphinxverbatimsmallskipamount}% } % needed to create wrapper environments of fancyvrb's Verbatim \newcommand*{\sphinxVerbatimEnvironment}{\gdef\FV@EnvironName{sphinxVerbatim}} \newcommand*{\sphinxverbatimsmallskipamount}{\smallskipamount} % serves to implement line highlighting and line wrapping \newcommand\sphinxFancyVerbFormatLine[1]{% \expandafter\sphinx@verbatim@checkifhl\expandafter{\the\FV@CodeLineNo}% \ifin@ \sphinxVerbatimHighlightLine{#1}% \else \sphinxVerbatimFormatLine{#1}% \fi }% \newcommand\sphinxVerbatimHighlightLine[1]{% \edef\sphinxrestorefboxsep{\fboxsep\the\fboxsep\relax}% \fboxsep0pt\relax % cf LaTeX bug graphics/4524 \colorbox{sphinxVerbatimHighlightColor}% {\sphinxrestorefboxsep\sphinxVerbatimFormatLine{#1}}% % no need to restore \fboxsep here, as this ends up in a \hbox from fancyvrb }% % \sphinxVerbatimFormatLine will be set locally to one of those two: \newcommand\sphinxVerbatimFormatLineWrap[1]{% \hsize\linewidth \vtop{\raggedright\hyphenpenalty\z@\exhyphenpenalty\z@ \doublehyphendemerits\z@\finalhyphendemerits\z@ \strut #1\strut}% }% \newcommand\sphinxVerbatimFormatLineNoWrap[1]{\hb@xt@\linewidth{\strut #1\hss}}% \g@addto@macro\FV@SetupFont{% \sbox\sphinxcontinuationbox {\spx@opt@verbatimcontinued}% \sbox\sphinxvisiblespacebox {\spx@opt@verbatimvisiblespace}% }% \newenvironment{sphinxVerbatim}{% % first, let's check if there is a caption \ifx\sphinxVerbatimTitle\empty \sphinxvspacefixafterfrenchlists \parskip\z@skip \vskip\sphinxverbatimsmallskipamount % there was no caption. Check if nevertheless a label was set. \ifx\sphinxLiteralBlockLabel\empty\else % we require some space to be sure hyperlink target from \phantomsection % will not be separated from upcoming verbatim by a page break \needspace{\sphinxliteralblockwithoutcaptionneedspace}% \phantomsection\sphinxLiteralBlockLabel \fi \else \parskip\z@skip \if t\spx@opt@literalblockcappos \vskip\spx@abovecaptionskip \def\sphinxVerbatim@Before {\sphinxVerbatim@Title\nointerlineskip \kern\dimexpr-\dp\strutbox+\sphinxbelowcaptionspace\relax}% \else \vskip\sphinxverbatimsmallskipamount \def\sphinxVerbatim@After {\nointerlineskip\kern\dp\strutbox\sphinxVerbatim@Title}% \fi \def\@captype{literalblock}% \capstart % \sphinxVerbatimTitle must reset color \setbox\sphinxVerbatim@TitleBox \hbox{\begin{minipage}{\linewidth}% \sphinxVerbatimTitle \end{minipage}}% \fi \global\let\sphinxLiteralBlockLabel\empty \global\let\sphinxVerbatimTitle\empty \fboxsep\sphinxverbatimsep \fboxrule\sphinxverbatimborder \ifspx@opt@verbatimwithframe\else\fboxrule\z@\fi \let\FrameCommand \sphinxVerbatim@FrameCommand \let\FirstFrameCommand\sphinxVerbatim@FirstFrameCommand \let\MidFrameCommand \sphinxVerbatim@MidFrameCommand \let\LastFrameCommand \sphinxVerbatim@LastFrameCommand \ifspx@opt@verbatimhintsturnover\else \let\sphinxVerbatim@Continued\@empty \let\sphinxVerbatim@Continues\@empty \fi \ifspx@opt@verbatimwrapslines % fancyvrb's Verbatim puts each input line in (unbreakable) horizontal boxes. % This customization wraps each line from the input in a \vtop, thus % allowing it to wrap and display on two or more lines in the latex output. % - The codeline counter will be increased only once. % - The wrapped material will not break across pages, it is impossible % to achieve this without extensive rewrite of fancyvrb. % - The (not used in sphinx) obeytabs option to Verbatim is % broken by this change (showtabs and tabspace work). \let\sphinxVerbatimFormatLine\sphinxVerbatimFormatLineWrap \let\FV@Space\spx@verbatim@space % Allow breaks at special characters using \PYG... macros. \sphinxbreaksatspecials % Breaks at punctuation characters . , ; ? ! and / (needs catcode activation) \fvset{codes*=\sphinxbreaksviaactive}% \else % end of conditional code for wrapping long code lines \let\sphinxVerbatimFormatLine\sphinxVerbatimFormatLineNoWrap \fi \let\FancyVerbFormatLine\sphinxFancyVerbFormatLine % workaround to fancyvrb's check of \@currenvir \let\VerbatimEnvironment\sphinxVerbatimEnvironment % workaround to fancyvrb's check of current list depth \def\@toodeep {\advance\@listdepth\@ne}% % The list environment is needed to control perfectly the vertical space. % Note: \OuterFrameSep used by framed.sty is later set to \topsep hence 0pt. % - if caption: distance from last text baseline to caption baseline is % A+(B-F)+\ht\strutbox, A = \abovecaptionskip (default 10pt), B = % \baselineskip, F is the framed.sty \FrameHeightAdjust macro, default 6pt. % Formula valid for F < 10pt. % - distance of baseline of caption to top of frame is like for tables: % \sphinxbelowcaptionspace (=0.5\baselineskip) % - if no caption: distance of last text baseline to code frame is S+(B-F), % with S = \sphinxverbatimtopskip (=\smallskip) % - and distance from bottom of frame to next text baseline is % \baselineskip+\parskip. % The \trivlist is used to avoid possible "too deeply nested" error. \itemsep \z@skip \topsep \z@skip \partopsep \z@skip % trivlist will set \parsep to \parskip = zero % \leftmargin will be set to zero by trivlist \rightmargin\z@ \parindent \z@% becomes \itemindent. Default zero, but perhaps overwritten. \trivlist\item\relax \ifsphinxverbatimwithminipage\spx@inframedtrue\fi % use a minipage if we are already inside a framed environment \ifspx@inframed\noindent\begin{minipage}{\linewidth}\fi \MakeFramed {% adapted over from framed.sty's snugshade environment \advance\hsize-\width\@totalleftmargin\z@\linewidth\hsize\@setminipage }% % For grid placement from \strut's in \FancyVerbFormatLine \lineskip\z@skip % active comma should not be overwritten by \@noligs \ifspx@opt@verbatimwrapslines \let\verbatim@nolig@list \sphinx@verbatim@nolig@list \fi % will fetch its optional arguments if any \OriginalVerbatim } {% \endOriginalVerbatim \par\unskip\@minipagefalse\endMakeFramed % from framed.sty snugshade \ifspx@inframed\end{minipage}\fi \endtrivlist } \newenvironment {sphinxVerbatimNoFrame} {\spx@opt@verbatimwithframefalse % needed for fancyvrb as literal code will end in \end{sphinxVerbatimNoFrame} \def\sphinxVerbatimEnvironment{\gdef\FV@EnvironName{sphinxVerbatimNoFrame}}% \begin{sphinxVerbatim}} {\end{sphinxVerbatim}} \newenvironment {sphinxVerbatimintable} {% don't use a frame if in a table cell \spx@opt@verbatimwithframefalse \sphinxverbatimwithminipagetrue % the literal block caption uses \sphinxcaption which is wrapper of \caption, % but \caption must be modified because longtable redefines it to work only % for the own table caption, and tabulary has multiple passes \let\caption\sphinxfigcaption % reduce above caption skip \def\spx@abovecaptionskip{\sphinxverbatimsmallskipamount}% \def\sphinxVerbatimEnvironment{\gdef\FV@EnvironName{sphinxVerbatimintable}}% \begin{sphinxVerbatim}} {\end{sphinxVerbatim}} %% PARSED LITERALS % allow long lines to wrap like they do in code-blocks % this should be kept in sync with definitions in sphinx.util.texescape \newcommand*\sphinxbreaksattexescapedchars{% \def\do##1##2% put potential break point before character {\def##1{\discretionary{}{\sphinxafterbreak\char`##2}{\char`##2}}}% \do\{\{\do\textless\<\do\#\#\do\%\%\do\$\$% {, <, #, %, $ \def\do##1##2% put potential break point after character {\def##1{\discretionary{\char`##2}{\sphinxafterbreak}{\char`##2}}}% \do\_\_\do\}\}\do\textasciicircum\^\do\&\&% _, }, ^, &, \do\textgreater\>\do\textasciitilde\~% >, ~ } \newcommand*\sphinxbreaksviaactiveinparsedliteral{% \sphinxbreaksviaactive % by default handles . , ; ? ! / \do\-% we need also the hyphen character (ends up "as is" in parsed-literal) \lccode`\~`\~ % % update \dospecials as it is used by \url % but deactivation will already have been done hence this is unneeded: % \expandafter\def\expandafter\dospecials\expandafter{\dospecials % \sphinxbreaksbeforeactivelist\sphinxbreaksafteractivelist\do\-}% } \newcommand*\sphinxbreaksatspaceinparsedliteral{% \lccode`~32 \lowercase{\let~}\spx@verbatim@space\lccode`\~`\~ } \newcommand*{\sphinxunactivateextras}{\let\do\@makeother \sphinxbreaksbeforeactivelist\sphinxbreaksafteractivelist\do\-}% % the \catcode13=5\relax (deactivate end of input lines) is left to callers \newcommand*{\sphinxunactivateextrasandspace}{\catcode32=10\relax \sphinxunactivateextras}% % now for the modified alltt environment \newenvironment{sphinxalltt} {% at start of next line to workaround Emacs/AUCTeX issue with this file \begin{alltt}% \ifspx@opt@parsedliteralwraps \sbox\sphinxcontinuationbox {\spx@opt@verbatimcontinued}% \sbox\sphinxvisiblespacebox {\spx@opt@verbatimvisiblespace}% \sphinxbreaksattexescapedchars \sphinxbreaksviaactiveinparsedliteral \sphinxbreaksatspaceinparsedliteral % alltt takes care of the ' as derivative ("prime") in math mode \everymath\expandafter{\the\everymath\sphinxunactivateextrasandspace \catcode`\<=12\catcode`\>=12\catcode`\^=7\catcode`\_=8 }% % not sure if displayed math (align,...) can end up in parsed-literal, anyway \everydisplay\expandafter{\the\everydisplay \catcode13=5 \sphinxunactivateextrasandspace \catcode`\<=12\catcode`\>=12\catcode`\^=7\catcode`\_=8 }% \fi } {\end{alltt}} % Protect \href's first argument in contexts such as sphinxalltt (or % \sphinxcode). Sphinx uses \#, \%, \& ... always inside \sphinxhref. \protected\def\sphinxhref#1#2{{% \sphinxunactivateextrasandspace % never do \scantokens with active space! \endlinechar\m@ne\everyeof{{#2}}% keep catcode regime for #2 \scantokens{\href{#1}}% normalise it for #1 during \href expansion }} % Same for \url. And also \nolinkurl for coherence. \protected\def\sphinxurl#1{{% \sphinxunactivateextrasandspace\everyeof{}% (<- precaution for \scantokens) \endlinechar\m@ne\scantokens{\url{#1}}% }} \protected\def\sphinxnolinkurl#1{{% \sphinxunactivateextrasandspace\everyeof{}% \endlinechar\m@ne\scantokens{\nolinkurl{#1}}% }} \newif\ifspx@inframed % flag set if we are already in a framed environment %% NOTICES AND ADMONITIONS % % Some are quite plain % the spx@notice@bordercolor etc are set in the sphinxadmonition environment \newenvironment{sphinxlightbox}{% \par\allowbreak \noindent{\color{spx@notice@bordercolor}% \rule{\linewidth}{\spx@notice@border}}\par\nobreak {\parskip\z@skip\noindent}% } {% % counteract previous possible negative skip (French lists!): % (we can't cancel that any earlier \vskip introduced a potential pagebreak) \sphinxvspacefixafterfrenchlists \nobreak\vbox{\noindent\kern\@totalleftmargin {\color{spx@notice@bordercolor}% \rule[\dimexpr.4\baselineskip-\spx@notice@border\relax] {\linewidth}{\spx@notice@border}}\hss}\allowbreak }% end of sphinxlightbox environment definition % may be renewenvironment'd by user for complete customization \newenvironment{sphinxnote}[1] {\begin{sphinxlightbox}\sphinxstrong{#1} }{\end{sphinxlightbox}} \newenvironment{sphinxhint}[1] {\begin{sphinxlightbox}\sphinxstrong{#1} }{\end{sphinxlightbox}} \newenvironment{sphinximportant}[1] {\begin{sphinxlightbox}\sphinxstrong{#1} }{\end{sphinxlightbox}} \newenvironment{sphinxtip}[1] {\begin{sphinxlightbox}\sphinxstrong{#1} }{\end{sphinxlightbox}} % or just use the package options % these are needed for common handling by notice environment of lightbox % and heavybox but they are currently not used by lightbox environment % and there is consequently no corresponding package option \definecolor{sphinxnoteBgColor}{rgb}{1,1,1} \definecolor{sphinxhintBgColor}{rgb}{1,1,1} \definecolor{sphinximportantBgColor}{rgb}{1,1,1} \definecolor{sphinxtipBgColor}{rgb}{1,1,1} % Others get more distinction % Code adapted from framed.sty's "snugshade" environment. % Nesting works (inner frames do not allow page breaks). \newenvironment{sphinxheavybox}{\par \setlength{\FrameRule}{\spx@notice@border}% \setlength{\FrameSep}{\dimexpr.6\baselineskip-\FrameRule\relax} % configure framed.sty's parameters to obtain same vertical spacing % as for "light" boxes. We need for this to manually insert parskip glue and % revert a skip done by framed before the frame. \ltx@ifundefined{OuterFrameSep}{}{\OuterFrameSep\z@skip}% \vspace{\FrameHeightAdjust} % copied/adapted from framed.sty's snugshade \def\FrameCommand##1{\hskip\@totalleftmargin \fboxsep\FrameSep \fboxrule\FrameRule \fcolorbox{spx@notice@bordercolor}{spx@notice@bgcolor}{##1}% \hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth}% \savenotes % use a minipage if we are already inside a framed environment \ifspx@inframed \noindent\begin{minipage}{\linewidth} \else % handle case where notice is first thing in a list item (or is quoted) \if@inlabel \noindent\par\vspace{-\baselineskip} \else \vspace{\parskip} \fi \fi \MakeFramed {\spx@inframedtrue \advance\hsize-\width \@totalleftmargin\z@ \linewidth\hsize % minipage initialization copied from LaTeX source code. \@pboxswfalse \let\@listdepth\@mplistdepth \@mplistdepth\z@ \@minipagerestore \@setminipage }% } {% \par\unskip \@minipagefalse \endMakeFramed \ifspx@inframed\end{minipage}\fi % set footnotes at bottom of page \spewnotes % arrange for similar spacing below frame as for "light" boxes. \vskip .4\baselineskip }% end of sphinxheavybox environment definition % may be renewenvironment'd by user for complete customization \newenvironment{sphinxwarning}[1] {\begin{sphinxheavybox}\sphinxstrong{#1} }{\end{sphinxheavybox}} \newenvironment{sphinxcaution}[1] {\begin{sphinxheavybox}\sphinxstrong{#1} }{\end{sphinxheavybox}} \newenvironment{sphinxattention}[1] {\begin{sphinxheavybox}\sphinxstrong{#1} }{\end{sphinxheavybox}} \newenvironment{sphinxdanger}[1] {\begin{sphinxheavybox}\sphinxstrong{#1} }{\end{sphinxheavybox}} \newenvironment{sphinxerror}[1] {\begin{sphinxheavybox}\sphinxstrong{#1} }{\end{sphinxheavybox}} % or just use package options % the \colorlet of xcolor (if at all loaded) is overkill for our use case \newcommand{\sphinxcolorlet}[2] {\expandafter\let\csname\@backslashchar color@#1\expandafter\endcsname \csname\@backslashchar color@#2\endcsname } % the main dispatch for all types of notices \newenvironment{sphinxadmonition}[2]{% #1=type, #2=heading % can't use #1 directly in definition of end part \def\spx@noticetype {#1}% % set parameters of heavybox/lightbox \sphinxcolorlet{spx@notice@bordercolor}{sphinx#1BorderColor}% \sphinxcolorlet{spx@notice@bgcolor}{sphinx#1BgColor}% \spx@notice@border \dimexpr\csname spx@opt@#1border\endcsname\relax % start specific environment, passing the heading as argument \begin{sphinx#1}{#2}} % workaround some LaTeX "feature" of \end command {\edef\spx@temp{\noexpand\end{sphinx\spx@noticetype}}\spx@temp} % ----- %% FROM DOCTUTILS LATEX WRITER % % The following is stuff copied from docutils' latex writer. % \newcommand{\optionlistlabel}[1]{\normalfont\bfseries #1 \hfill}% \bf deprecated \newenvironment{optionlist}[1] {\begin{list}{} {\setlength{\labelwidth}{#1} \setlength{\rightmargin}{1cm} \setlength{\leftmargin}{\rightmargin} \addtolength{\leftmargin}{\labelwidth} \addtolength{\leftmargin}{\labelsep} \renewcommand{\makelabel}{\optionlistlabel}} }{\end{list}} \newlength{\lineblockindentation} \setlength{\lineblockindentation}{2.5em} \newenvironment{lineblock}[1] {\begin{list}{} {\setlength{\partopsep}{\parskip} \addtolength{\partopsep}{\baselineskip} \topsep0pt\itemsep0.15\baselineskip\parsep0pt \leftmargin#1\relax} \raggedright} {\end{list}} % From docutils.writers.latex2e % inline markup (custom roles) % \DUrole{#1}{#2} tries \DUrole#1{#2} \providecommand*{\DUrole}[2]{% \ifcsname DUrole\detokenize{#1}\endcsname \csname DUrole\detokenize{#1}\endcsname{#2}% \else% backwards compatibility: try \docutilsrole#1{#2} \ifcsname docutilsrole\detokenize{#1}\endcsname \csname docutilsrole\detokenize{#1}\endcsname{#2}% \else #2% \fi \fi } \providecommand*{\DUprovidelength}[2]{% \ifdefined#1\else\newlength{#1}\setlength{#1}{#2}\fi } \DUprovidelength{\DUlineblockindent}{2.5em} \ifdefined\DUlineblock\else \newenvironment{DUlineblock}[1]{% \list{}{\setlength{\partopsep}{\parskip} \addtolength{\partopsep}{\baselineskip} \setlength{\topsep}{0pt} \setlength{\itemsep}{0.15\baselineskip} \setlength{\parsep}{0pt} \setlength{\leftmargin}{#1}} \raggedright } {\endlist} \fi % ----- %% TEXT STYLING % % to obtain straight quotes we execute \@noligs as patched by upquote, and % \scantokens is needed in cases where it would be too late for the macro to % first set catcodes and then fetch its argument. We also make the contents % breakable at non-escaped . , ; ? ! / using \sphinxbreaksviaactive. % the macro must be protected if it ends up used in moving arguments, % in 'alltt' \@noligs is done already, and the \scantokens must be avoided. \protected\def\sphinxupquote#1{{\def\@tempa{alltt}% \ifx\@tempa\@currenvir\else \ifspx@opt@inlineliteralwraps \sphinxbreaksviaactive\let\sphinxafterbreak\empty % do not overwrite the comma set-up \let\verbatim@nolig@list\sphinx@literal@nolig@list \fi % fix a space-gobbling issue due to LaTeX's original \do@noligs \let\do@noligs\sphinx@do@noligs \@noligs\endlinechar\m@ne\everyeof{}% (<- in case inside \sphinxhref) \expandafter\scantokens \fi {{#1}}}}% extra brace pair to fix end-space gobbling issue... \def\sphinx@do@noligs #1{\catcode`#1\active\begingroup\lccode`\~`#1\relax \lowercase{\endgroup\def~{\leavevmode\kern\z@\char`#1 }}} \def\sphinx@literal@nolig@list {\do\`\do\<\do\>\do\'\do\-}% % Some custom font markup commands. \protected\def\sphinxstrong#1{\textbf{#1}} \protected\def\sphinxcode#1{\texttt{#1}} \protected\def\sphinxbfcode#1{\textbf{\sphinxcode{#1}}} \protected\def\sphinxemail#1{\textsf{#1}} \protected\def\sphinxtablecontinued#1{\textsf{#1}} \protected\def\sphinxtitleref#1{\emph{#1}} \protected\def\sphinxmenuselection#1{\emph{#1}} \protected\def\sphinxaccelerator#1{\underline{#1}} \protected\def\sphinxcrossref#1{\emph{#1}} \protected\def\sphinxtermref#1{\emph{#1}} % \optional is used for ``[, arg]``, i.e. desc_optional nodes. \long\protected\def\sphinxoptional#1{% {\textnormal{\Large[}}{#1}\hspace{0.5mm}{\textnormal{\Large]}}} % additional customizable styling % FIXME: convert this to package options ? \protected\def\sphinxstyleindexentry #1{\texttt{#1}} \protected\def\sphinxstyleindexextra #1{ \emph{(#1)}} \protected\def\sphinxstyleindexpageref #1{, \pageref{#1}} \protected\def\sphinxstyletopictitle #1{\textbf{#1}\par\medskip} \let\sphinxstylesidebartitle\sphinxstyletopictitle \protected\def\sphinxstyleothertitle #1{\textbf{#1}} \protected\def\sphinxstylesidebarsubtitle #1{~\\\textbf{#1} \smallskip} % \text.. commands do not allow multiple paragraphs \protected\def\sphinxstyletheadfamily {\sffamily} \protected\def\sphinxstyleemphasis #1{\emph{#1}} \protected\def\sphinxstyleliteralemphasis#1{\emph{\sphinxcode{#1}}} \protected\def\sphinxstylestrong #1{\textbf{#1}} \protected\def\sphinxstyleliteralstrong#1{\sphinxbfcode{#1}} \protected\def\sphinxstyleabbreviation #1{\textsc{#1}} \protected\def\sphinxstyleliteralintitle#1{\sphinxcode{#1}} \newcommand*\sphinxstylecodecontinued[1]{\footnotesize(#1)}% \newcommand*\sphinxstylecodecontinues[1]{\footnotesize(#1)}% % figure legend comes after caption and may contain arbitrary body elements \newenvironment{sphinxlegend}{\par\small}{\par} % For curly braces inside \index macro \def\sphinxleftcurlybrace{\{} \def\sphinxrightcurlybrace{\}} % Declare Unicode characters used by linux tree command to pdflatex utf8/utf8x \def\spx@bd#1#2{% \leavevmode \begingroup \ifx\spx@bd@height \@undefined\def\spx@bd@height{\baselineskip}\fi \ifx\spx@bd@width \@undefined\setbox0\hbox{0}\def\spx@bd@width{\wd0 }\fi \ifx\spx@bd@thickness\@undefined\def\spx@bd@thickness{.6\p@}\fi \ifx\spx@bd@lower \@undefined\def\spx@bd@lower{\dp\strutbox}\fi \lower\spx@bd@lower#1{#2}% \endgroup }% \@namedef{sphinx@u2500}% BOX DRAWINGS LIGHT HORIZONTAL {\spx@bd{\vbox to\spx@bd@height} {\vss\hrule\@height\spx@bd@thickness \@width\spx@bd@width\vss}}% \@namedef{sphinx@u2502}% BOX DRAWINGS LIGHT VERTICAL {\spx@bd{\hb@xt@\spx@bd@width} {\hss\vrule\@height\spx@bd@height \@width \spx@bd@thickness\hss}}% \@namedef{sphinx@u2514}% BOX DRAWINGS LIGHT UP AND RIGHT {\spx@bd{\hb@xt@\spx@bd@width} {\hss\raise.5\spx@bd@height \hb@xt@\z@{\hss\vrule\@height.5\spx@bd@height \@width \spx@bd@thickness\hss}% \vbox to\spx@bd@height{\vss\hrule\@height\spx@bd@thickness \@width.5\spx@bd@width\vss}}}% \@namedef{sphinx@u251C}% BOX DRAWINGS LIGHT VERTICAL AND RIGHT {\spx@bd{\hb@xt@\spx@bd@width} {\hss \hb@xt@\z@{\hss\vrule\@height\spx@bd@height \@width \spx@bd@thickness\hss}% \vbox to\spx@bd@height{\vss\hrule\@height\spx@bd@thickness \@width.5\spx@bd@width\vss}}}% \protected\def\sphinxunichar#1{\@nameuse{sphinx@u#1}}% % Tell TeX about pathological hyphenation cases: \hyphenation{Base-HTTP-Re-quest-Hand-ler} % ---- start things taken from sphinxhowto.cls % Fix the bibliography environment to add an entry to the Table of % Contents. % For an article document class this environment is a section, % so no page break before it. % \newenvironment{sphinxthebibliography}[1]{% % \phantomsection % not needed here since TeXLive 2010's hyperref \begin{thebibliography}{#1}% \addcontentsline{toc}{section}{\ifdefined\refname\refname\else\ifdefined\bibname\bibname\fi\fi}}{\end{thebibliography}} % Same for the indices. % The memoir class already does this, so we don't duplicate it in that case. % \@ifclassloaded{memoir} {\newenvironment{sphinxtheindex}{\begin{theindex}}{\end{theindex}}} {\newenvironment{sphinxtheindex}{% \phantomsection % needed because no chapter, section, ... is created by theindex \begin{theindex}% \addcontentsline{toc}{section}{\indexname}}{\end{theindex}}} {% endraw %} PK�������!�N9���9������sphinxience/theme.conf[theme] inherit = alabaster stylesheet = sphinxience.css PK������!Hh+"���.���,���sphinxience-0.4.2.dist-info/entry_points.txt..̫(͉/HM-傈e%"�PK�������!�uh1��1��#���sphinxience-0.4.2.dist-info/LICENSECopyright (c) 2018 The Python Packaging Authority Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.PK������!HW"T���T���!���sphinxience-0.4.2.dist-info/WHEEL A н#J."jm)Afb~ ڡ5 G7hiޅF4+-3ڦ/̖?XPK������!H����$���sphinxience-0.4.2.dist-info/METADATAWmoF_1|HrAhs14F{hIĭ]R2{gv)JpAJ3<3AU*ym͒^/UK]ͽfSrvx}_e7}*7,n}`#&,) u}h ^vNy֡fGn?}$}}-;A u_.E^vQlYFQ柮n>-S- 9J7K*O~?c?` {:?}&?.d.yˍZ@7ArIohN{uwb1O!:22xZqE}q{VNي+::gp_ܱSnY]q'pd~9r2# "'O|؉,Y*>n|s {цʧ)4B KKсB߽}3e_F ubu&Vgbuɾt,VCN hz;eKR?e,D;fɮI'ن=)SQLˠg-ZlO2ԣZ>['|z<qLIl Ph3/Bi錇l>D;)* L:ГVy=f'/wnתopŤ&QI^Q5I21}b{W\_ �ZZZJMA{d}Mbvp@tȳlzC3wL'#|ؙ;щ˜WNF,3jJO yGK sdjDLλaEk)AJ 610SØS ᑔ蟶kTd3~`;dK%yNmm%R )C`N\4eIP4ΑS*&PT4tל.zfpmo IB֑5_F-†-p)6Y@;~hk�z)vP}|SjD*jD&VCDAEVojTܚCS{�}5 bPNWIF#aʲ9{"b6r(5T Ń2&\ZQT=a<#f%0=Feg~,Ԕ/^#Mol5h6[#cpmH!݃i>v jPsxUO$3$ j"IHd"d#(U>NhR-u_n( ;N}**�vyJgǹua E %G)<:rE8/8 V})c3B�E k< s TUiC89*dڐŋ('uƢU"׏8P#"Zfb( /B>9֊RstĝVÈ)H?1DO0IAߩڄ Gq;<'qm#sOW"/rPZ﬩|RgĐcB/ʎ]H\}QmTȆ %` b!/Ni t]_K/*wEڊV@- or#:J=6QSDχʱ\XZh?CP!P^_< {FƬW?;^~o} V-~==f?\ROMGDETFS78ؐqOP1zEIH&0Vky*A"L6˒9x8={eaBBh7PK������!Hq."��u��"���sphinxience-0.4.2.dist-info/RECORDIV}~ 1,dPAhetC1s ~}JةTe:LC (Ǡ(7ÂMuBRF7yU#DiNŠ]P4SԎW#9mzd7ob}PpZdI&8zQ#'tvg14%|`3_UlÓCHsޙ%jJ|ߊWq-ecF,͛Z0ͶQIWmVI)Ճn&P[79[ w %d_O%�Nåniz􀧨eiNvP!lwVPg~VsBWD涖Mj6cZDf r]#?3u.eWdsݛs*4`t$"lC7\b{؞([vw܃#Fv|PPV nx PMBcg�TL8|FWF6 LXhZ| w`4wf3o޷qGMr獊g@ WJ;׃采1$~?)T}W KSי{׆%s5=ZZNl pЕC=дA씵eg4jRE8%ۣ-p?&Y=ԯ x{5nTAn9ـ:B6'Oh/ryp^,ǒi}n1c8D.q[&0?n}K]Gyl6o KctB^$Ct!:R?}T0?�PK�������!�eST�������������������sphinxience/__init__.pyPK�������!�{[�����������������sphinxience/collapse.pyPK�������!� ʟ�����������������sphinxience/layout.htmlPK�������!�AM`��`���������������sphinxience/skip.pyPK�������!�|CZ��Z��0�����������A.��sphinxience/static/collapse-details-polyfill.cssPK�������!�Uհ������/�����������4��sphinxience/static/collapse-details-polyfill.jsPK�������!�AvNH����(�����������5��sphinxience/static/jquery.details.min.jsPK�������!�5����"�����������=��sphinxience/static/sphinxience.cssPK�������!�X@kY��Y��/����������� @��sphinxience/templates/sphinxience-article.cls_tPK�������!�o߾����'�����������A��sphinxience/templates/sphinxience.sty_tPK�������!�N9���9����������������sphinxience/theme.confPK������!Hh+"���.���,����������� ��sphinxience-0.4.2.dist-info/entry_points.txtPK�������!�uh1��1��#�������������sphinxience-0.4.2.dist-info/LICENSEPK������!HW"T���T���!�������������sphinxience-0.4.2.dist-info/WHEELPK������!H����$�������������sphinxience-0.4.2.dist-info/METADATAPK������!Hq."��u��"�������������sphinxience-0.4.2.dist-info/RECORDPK��������3����