PK! Dsphinxience/__init__.py__version__ = '0.1.2' __all__ = [] import os.path SUBMODULES = ["skip"] def update_context(app, pagename, templatename, context, doctree): context["sphinxience_version"] = __version__ 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) for submodule in SUBMODULES: app.setup_extension("sphinxience.{}".format(submodule)) return {'version': '0.1.2', "parallel_read_safe": True}PK! ʟsphinxience/layout.html{%- extends "basic/layout.html" %} {%- block footer %} {% if theme_github_banner|lower != 'false' %} Fork me on GitHub {% endif %} {% if theme_analytics_id %} {% 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("") else: raise SkipError("cannot render skip size %s to HTML" % (node['size'],)) def depart_skip_html(self, node): pass 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!N99sphinxience/theme.conf[theme] inherit = alabaster stylesheet = sphinxience.css PK!Hh+".,sphinxience-0.2.0.dist-info/entry_points.txt..̫(͉/HM-傈e%"PK!uh11#sphinxience-0.2.0.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"TT!sphinxience-0.2.0.dist-info/WHEEL A н#J."jm)Afb~ ڡ5 G7hiޅF4+-3ڦ/̖?XPK!Hn%Tn$sphinxience-0.2.0.dist-info/METADATAUMSG6V`8خ`6T*uv%ٙYbzV`ɕ \`ݳU>hg'<.* J{Ͷ|YdNiQ@(:R!I[RĒBTQ/tMku\9Oeq :U]KRUΌ%{g.t_ϋWOWvjFvB?}OqߓF=@Pݫ d~lEB3M[hYT1LF@?#7<}zh|nNS:?o8j'bVpWs::`?\uU|ևfE;nڻ%4 Pv ,WOŗ'Ox_f'b:L'Nix6 .7x8Ov-Gɧ`s`~k8B߿;.=.{3DRԑ5P{݉G'GæD,;|۸-Mac(+RbmS &S!޵Hن(pHQ\HKT+K `h]9wo<pŭ0:KZ-LE1-Jjn4I8s2Q,͙KKQd.7X\..n)k*#DKwhX+bk7u ?\6 õ'->o8&~8,<> :) ŨOgn-˫Xu=\e7(:t>(nlX#G>.Ԣ88Ky Z QKbк )8]k")˃ 9gK>&H!RfY+Zu`6-siW02QZH lc V;&'9䶁y~ߚvK%R7+g5Kr35;S _2%0dV.\=VG|z~ +چgJbXgUfunB@\y]#s#YoHJ(m(PK!HBT+"sphinxience-0.2.0.dist-info/RECORD}Aj@- Z܅4Q)nIa({7ݧo,sӵ9E)".%N%ϝՒE3|Pu=48lVe𺒶o3#rVI&Aު($a0s0b5`;NV4bFӯHHEw`ҠJ`Ҕ*nihBI~r3M!_aMM^٩ȼӡO6V@pAɱr>D/ 1֤5QКuثBwzg-9g¬,y0)+쵁Ge/P60zĶ]ЕQhn7*=#q4,\Z6S>>;ʸN=!j[ 8m!O_/_8rv-[`&`o=mwVkNP/PK! Dsphinxience/__init__.pyPK! ʟSsphinxience/layout.htmlPK!AM``' sphinxience/skip.pyPK!5"sphinxience/static/sphinxience.cssPK!N99sphinxience/theme.confPK!Hh+".,Msphinxience-0.2.0.dist-info/entry_points.txtPK!uh11#sphinxience-0.2.0.dist-info/LICENSEPK!HW"TT!+ sphinxience-0.2.0.dist-info/WHEELPK!Hn%Tn$ sphinxience-0.2.0.dist-info/METADATAPK!HBT+"$sphinxience-0.2.0.dist-info/RECORDPK '