First commit
@ -0,0 +1,10 @@
|
||||
*.aux
|
||||
*.fdb_latexmk
|
||||
*.fls
|
||||
*.idx
|
||||
*.log
|
||||
*.ilg
|
||||
*.ind
|
||||
*.out
|
||||
*.synctex.gz
|
||||
*.toc
|
After Width: | Height: | Size: 391 KiB |
@ -0,0 +1,64 @@
|
||||
# Makefile for Sphinx LaTeX output
|
||||
|
||||
ALLDOCS = $(basename $(wildcard *.tex))
|
||||
ALLPDF = $(addsuffix .pdf,$(ALLDOCS))
|
||||
ALLDVI = $(addsuffix .dvi,$(ALLDOCS))
|
||||
ALLXDV =
|
||||
ALLPS = $(addsuffix .ps,$(ALLDOCS))
|
||||
|
||||
# Prefix for archive names
|
||||
ARCHIVEPREFIX =
|
||||
# Additional LaTeX options (passed via variables in latexmkrc/latexmkjarc file)
|
||||
export LATEXOPTS ?=
|
||||
# Additional latexmk options
|
||||
LATEXMKOPTS ?=
|
||||
# format: pdf or dvi (used only by archive targets)
|
||||
FMT = pdf
|
||||
|
||||
LATEX = latexmk -dvi
|
||||
PDFLATEX = latexmk -pdf -dvi- -ps-
|
||||
|
||||
|
||||
%.dvi: %.tex FORCE_MAKE
|
||||
$(LATEX) $(LATEXMKOPTS) '$<'
|
||||
|
||||
%.ps: %.dvi
|
||||
dvips '$<'
|
||||
|
||||
%.pdf: %.tex FORCE_MAKE
|
||||
$(PDFLATEX) $(LATEXMKOPTS) '$<'
|
||||
|
||||
all: $(ALLPDF)
|
||||
|
||||
all-dvi: $(ALLDVI)
|
||||
|
||||
all-ps: $(ALLPS)
|
||||
|
||||
all-pdf: $(ALLPDF)
|
||||
|
||||
zip: all-$(FMT)
|
||||
mkdir $(ARCHIVEPREFIX)docs-$(FMT)
|
||||
cp $(ALLPDF) $(ARCHIVEPREFIX)docs-$(FMT)
|
||||
zip -q -r -9 $(ARCHIVEPREFIX)docs-$(FMT).zip $(ARCHIVEPREFIX)docs-$(FMT)
|
||||
rm -r $(ARCHIVEPREFIX)docs-$(FMT)
|
||||
|
||||
tar: all-$(FMT)
|
||||
mkdir $(ARCHIVEPREFIX)docs-$(FMT)
|
||||
cp $(ALLPDF) $(ARCHIVEPREFIX)docs-$(FMT)
|
||||
tar cf $(ARCHIVEPREFIX)docs-$(FMT).tar $(ARCHIVEPREFIX)docs-$(FMT)
|
||||
rm -r $(ARCHIVEPREFIX)docs-$(FMT)
|
||||
|
||||
gz: tar
|
||||
gzip -9 < $(ARCHIVEPREFIX)docs-$(FMT).tar > $(ARCHIVEPREFIX)docs-$(FMT).tar.gz
|
||||
|
||||
bz2: tar
|
||||
bzip2 -9 -k $(ARCHIVEPREFIX)docs-$(FMT).tar
|
||||
|
||||
xz: tar
|
||||
xz -9 -k $(ARCHIVEPREFIX)docs-$(FMT).tar
|
||||
|
||||
clean:
|
||||
rm -f *.log *.ind *.aux *.toc *.syn *.idx *.out *.ilg *.pla *.ps *.tar *.tar.gz *.tar.bz2 *.tar.xz $(ALLPDF) $(ALLDVI) $(ALLXDV) *.fls *.fdb_latexmk
|
||||
|
||||
.PHONY: all all-pdf all-dvi all-ps clean zip tar gz bz2 xz
|
||||
.PHONY: FORCE_MAKE
|
After Width: | Height: | Size: 243 KiB |
After Width: | Height: | Size: 1.5 MiB |
After Width: | Height: | Size: 148 KiB |
After Width: | Height: | Size: 101 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 104 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 151 KiB |
After Width: | Height: | Size: 173 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 77 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 202 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 68 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 174 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 117 KiB |
After Width: | Height: | Size: 108 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 108 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 91 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 156 KiB |
After Width: | Height: | Size: 91 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 110 KiB |
After Width: | Height: | Size: 89 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 156 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 181 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 140 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 77 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 84 KiB |
@ -0,0 +1,243 @@
|
||||
# Fdb version 3
|
||||
["makeindex book.idx"] 1721982828 "book.idx" "book.ind" "book" 1721982840
|
||||
"book.idx" 1721982835 0 d41d8cd98f00b204e9800998ecf8427e "pdflatex"
|
||||
(generated)
|
||||
"book.ilg"
|
||||
"book.ind"
|
||||
["pdflatex"] 1721982834 "/home/sens/Documents/Private 5G_ A Systems Approach/book.tex" "book.pdf" "book" 1721982840
|
||||
"/etc/texmf/web2c/texmf.cnf" 1710341186 475 c0e671620eb5563b2130f56340a5fde8 ""
|
||||
"/home/sens/Documents/Private 5G_ A Systems Approach/book.tex" 1721982822 261623 8f71e227ecf9dda9e5e3429861ba6bed ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/map/fontname/texfonts.map" 1577235249 3524 cb3e574dea2d1052e39280babc910dc8 ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/jknappen/ec/ecrm1095.tfm" 1136768653 3584 929cdff2b7a8c11bd4d49fd68cb0ae70 ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex7.tfm" 1246382020 1004 54797486969f23fa377b128694d548df ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex8.tfm" 1246382020 988 bdf658c3bfc2d96d3c8b02cfc1c94c20 ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex9.tfm" 1246382020 996 a18840b13b499c08ac2de96a99eda4bc ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam10.tfm" 1246382020 916 f87d7c45f9c908e672703b83b72241a3 ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam5.tfm" 1246382020 924 9904cf1d39e9767e7a3622f2a125a565 ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam7.tfm" 1246382020 928 2dc8d444221b7a635bb58038579b861a ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm" 1246382020 908 2921f8a10601f252058503cc6570e581 ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm5.tfm" 1246382020 940 75ac932a52f80982a9f8ea75d03a34cf ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm7.tfm" 1246382020 940 228d6584342e91276bf566bcf9716b83 ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/cbfonts/grmn1095.tfm" 1213382506 2880 271b145c9f94b98a62257ecce1173ef8 ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmex10.tfm" 1136768653 992 662f679a0b3d2d53c1b94050fdaa3f50 ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmi10.tfm" 1136768653 1528 abec98dbc43e172678c11b3b9031252a ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmi12.tfm" 1136768653 1524 4414a8315f39513458b80dfc63bff03a ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmi6.tfm" 1136768653 1512 f21f83efb36853c0b70002322c1ab3ad ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmi8.tfm" 1136768653 1520 eccf95517727cb11801f4f1aee3a21b4 ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmi9.tfm" 1136768653 1524 d89e2d087a9828407a196f428428ef4a ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmr10.tfm" 1136768653 1296 45809c5a464d5f32c8f98ba97c1bb47f ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmr12.tfm" 1136768653 1288 655e228510b4c2a1abe905c368440826 ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmr17.tfm" 1136768653 1292 296a67155bdbfc32aa9c636f21e91433 ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmr6.tfm" 1136768653 1300 b62933e007d01cfd073f79b963c01526 ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmr8.tfm" 1136768653 1292 21c1c5bfeaebccffdb478fd231a0997d ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmr9.tfm" 1136768653 1292 6b21b9c2c7bebb38aa2273f7ca0fb3af ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm" 1136768653 1124 6c73e740cf17375f03eec0ee63599741 ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmsy6.tfm" 1136768653 1116 933a60c408fc0a863a92debe84b2d294 ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmsy8.tfm" 1136768653 1120 8b7d695260f3cff42e636090a8002094 ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmsy9.tfm" 1136768653 1116 25a7bf822c58caf309a702ef79f4afbb ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/tfm/public/txfonts/t1xtt.tfm" 1136768653 1384 8943063000d26272532f74ca134dfecd ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb" 1248133631 36299 5f9df58c2139e7edcf37c8fca4bd384d ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi8.pfb" 1248133631 35469 70d41d2b9ea31d5d813066df7c99281c ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb" 1248133631 35752 024fb6c41858982481f6968b5fc26508 ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb" 1248133631 32569 5e5ddc8df908dea60932f3c484a54c0d ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/type1/public/cbfonts/grmn1095.pfb" 1213382506 83085 ea64199df2f595815c19ff6c52e02e8e ""
|
||||
"/usr/share/texlive/texmf-dist/fonts/type1/public/txfonts/t1xtt.pfb" 1136849748 26301 f08b3c26ea42c3177a262c2ac37d6a91 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii" 1461363279 71627 94eb9990bed73c364d7f53f960cc8c5b ""
|
||||
"/usr/share/texlive/texmf-dist/tex/generic/atbegshi/atbegshi.sty" 1575674566 24708 5584a51a7101caf7e6bbf1fc27d8f7b1 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/generic/babel-english/english.ldf" 1496785618 7008 9ff5fdcc865b01beca2b0fe4a46231d4 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty" 1643231327 147419 2058c0f5e6893b19c8f3ce95d177646c ""
|
||||
"/usr/share/texlive/texmf-dist/tex/generic/babel/txtbabel.def" 1643231327 5233 d5e383ed66bf272b71b1a90b596e21c6 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty" 1576625341 40635 c40361e206be584d448876bba8a64a3b ""
|
||||
"/usr/share/texlive/texmf-dist/tex/generic/bitset/bitset.sty" 1576016050 33961 6b5c75130e435b2bfdb9f480a09a39f9 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/generic/etexcmds/etexcmds.sty" 1576625273 7734 b98cbb34c81f667027c1e3ebdbfce34b ""
|
||||
"/usr/share/texlive/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty" 1576625223 8371 9d55b8bd010bc717624922fb3477d92e ""
|
||||
"/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty" 1583617216 6501 4011d89d9621e0b0901138815ba5ff29 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/generic/iftex/ifvtex.sty" 1572645307 1057 525c2192b5febbd8c1f662c9468335bb ""
|
||||
"/usr/share/texlive/texmf-dist/tex/generic/infwarerr/infwarerr.sty" 1575499628 8356 7bbb2c2373aa810be568c29e333da8ed ""
|
||||
"/usr/share/texlive/texmf-dist/tex/generic/intcalc/intcalc.sty" 1576625065 31769 002a487f55041f8e805cfbf6385ffd97 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty" 1576878844 5412 d5a2436094cd7be85769db90f29250a6 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty" 1576624944 13807 952b0226d4efca026f0e19dd266dcc22 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty" 1600895880 17859 4409f8f50cd365c68e684407e5350b1b ""
|
||||
"/usr/share/texlive/texmf-dist/tex/generic/pdfescape/pdfescape.sty" 1576015897 19007 15924f7228aca6c6d184b115f4baa231 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty" 1593379760 20089 80423eac55aa175305d35b49e04fe23b ""
|
||||
"/usr/share/texlive/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty" 1576624663 7008 f92eaa0a3872ed622bbf538217cd2ab7 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfonts.sty" 1359763108 5949 3f3fd50a8cc94c3d4cbf4fc66cd3df1c ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty" 1359763108 13829 94730e64147574077f8ecfea9bb69af4 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsa.fd" 1359763108 961 6518c6525a34feb5e8250ffa91731cff ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd" 1359763108 961 d02606146ba5601b5645f987c92e6193 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty" 1622667781 2222 da905dc1db75412efd2d8f67739f0596 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty" 1622667781 4173 bc0410bcccdff806d6132d3c1ef35481 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty" 1636758526 87648 07fbb6e9169e00cb2a2f40b31b2dbf3c ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty" 1636758526 4128 8eea906621b6639f7ba476a472036bbe ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty" 1636758526 2444 926f379cc60fcf0c6e3fee2223b4370d ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/atveryend/atveryend.sty" 1576191570 19336 ce7ae9438967282886b3b036cfad1e4d ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/auxhook/auxhook.sty" 1576625391 3935 57aa3c3e203a5c2effb4d2bd2efbc323 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/base/alltt.sty" 1622581934 3137 2366459cfce784001c7405ed16a872fb ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/base/atbegshi-ltx.sty" 1636758526 3034 3bfb87122e6fa8758225c0dd3cbaceba ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/base/atveryend-ltx.sty" 1636758526 2462 754d6b31b2ab5a09bb72c348ace2ec75 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty" 1622581934 4946 461cc78f6f26901410d9f1d725079cc6 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty" 1622581934 5049 969aec05d5f39c43f8005910498fcf90 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/base/makeidx.sty" 1636758526 1939 e44505a18ba4edebb8b70993e32c6350 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/base/report.cls" 1636758526 23203 8fbc410e29d3fd675970d5f9698c9c11 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo" 1636758526 8464 74db94825c407b51399ca17d9bd38a3d ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty" 1622581934 2894 55431114fc0e491ecee275edafd6c881 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/capt-of/capt-of.sty" 1264379041 1311 063f8536a047a2d9cb1803321f793f37 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/cbfonts-fd/lgrcmr.fd" 1501364450 2679 d425462515e71491c8b283467c8a268c ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/cmap/cmap.sty" 1612650595 3574 ddc11a0ae1c579d351ed20d2319ad422 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/cmap/lgr.cmap" 1215522782 3744 a1cad9520fc27da4fce0135afa2f6445 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/cmap/ot1.cmap" 1177721415 1207 4e0d96772f0d338847cbfb4eca683c81 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/cmap/t1.cmap" 1215522782 1938 beaa4a8467aa0074076e0e19f2992e29 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty" 1579991033 13886 d1306dcf79a944f6988e688c1785f9ce ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty" 1612734021 17086 7ed8cbc4d361ec87392817e0dd4f65ec ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty" 1640123156 44023 c6f2f55a2bb9630fba10bfd488a5addd ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/float/float.sty" 1137110151 6749 16d2656a1984957e674b149555f1ea1d ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/fncychap/fncychap.sty" 1292029257 19488 fdd52eb173b3197d748e1ec25acb042f ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/framed/framed.sty" 1338588508 22449 7ec15c16d0d66790f28e90343c5434a3 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty" 1578002852 41601 9cf6c5257b1bc7af01a58859749dd37a ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg" 1459978653 1213 620bba36b25224fa9b7e1ccb4ecb76fd ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg" 1465944070 1224 978390e9c2234eab29404bc21b268d1e ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def" 1601931164 19103 48d29b6e2a64cb717117ef65f107b404 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty" 1639603921 7197 eb6c1ebf41667a05cb50c23c19d5e8bc ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty" 1622581934 18399 7e40f80366dffb22c0e7b70517db5cb4 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty" 1636758526 7996 a8fb260d598dcaf305a7ae7b9c3e3229 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty" 1622581934 2671 4de6781a30211fe0ea4c672e4a2a8166 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty" 1636758526 4009 187ea2dc3194cd5a76cd99a8d7a6c4d0 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/greek-fontenc/greek-fontenc.def" 1604525725 19298 d12818183d763921d8699ccb69bc98aa ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/greek-fontenc/lgrenc.def" 1604525725 40808 6d39ed380201bea38426587b88f31f37 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/greek-fontenc/puenc-greek.def" 1604525725 23889 d174b5a24a93bd94dfe17b21da226177 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/greek-fontenc/textalpha.sty" 1604525725 21811 ccadbc18c2bbe28c5cb1169926c544cd ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/greek-inputenc/lgrenc.dfu" 1562878851 34178 3a496b86f1e3408e75f433fb56b41726 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/hycolor/hycolor.sty" 1580250785 17914 4c28a13fc3d975e6e81c9bea1d697276 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def" 1623096352 49890 0bb76a5b745d92e86aed6f3f93e334f0 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref-langpatches.def" 1623096352 1777 940b1aa83773bc035eb882e8d6842769 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty" 1623096352 230915 97a8817f13de4e61bbc3592cb2caa995 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty" 1612734870 13242 133e617c5eebffdd05e421624022b267 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def" 1623096352 14132 c9404e8e78123ef0d1007c34d1d6da51 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/hyperref/puenc-greekbasic.def" 1623096352 6697 b76ef2f73f5cabc6d490a1a25c060b8d ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/hyperref/puenc.def" 1623096352 117004 86586f287ddfad919a0a4bd68934277a ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/kvoptions/kvoptions.sty" 1602274869 22521 d2fceb764a442a2001d257ef11db7618 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def" 1642022539 29921 f0f4f870357ebfb8fe58ed9ed4ee9b92 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg" 1279039959 678 4792914a8f45be57bb98413425e4c7af ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty" 1575499565 5766 13a9e8766c47f30327caf893ece86ac8 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/mmap/oml.cmap" 1215649417 1866 c1c12138091b4a8edd4a24a940e6f792 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/mmap/oms.cmap" 1215649417 2370 3b1f71b14b974f07cef532db09ae9ee0 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/mmap/omx.cmap" 1215649417 3001 252c8ca42b06a22cb1a11c0e47790c6e ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/needspace/needspace.sty" 1364856750 852 0e34dbb72efc69fa07602405ad95585e ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/oberdiek/hypcap.sty" 1575152444 3822 b53c749cd81352b4679a35b0dafefb95 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/parskip/parskip-2001-04-09.sty" 1536789184 2757 ea00cb4f4e9abc702916f74d3812ef67 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/parskip/parskip.sty" 1615762720 4288 94714aa7f535440f33181fec52a31963 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/refcount/refcount.sty" 1576624809 9878 9e94e8fa600d95f9c7731bb21dfb67a4 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty" 1575674187 9715 b051d5b493d9fe5f4bc251462d039e5f ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/substitutefont/substitutefont.sty" 1383613339 2760 7f04e02850764194948e876fe97f163a ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/tabulary/tabulary.sty" 1403566480 13791 8c83287d79183c3bf58fd70871e8a70b ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/titlesec/titlesec.sty" 1625518490 48833 3b7b4cfab1a3d15596bfd3772a77ab65 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/tools/array.sty" 1636758526 12694 6c23725d50ab9d1e2d3ce482c58ffcf3 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/tools/longtable.sty" 1636758526 12892 3ffe092fc7f5d1cb9866f1bcb071d0d6 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/tools/multicol.sty" 1636758526 32262 2bb622a0aa56c4a7a5cbdfe9d122c15a ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/txfonts/t1txtt.fd" 1137111002 1324 7b6c95370a64cd8c7620cbefefb53dba ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/upquote/upquote.sty" 1334873510 1048 517e01cde97c1c0baf72e69d43aa5a2e ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/url/url.sty" 1388531844 12796 8edb7d69a20b857904dd0ea757c14ec9 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/varwidth/varwidth.sty" 1238697683 10894 d359a13923460b2a73d4312d613554c8 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/wrapfig/wrapfig.sty" 1137111090 26220 3701aebf80ccdef248c0c20dd062fea9 ""
|
||||
"/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty" 1635798903 56029 3f7889dab51d620aa43177c391b7b190 ""
|
||||
"/usr/share/texlive/texmf-dist/web2c/texmf.cnf" 1644012257 39432 7155514e09a3d69036fac785183a21c2 ""
|
||||
"/usr/share/texmf/fonts/enc/dvips/tex-gyre/q-ec.enc" 1529098226 2457 aaabbccba4df2a7f7371410ee4e075a3 ""
|
||||
"/usr/share/texmf/fonts/enc/dvips/tex-gyre/q-ts1.enc" 1529098226 3124 3813fd4c981d99822890a2861b0d274c ""
|
||||
"/usr/share/texmf/fonts/tfm/public/tex-gyre/ec-qhvb.tfm" 1480098718 11796 b7bc3db132e822d2872ea50ba8fa7cc0 ""
|
||||
"/usr/share/texmf/fonts/tfm/public/tex-gyre/ec-qhvbi.tfm" 1480098718 12396 e65c2800bb94ee6ae6e4fdf18f68fa2e ""
|
||||
"/usr/share/texmf/fonts/tfm/public/tex-gyre/ec-qhvr.tfm" 1480098718 12084 374c5b7e91efcc10472ab8e61f66d36b ""
|
||||
"/usr/share/texmf/fonts/tfm/public/tex-gyre/ec-qtmb.tfm" 1480098718 11484 431d8013ae6931f9326b9a0f492d2a5e ""
|
||||
"/usr/share/texmf/fonts/tfm/public/tex-gyre/ec-qtmr.tfm" 1480098718 11504 0b76b46eb90907e684139293e03c466a ""
|
||||
"/usr/share/texmf/fonts/tfm/public/tex-gyre/ec-qtmri.tfm" 1480098718 11356 da1519f442d8a49b81c86cbaf25ef79f ""
|
||||
"/usr/share/texmf/fonts/tfm/public/tex-gyre/ts1-qtmr.tfm" 1480098718 1600 20cdf11dab97d5d39e847571f9314407 ""
|
||||
"/usr/share/texmf/fonts/type1/public/tex-gyre/qhvb.pfb" 1480098745 112164 176018dd42fcc60204173fa10e357da5 ""
|
||||
"/usr/share/texmf/fonts/type1/public/tex-gyre/qhvbi.pfb" 1480098745 104926 77ce2f0433ac7fd33dbe9968d127e4fb ""
|
||||
"/usr/share/texmf/fonts/type1/public/tex-gyre/qtmb.pfb" 1480098745 131776 4be3e220f990dc716f91bb7965c09237 ""
|
||||
"/usr/share/texmf/fonts/type1/public/tex-gyre/qtmr.pfb" 1480098745 133302 8dca243a80ecf4cfe00077d4bd995bd7 ""
|
||||
"/usr/share/texmf/fonts/type1/public/tex-gyre/qtmri.pfb" 1480098745 129669 aaf12ebd0b807d452087fc34bde5bd7d ""
|
||||
"/usr/share/texmf/tex/latex/tex-gyre/t1qhv.fd" 1480098840 2378 01e898189bf06467f2f6fe33decbff09 ""
|
||||
"/usr/share/texmf/tex/latex/tex-gyre/t1qtm.fd" 1480098840 1638 7cc855d1dc7c12c1858f209a4ef88c4a ""
|
||||
"/usr/share/texmf/tex/latex/tex-gyre/tgheros.sty" 1480098840 2130 2b41e80713f78d339e74c19d96fe70a1 ""
|
||||
"/usr/share/texmf/tex/latex/tex-gyre/tgtermes.sty" 1480098840 2211 af9b7d12507105a58a3e8e926996b827 ""
|
||||
"/usr/share/texmf/tex/latex/tex-gyre/ts1qtm.fd" 1480098840 1160 de7b1cf70edab73c9f1704df2a9fdbbd ""
|
||||
"/usr/share/texmf/web2c/texmf.cnf" 1644012257 39432 7155514e09a3d69036fac785183a21c2 ""
|
||||
"/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map" 1710341211 4379155 98693266ff65f58d9f98aff394de12d2 ""
|
||||
"/var/lib/texmf/web2c/pdftex/pdflatex.fmt" 1710481103 2801139 e5d47e52a989f35357bec941ce971d6b ""
|
||||
"Slide1.png" 1721975082 151928 8af950a4e8423a027d591a03a1494a6d ""
|
||||
"Slide10.png" 1721975082 103341 c88a3a34b0f38b5a2bf403eec5f8bc2c ""
|
||||
"Slide101.png" 1721975082 36343 3e18995ab83729926324081078baa36b ""
|
||||
"Slide11.png" 1721975082 106840 2328366752ab27796d15708dc2840662 ""
|
||||
"Slide110.png" 1721975082 66872 f260f070d5105d7e8310099856d74727 ""
|
||||
"Slide111.png" 1721975082 154416 4769c98ca1967dc5b68ed6fea99cb6f7 ""
|
||||
"Slide112.png" 1721975082 176711 0bea0a29ff1a778ef06ed6fd4a105b74 ""
|
||||
"Slide12.png" 1721975082 67043 e8a8b811f359efd74cf17d6340d82d89 ""
|
||||
"Slide121.png" 1721975082 78801 5b5ab7a782de35e292703d4641aa9c41 ""
|
||||
"Slide13.png" 1721975082 41001 4f9d886c876fefbd39cb69d4616b8285 ""
|
||||
"Slide14.png" 1721975082 207087 41ea0d2296e0dd5dd6726e07a0274bbd ""
|
||||
"Slide141.png" 1721975082 22880 6ef716af30b526ba437a3c570fe80581 ""
|
||||
"Slide15.png" 1721975082 70182 4c50370a1560747558f2e2df7d3dfd1f ""
|
||||
"Slide16.png" 1721975082 67731 f861f0b6339ee80251ae71ae728edb25 ""
|
||||
"Slide17.png" 1721975082 81490 040fdb28aa97172dbad89d863b562ae2 ""
|
||||
"Slide18.png" 1721975082 65262 3bb20a8389f432f1c8757c1b842b23a4 ""
|
||||
"Slide19.png" 1721975082 60169 6c4db59cea802449d61e1a7af6f875cc ""
|
||||
"Slide2.png" 1721975082 177959 bf284ca1151f6e0bcc8ee11714c82e7b ""
|
||||
"Slide20.png" 1721975082 59232 b13f7c614292c2064bbe9b414f84182a ""
|
||||
"Slide21.png" 1721975082 59267 789e8560514c73ff39591f0fc4f59092 ""
|
||||
"Slide211.png" 1721975082 87252 21502541faa88360d9b1043f10aa65de ""
|
||||
"Slide22.png" 1721975082 119824 ac1878d5fa7e6940c640fa7c087d0329 ""
|
||||
"Slide23.png" 1721975082 110767 273282c917885ac6c93f6f6676189480 ""
|
||||
"Slide24.png" 1721975082 73615 7a1ab6789ead4d48558b087a0e9f44dc ""
|
||||
"Slide3.png" 1721975082 93041 5b6195e07bb4259e0326d4f6c2d483e6 ""
|
||||
"Slide31.png" 1721975082 214449 b31d7b10131b7dce6267935203a8793a ""
|
||||
"Slide32.png" 1721975082 55161 eea15af037ec5f3497ef126c57023a9a ""
|
||||
"Slide4.png" 1721975082 159742 9d3de4b25ccf7ddc008af42c42b75bae ""
|
||||
"Slide41.png" 1721975082 93482 06f1d067ae741209589b8440589c63e7 ""
|
||||
"Slide42.png" 1721975082 54738 ae7d69f3c570c09579787cf41a8af568 ""
|
||||
"Slide5.png" 1721975082 82452 9ea6269420ae7a3952a36a0689678237 ""
|
||||
"Slide51.png" 1721975082 112111 acd928ec2e851f2f313d3bf9c4ee503f ""
|
||||
"Slide52.png" 1721975082 91245 91e6aa250afffa9fb73a555689539492 ""
|
||||
"Slide6.png" 1721975082 62628 03723d5b0d34d9dcb84fa508eda0384e ""
|
||||
"Slide61.png" 1721975082 109430 8ff14d19aadb8404b9648996a15d72b9 ""
|
||||
"Slide62.png" 1721975082 159961 d6db5b2bd3754182da29b829c185b875 ""
|
||||
"Slide7.png" 1721975082 63902 6f54f447a23954bb5cc91259f67482a1 ""
|
||||
"Slide71.png" 1721975082 185593 d14575841dc11a0deded6fa9f94b9a52 ""
|
||||
"Slide72.png" 1721975082 22463 0a82b7a8eba01afdeb89a1c296df469f ""
|
||||
"Slide8.png" 1721975082 70763 fd1b35a08a179b31dbcbb232d9bbeeff ""
|
||||
"Slide81.png" 1721975082 143394 799e033e788d764146f7e10fd6a21725 ""
|
||||
"Slide82.png" 1721975082 24984 51cfdcc2b1bcc8172fffe93db8578a08 ""
|
||||
"Slide9.png" 1721975082 78791 3aed82e582114260f8cc750f7b62f5c4 ""
|
||||
"Slide91.png" 1721975082 99829 4f68d847d96d0e616e9862b67cd9315b ""
|
||||
"Slide92.png" 1721975082 85793 e7fbb2b518cb55a1fbe4b8c2360bab25 ""
|
||||
"book.aux" 1721982839 42918 332574784bfcb20e6a0cc84e78b33345 "pdflatex"
|
||||
"book.ind" 1721982828 0 d41d8cd98f00b204e9800998ecf8427e "makeindex book.idx"
|
||||
"book.out" 1721982839 9306 48c87abc398957a4e85279b800bbbeb5 "pdflatex"
|
||||
"book.tex" 1721982822 261623 8f71e227ecf9dda9e5e3429861ba6bed ""
|
||||
"book.toc" 1721982839 4750 179cc1ba130c41fc36c88cbd1f61e1d3 "pdflatex"
|
||||
"peru_deploy_labelled.jpg" 1721975082 121520 7f543f3d06df051df82c0620c7b2df3a ""
|
||||
"sphinx.sty" 1721975082 13262 0226aaccc1147ed884a3946fce78a6d2 ""
|
||||
"sphinxhighlight.sty" 1721975082 6742 ef996596562a9a2908d62b245f9fe7bd ""
|
||||
"sphinxlatexadmonitions.sty" 1721975082 6238 2d867d769abf3f72abc17ef52adff78b ""
|
||||
"sphinxlatexcontainers.sty" 1721975082 901 d3a3a1b7b2547f47ade2499350b5c420 ""
|
||||
"sphinxlatexgraphics.sty" 1721975082 4840 a9578332b6f3b35e198751fb632c9b79 ""
|
||||
"sphinxlatexindbibtoc.sty" 1721975082 2066 b93f8504d02f6337fde3074b179de55e ""
|
||||
"sphinxlatexlists.sty" 1721975082 3540 28bde24363589dd8238e1c3089e5b1b5 ""
|
||||
"sphinxlatexliterals.sty" 1721975082 35719 daaa4295be807130a5df36ead18b83fa ""
|
||||
"sphinxlatexnumfig.sty" 1721975082 4532 3633caf84afa1a98e1a060b7868202bb ""
|
||||
"sphinxlatexobjects.sty" 1721975082 7539 5bd439fe3b377102e234413cf4aac14a ""
|
||||
"sphinxlatexshadowbox.sty" 1721975082 3885 01355157c5580b34ec18031ea7a5e0e0 ""
|
||||
"sphinxlatexstyleheadings.sty" 1721975082 3253 144b82f37e9d225d888cce45c19b8ed4 ""
|
||||
"sphinxlatexstylepage.sty" 1721975082 3064 abce6c3018a84afee0afb08a431944ea ""
|
||||
"sphinxlatexstyletext.sty" 1721975082 6177 c18841ce3fafc366cd3b145f8faa4c37 ""
|
||||
"sphinxlatextables.sty" 1721975082 21848 2827eb0b11b99b185a8b77317d3e131c ""
|
||||
"sphinxmanual.cls" 1721975082 4241 7b0d7a37df7b5715fb0dbd585c52ecdb ""
|
||||
"sphinxmessages.sty" 1721975082 745 3614f78cc7317eca1d58bd35beda5875 ""
|
||||
"sphinxoptionsgeometry.sty" 1721975082 2061 47bb34b8ed8a78823eb0c886abfb9f4d ""
|
||||
"sphinxoptionshyperref.sty" 1721975082 1094 79beb8b8a3f10784f8cce804e0f9d3aa ""
|
||||
"sphinxpackagefootnote.sty" 1721975082 13248 e2c77871396275ccf592403f8130f6f2 ""
|
||||
(generated)
|
||||
"book.aux"
|
||||
"book.idx"
|
||||
"book.log"
|
||||
"book.out"
|
||||
"book.pdf"
|
||||
"book.toc"
|
@ -0,0 +1,5 @@
|
||||
This is makeindex, version 2.15 [TeX Live 2022/dev] (kpathsea + Thai support).
|
||||
Scanning style file ./python.ist.......done (7 attributes redefined, 0 ignored).
|
||||
Scanning input file book.idx...done (0 entries accepted, 0 rejected).
|
||||
Nothing written in book.ind.
|
||||
Transcript written in book.ilg.
|
@ -0,0 +1,55 @@
|
||||
\BOOKMARK [0][-]{chapter.1}{\376\377\000C\000h\000a\000p\000t\000e\000r\000\040\0001\000:\000\040\000I\000n\000t\000r\000o\000d\000u\000c\000t\000i\000o\000n}{}% 1
|
||||
\BOOKMARK [1][-]{section.1.1}{\376\377\0001\000.\0001\000\040\000S\000t\000a\000n\000d\000a\000r\000d\000i\000z\000a\000t\000i\000o\000n\000\040\000L\000a\000n\000d\000s\000c\000a\000p\000e}{chapter.1}% 2
|
||||
\BOOKMARK [1][-]{section.1.2}{\376\377\0001\000.\0002\000\040\000A\000c\000c\000e\000s\000s\000\040\000N\000e\000t\000w\000o\000r\000k\000s}{chapter.1}% 3
|
||||
\BOOKMARK [1][-]{section.1.3}{\376\377\0001\000.\0003\000\040\000M\000a\000n\000a\000g\000e\000d\000\040\000C\000l\000o\000u\000d\000\040\000S\000e\000r\000v\000i\000c\000e}{chapter.1}% 4
|
||||
\BOOKMARK [1][-]{section.1.4}{\376\377\0001\000.\0004\000\040\000B\000e\000y\000o\000n\000d\000\040\0005\000G}{chapter.1}% 5
|
||||
\BOOKMARK [0][-]{chapter.2}{\376\377\000C\000h\000a\000p\000t\000e\000r\000\040\0002\000:\000\040\000A\000r\000c\000h\000i\000t\000e\000c\000t\000u\000r\000e}{}% 6
|
||||
\BOOKMARK [1][-]{section.2.1}{\376\377\0002\000.\0001\000\040\000O\000v\000e\000r\000v\000i\000e\000w}{chapter.2}% 7
|
||||
\BOOKMARK [1][-]{section.2.2}{\376\377\0002\000.\0002\000\040\000R\000a\000d\000i\000o\000\040\000T\000r\000a\000n\000s\000m\000i\000s\000s\000i\000o\000n}{chapter.2}% 8
|
||||
\BOOKMARK [1][-]{section.2.3}{\376\377\0002\000.\0003\000\040\000R\000a\000d\000i\000o\000\040\000A\000c\000c\000e\000s\000s\000\040\000N\000e\000t\000w\000o\000r\000k}{chapter.2}% 9
|
||||
\BOOKMARK [1][-]{section.2.4}{\376\377\0002\000.\0004\000\040\000M\000o\000b\000i\000l\000e\000\040\000C\000o\000r\000e}{chapter.2}% 10
|
||||
\BOOKMARK [1][-]{section.2.5}{\376\377\0002\000.\0005\000\040\000M\000a\000n\000a\000g\000e\000d\000\040\000C\000l\000o\000u\000d\000\040\000S\000e\000r\000v\000i\000c\000e}{chapter.2}% 11
|
||||
\BOOKMARK [0][-]{chapter.3}{\376\377\000C\000h\000a\000p\000t\000e\000r\000\040\0003\000:\000\040\000R\000a\000d\000i\000o\000\040\000T\000r\000a\000n\000s\000m\000i\000s\000s\000i\000o\000n}{}% 12
|
||||
\BOOKMARK [1][-]{section.3.1}{\376\377\0003\000.\0001\000\040\000C\000o\000d\000i\000n\000g\000\040\000a\000n\000d\000\040\000M\000o\000d\000u\000l\000a\000t\000i\000o\000n}{chapter.3}% 13
|
||||
\BOOKMARK [1][-]{section.3.2}{\376\377\0003\000.\0002\000\040\000S\000c\000h\000e\000d\000u\000l\000e\000r}{chapter.3}% 14
|
||||
\BOOKMARK [2][-]{subsection.3.2.1}{\376\377\0003\000.\0002\000.\0001\000\040\000M\000u\000l\000t\000i\000p\000l\000e\000x\000i\000n\000g\000\040\000i\000n\000\040\0004\000G}{section.3.2}% 15
|
||||
\BOOKMARK [2][-]{subsection.3.2.2}{\376\377\0003\000.\0002\000.\0002\000\040\000M\000u\000l\000t\000i\000p\000l\000e\000x\000i\000n\000g\000\040\000i\000n\000\040\0005\000G}{section.3.2}% 16
|
||||
\BOOKMARK [1][-]{section.3.3}{\376\377\0003\000.\0003\000\040\000V\000i\000r\000t\000u\000a\000l\000i\000z\000e\000d\000\040\000S\000c\000h\000e\000d\000u\000l\000e\000r\000\040\000\050\000S\000l\000i\000c\000i\000n\000g\000\051}{chapter.3}% 17
|
||||
\BOOKMARK [1][-]{section.3.4}{\376\377\0003\000.\0004\000\040\000N\000e\000w\000\040\000U\000s\000e\000\040\000C\000a\000s\000e\000s}{chapter.3}% 18
|
||||
\BOOKMARK [0][-]{chapter.4}{\376\377\000C\000h\000a\000p\000t\000e\000r\000\040\0004\000:\000\040\000R\000a\000d\000i\000o\000\040\000A\000c\000c\000e\000s\000s\000\040\000N\000e\000t\000w\000o\000r\000k}{}% 19
|
||||
\BOOKMARK [1][-]{section.4.1}{\376\377\0004\000.\0001\000\040\000P\000a\000c\000k\000e\000t\000\040\000P\000r\000o\000c\000e\000s\000s\000i\000n\000g\000\040\000P\000i\000p\000e\000l\000i\000n\000e}{chapter.4}% 20
|
||||
\BOOKMARK [1][-]{section.4.2}{\376\377\0004\000.\0002\000\040\000S\000p\000l\000i\000t\000\040\000R\000A\000N}{chapter.4}% 21
|
||||
\BOOKMARK [1][-]{section.4.3}{\376\377\0004\000.\0003\000\040\000S\000o\000f\000t\000w\000a\000r\000e\000-\000D\000e\000f\000i\000n\000e\000d\000\040\000R\000A\000N}{chapter.4}% 22
|
||||
\BOOKMARK [1][-]{section.4.4}{\376\377\0004\000.\0004\000\040\000N\000e\000a\000r\000\040\000R\000e\000a\000l\000-\000T\000i\000m\000e\000\040\000R\000I\000C}{chapter.4}% 23
|
||||
\BOOKMARK [1][-]{section.4.5}{\376\377\0004\000.\0005\000\040\000C\000o\000n\000t\000r\000o\000l\000\040\000L\000o\000o\000p\000s}{chapter.4}% 24
|
||||
\BOOKMARK [0][-]{chapter.5}{\376\377\000C\000h\000a\000p\000t\000e\000r\000\040\0005\000:\000\040\000M\000o\000b\000i\000l\000e\000\040\000C\000o\000r\000e}{}% 25
|
||||
\BOOKMARK [1][-]{section.5.1}{\376\377\0005\000.\0001\000\040\000I\000d\000e\000n\000t\000i\000t\000y\000\040\000M\000a\000n\000a\000g\000e\000m\000e\000n\000t}{chapter.5}% 26
|
||||
\BOOKMARK [1][-]{section.5.2}{\376\377\0005\000.\0002\000\040\000F\000u\000n\000c\000t\000i\000o\000n\000a\000l\000\040\000C\000o\000m\000p\000o\000n\000e\000n\000t\000s}{chapter.5}% 27
|
||||
\BOOKMARK [1][-]{section.5.3}{\376\377\0005\000.\0003\000\040\000C\000o\000n\000t\000r\000o\000l\000\040\000P\000l\000a\000n\000e}{chapter.5}% 28
|
||||
\BOOKMARK [2][-]{subsection.5.3.1}{\376\377\0005\000.\0003\000.\0001\000\040\000S\000D\000-\000C\000o\000r\000e}{section.5.3}% 29
|
||||
\BOOKMARK [2][-]{subsection.5.3.2}{\376\377\0005\000.\0003\000.\0002\000\040\000M\000a\000g\000m\000a}{section.5.3}% 30
|
||||
\BOOKMARK [1][-]{section.5.4}{\376\377\0005\000.\0004\000\040\000U\000s\000e\000r\000\040\000P\000l\000a\000n\000e}{chapter.5}% 31
|
||||
\BOOKMARK [2][-]{subsection.5.4.1}{\376\377\0005\000.\0004\000.\0001\000\040\000M\000i\000c\000r\000o\000s\000e\000r\000v\000i\000c\000e\000\040\000I\000m\000p\000l\000e\000m\000e\000n\000t\000a\000t\000i\000o\000n}{section.5.4}% 32
|
||||
\BOOKMARK [2][-]{subsection.5.4.2}{\376\377\0005\000.\0004\000.\0002\000\040\000P\0004\000\040\000I\000m\000p\000l\000e\000m\000e\000n\000t\000a\000t\000i\000o\000n}{section.5.4}% 33
|
||||
\BOOKMARK [0][-]{chapter.6}{\376\377\000C\000h\000a\000p\000t\000e\000r\000\040\0006\000:\000\040\000M\000a\000n\000a\000g\000e\000d\000\040\000C\000l\000o\000u\000d\000\040\000S\000e\000r\000v\000i\000c\000e}{}% 34
|
||||
\BOOKMARK [1][-]{section.6.1}{\376\377\0006\000.\0001\000\040\000B\000u\000i\000l\000d\000i\000n\000g\000\040\000B\000l\000o\000c\000k\000s}{chapter.6}% 35
|
||||
\BOOKMARK [1][-]{section.6.2}{\376\377\0006\000.\0002\000\040\000E\000x\000a\000m\000p\000l\000e\000\040\000D\000e\000p\000l\000o\000y\000m\000e\000n\000t}{chapter.6}% 36
|
||||
\BOOKMARK [2][-]{subsection.6.2.1}{\376\377\0006\000.\0002\000.\0001\000\040\000E\000d\000g\000e\000\040\000C\000l\000o\000u\000d}{section.6.2}% 37
|
||||
\BOOKMARK [2][-]{subsection.6.2.2}{\376\377\0006\000.\0002\000.\0002\000\040\000H\000y\000b\000r\000i\000d\000\040\000C\000l\000o\000u\000d}{section.6.2}% 38
|
||||
\BOOKMARK [2][-]{subsection.6.2.3}{\376\377\0006\000.\0002\000.\0003\000\040\000S\000t\000a\000k\000e\000h\000o\000l\000d\000e\000r\000s}{section.6.2}% 39
|
||||
\BOOKMARK [2][-]{subsection.6.2.4}{\376\377\0006\000.\0002\000.\0004\000\040\000A\000l\000t\000e\000r\000n\000a\000t\000i\000v\000e\000\040\000C\000o\000n\000f\000i\000g\000u\000r\000a\000t\000i\000o\000n\000s}{section.6.2}% 40
|
||||
\BOOKMARK [1][-]{section.6.3}{\376\377\0006\000.\0003\000\040\000C\000l\000o\000u\000d\000\040\000M\000a\000n\000a\000g\000e\000m\000e\000n\000t\000\040\000P\000l\000a\000t\000f\000o\000r\000m}{chapter.6}% 41
|
||||
\BOOKMARK [2][-]{subsection.6.3.1}{\376\377\0006\000.\0003\000.\0001\000\040\000R\000e\000s\000o\000u\000r\000c\000e\000\040\000P\000r\000o\000v\000i\000s\000i\000o\000n\000i\000n\000g}{section.6.3}% 42
|
||||
\BOOKMARK [2][-]{subsection.6.3.2}{\376\377\0006\000.\0003\000.\0002\000\040\000L\000i\000f\000e\000c\000y\000c\000l\000e\000\040\000M\000a\000n\000a\000g\000e\000m\000e\000n\000t}{section.6.3}% 43
|
||||
\BOOKMARK [2][-]{subsection.6.3.3}{\376\377\0006\000.\0003\000.\0003\000\040\000S\000e\000r\000v\000i\000c\000e\000\040\000O\000r\000c\000h\000e\000s\000t\000r\000a\000t\000i\000o\000n}{section.6.3}% 44
|
||||
\BOOKMARK [2][-]{subsection.6.3.4}{\376\377\0006\000.\0003\000.\0004\000\040\000M\000o\000n\000i\000t\000o\000r\000i\000n\000g\000\040\000a\000n\000d\000\040\000T\000e\000l\000e\000m\000e\000t\000r\000y}{section.6.3}% 45
|
||||
\BOOKMARK [1][-]{section.6.4}{\376\377\0006\000.\0004\000\040\000C\000o\000n\000n\000e\000c\000t\000i\000v\000i\000t\000y\000\040\000A\000P\000I}{chapter.6}% 46
|
||||
\BOOKMARK [2][-]{subsection.6.4.1}{\376\377\0006\000.\0004\000.\0001\000\040\000E\000n\000t\000e\000r\000p\000r\000i\000s\000e\000s}{section.6.4}% 47
|
||||
\BOOKMARK [2][-]{subsection.6.4.2}{\376\377\0006\000.\0004\000.\0002\000\040\000S\000l\000i\000c\000e\000s}{section.6.4}% 48
|
||||
\BOOKMARK [2][-]{subsection.6.4.3}{\376\377\0006\000.\0004\000.\0003\000\040\000Q\000o\000S\000\040\000P\000r\000o\000f\000i\000l\000e\000s}{section.6.4}% 49
|
||||
\BOOKMARK [2][-]{subsection.6.4.4}{\376\377\0006\000.\0004\000.\0004\000\040\000O\000t\000h\000e\000r\000\040\000M\000o\000d\000e\000l\000s}{section.6.4}% 50
|
||||
\BOOKMARK [0][-]{chapter.7}{\376\377\000A\000b\000o\000u\000t\000\040\000T\000h\000e\000\040\000B\000o\000o\000k}{}% 51
|
||||
\BOOKMARK [1][-]{section.7.1}{\376\377\000R\000e\000a\000d\000\040\000t\000h\000e\000\040\000B\000o\000o\000k}{chapter.7}% 52
|
||||
\BOOKMARK [1][-]{section.7.2}{\376\377\000B\000u\000i\000l\000d\000\040\000t\000h\000e\000\040\000B\000o\000o\000k}{chapter.7}% 53
|
||||
\BOOKMARK [1][-]{section.7.3}{\376\377\000C\000o\000n\000t\000r\000i\000b\000u\000t\000e\000\040\000t\000o\000\040\000t\000h\000e\000\040\000B\000o\000o\000k}{chapter.7}% 54
|
||||
\BOOKMARK [0][-]{chapter.8}{\376\377\000A\000b\000o\000u\000t\000\040\000T\000h\000e\000\040\000A\000u\000t\000h\000o\000r\000s}{}% 55
|
@ -0,0 +1,56 @@
|
||||
\babel@toc {english}{}\relax
|
||||
\contentsline {chapter}{\numberline {1}Chapter 1: Introduction}{5}{chapter.1}%
|
||||
\contentsline {section}{\numberline {1.1}1.1 Standardization Landscape}{6}{section.1.1}%
|
||||
\contentsline {section}{\numberline {1.2}1.2 Access Networks}{7}{section.1.2}%
|
||||
\contentsline {section}{\numberline {1.3}1.3 Managed Cloud Service}{8}{section.1.3}%
|
||||
\contentsline {section}{\numberline {1.4}1.4 Beyond 5G}{11}{section.1.4}%
|
||||
\contentsline {chapter}{\numberline {2}Chapter 2: Architecture}{13}{chapter.2}%
|
||||
\contentsline {section}{\numberline {2.1}2.1 Overview}{13}{section.2.1}%
|
||||
\contentsline {section}{\numberline {2.2}2.2 Radio Transmission}{16}{section.2.2}%
|
||||
\contentsline {section}{\numberline {2.3}2.3 Radio Access Network}{17}{section.2.3}%
|
||||
\contentsline {section}{\numberline {2.4}2.4 Mobile Core}{20}{section.2.4}%
|
||||
\contentsline {section}{\numberline {2.5}2.5 Managed Cloud Service}{23}{section.2.5}%
|
||||
\contentsline {chapter}{\numberline {3}Chapter 3: Radio Transmission}{25}{chapter.3}%
|
||||
\contentsline {section}{\numberline {3.1}3.1 Coding and Modulation}{25}{section.3.1}%
|
||||
\contentsline {section}{\numberline {3.2}3.2 Scheduler}{27}{section.3.2}%
|
||||
\contentsline {subsection}{\numberline {3.2.1}3.2.1 Multiplexing in 4G}{28}{subsection.3.2.1}%
|
||||
\contentsline {subsection}{\numberline {3.2.2}3.2.2 Multiplexing in 5G}{29}{subsection.3.2.2}%
|
||||
\contentsline {section}{\numberline {3.3}3.3 Virtualized Scheduler (Slicing)}{31}{section.3.3}%
|
||||
\contentsline {section}{\numberline {3.4}3.4 New Use Cases}{32}{section.3.4}%
|
||||
\contentsline {chapter}{\numberline {4}Chapter 4: Radio Access Network}{35}{chapter.4}%
|
||||
\contentsline {section}{\numberline {4.1}4.1 Packet Processing Pipeline}{35}{section.4.1}%
|
||||
\contentsline {section}{\numberline {4.2}4.2 Split RAN}{36}{section.4.2}%
|
||||
\contentsline {section}{\numberline {4.3}4.3 Software\sphinxhyphen {}Defined RAN}{39}{section.4.3}%
|
||||
\contentsline {section}{\numberline {4.4}4.4 Near Real\sphinxhyphen {}Time RIC}{42}{section.4.4}%
|
||||
\contentsline {section}{\numberline {4.5}4.5 Control Loops}{44}{section.4.5}%
|
||||
\contentsline {chapter}{\numberline {5}Chapter 5: Mobile Core}{47}{chapter.5}%
|
||||
\contentsline {section}{\numberline {5.1}5.1 Identity Management}{47}{section.5.1}%
|
||||
\contentsline {section}{\numberline {5.2}5.2 Functional Components}{49}{section.5.2}%
|
||||
\contentsline {section}{\numberline {5.3}5.3 Control Plane}{51}{section.5.3}%
|
||||
\contentsline {subsection}{\numberline {5.3.1}5.3.1 SD\sphinxhyphen {}Core}{51}{subsection.5.3.1}%
|
||||
\contentsline {subsection}{\numberline {5.3.2}5.3.2 Magma}{52}{subsection.5.3.2}%
|
||||
\contentsline {section}{\numberline {5.4}5.4 User Plane}{56}{section.5.4}%
|
||||
\contentsline {subsection}{\numberline {5.4.1}5.4.1 Microservice Implementation}{57}{subsection.5.4.1}%
|
||||
\contentsline {subsection}{\numberline {5.4.2}5.4.2 P4 Implementation}{57}{subsection.5.4.2}%
|
||||
\contentsline {chapter}{\numberline {6}Chapter 6: Managed Cloud Service}{61}{chapter.6}%
|
||||
\contentsline {section}{\numberline {6.1}6.1 Building Blocks}{61}{section.6.1}%
|
||||
\contentsline {section}{\numberline {6.2}6.2 Example Deployment}{64}{section.6.2}%
|
||||
\contentsline {subsection}{\numberline {6.2.1}6.2.1 Edge Cloud}{64}{subsection.6.2.1}%
|
||||
\contentsline {subsection}{\numberline {6.2.2}6.2.2 Hybrid Cloud}{65}{subsection.6.2.2}%
|
||||
\contentsline {subsection}{\numberline {6.2.3}6.2.3 Stakeholders}{66}{subsection.6.2.3}%
|
||||
\contentsline {subsection}{\numberline {6.2.4}6.2.4 Alternative Configurations}{66}{subsection.6.2.4}%
|
||||
\contentsline {section}{\numberline {6.3}6.3 Cloud Management Platform}{67}{section.6.3}%
|
||||
\contentsline {subsection}{\numberline {6.3.1}6.3.1 Resource Provisioning}{69}{subsection.6.3.1}%
|
||||
\contentsline {subsection}{\numberline {6.3.2}6.3.2 Lifecycle Management}{70}{subsection.6.3.2}%
|
||||
\contentsline {subsection}{\numberline {6.3.3}6.3.3 Service Orchestration}{71}{subsection.6.3.3}%
|
||||
\contentsline {subsection}{\numberline {6.3.4}6.3.4 Monitoring and Telemetry}{73}{subsection.6.3.4}%
|
||||
\contentsline {section}{\numberline {6.4}6.4 Connectivity API}{74}{section.6.4}%
|
||||
\contentsline {subsection}{\numberline {6.4.1}6.4.1 Enterprises}{74}{subsection.6.4.1}%
|
||||
\contentsline {subsection}{\numberline {6.4.2}6.4.2 Slices}{75}{subsection.6.4.2}%
|
||||
\contentsline {subsection}{\numberline {6.4.3}6.4.3 QoS Profiles}{76}{subsection.6.4.3}%
|
||||
\contentsline {subsection}{\numberline {6.4.4}6.4.4 Other Models}{77}{subsection.6.4.4}%
|
||||
\contentsline {chapter}{\numberline {7}About The Book}{79}{chapter.7}%
|
||||
\contentsline {section}{\numberline {7.1}Read the Book}{80}{section.7.1}%
|
||||
\contentsline {section}{\numberline {7.2}Build the Book}{80}{section.7.2}%
|
||||
\contentsline {section}{\numberline {7.3}Contribute to the Book}{80}{section.7.3}%
|
||||
\contentsline {chapter}{\numberline {8}About The Authors}{81}{chapter.8}%
|
@ -0,0 +1,22 @@
|
||||
$latex = 'pdflatex ' . $ENV{'LATEXOPTS'} . ' -kanji=utf8 %O %S';
|
||||
$dvipdf = 'dvipdfmx %O -o %D %S';
|
||||
$makeindex = 'internal mendex %S %B %D';
|
||||
sub mendex {
|
||||
my ($source, $basename, $destination) = @_;
|
||||
my $dictfile = $basename . ".dic";
|
||||
unlink($destination);
|
||||
system("mendex", "-U", "-f", "-d", $dictfile, "-s", "python.ist", $source);
|
||||
if ($? > 0) {
|
||||
print("mendex exited with error code $? (ignored)\n");
|
||||
}
|
||||
if (!-e $destination) {
|
||||
# create an empty .ind file if nothing
|
||||
open(FH, ">" . $destination);
|
||||
close(FH);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
add_cus_dep( "glo", "gls", 0, "makeglo" );
|
||||
sub makeglo {
|
||||
return system( "mendex -J -f -s gglo.ist -o '$_[0].gls' '$_[0].glo'" );
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
$latex = 'latex ' . $ENV{'LATEXOPTS'} . ' %O %S';
|
||||
$pdflatex = 'pdflatex ' . $ENV{'LATEXOPTS'} . ' %O %S';
|
||||
$lualatex = 'lualatex ' . $ENV{'LATEXOPTS'} . ' %O %S';
|
||||
$xelatex = 'xelatex --no-pdf ' . $ENV{'LATEXOPTS'} . ' %O %S';
|
||||
$makeindex = 'makeindex -s python.ist %O -o %D %S';
|
||||
add_cus_dep( "glo", "gls", 0, "makeglo" );
|
||||
sub makeglo {
|
||||
return system( "makeindex -s gglo.ist -o '$_[0].gls' '$_[0].glo'" );
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
@ECHO OFF
|
||||
|
||||
REM Command file for Sphinx documentation
|
||||
|
||||
pushd %~dp0
|
||||
|
||||
set PDFLATEX=latexmk -pdf -dvi- -ps-
|
||||
|
||||
set "LATEXOPTS= "
|
||||
|
||||
if "%1" == "" goto all-pdf
|
||||
|
||||
if "%1" == "all-pdf" (
|
||||
:all-pdf
|
||||
for %%i in (*.tex) do (
|
||||
%PDFLATEX% %LATEXMKOPTS% %%i
|
||||
)
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "all-pdf-ja" (
|
||||
goto all-pdf
|
||||
)
|
||||
|
||||
if "%1" == "clean" (
|
||||
del /q /s *.dvi *.log *.ind *.aux *.toc *.syn *.idx *.out *.ilg *.pla *.ps *.tar *.tar.gz *.tar.bz2 *.tar.xz *.fls *.fdb_latexmk
|
||||
goto end
|
||||
)
|
||||
|
||||
:end
|
||||
popd
|
After Width: | Height: | Size: 119 KiB |
After Width: | Height: | Size: 101 KiB |
@ -0,0 +1,16 @@
|
||||
line_max 100
|
||||
headings_flag 1
|
||||
heading_prefix " \\bigletter "
|
||||
|
||||
preamble "\\begin{sphinxtheindex}
|
||||
\\let\\bigletter\\sphinxstyleindexlettergroup
|
||||
\\let\\spxpagem \\sphinxstyleindexpagemain
|
||||
\\let\\spxentry \\sphinxstyleindexentry
|
||||
\\let\\spxextra \\sphinxstyleindexextra
|
||||
|
||||
"
|
||||
|
||||
postamble "\n\n\\end{sphinxtheindex}\n"
|
||||
|
||||
symhead_positive "{\\sphinxsymbolsname}"
|
||||
numhead_positive "{\\sphinxnumbersname}"
|
@ -0,0 +1,351 @@
|
||||
%
|
||||
% sphinx.sty
|
||||
%
|
||||
% Adapted from the old python.sty, mostly written by Fred Drake,
|
||||
% by Georg Brandl.
|
||||
%
|
||||
|
||||
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
|
||||
\ProvidesPackage{sphinx}[2021/01/27 v4.0.0 LaTeX package (Sphinx markup)]
|
||||
|
||||
% 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}
|
||||
|
||||
%% 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
|
||||
}}
|
||||
|
||||
|
||||
%% OPTION HANDLING
|
||||
%
|
||||
|
||||
% We first handle options then load packages, but we need \definecolor from
|
||||
% xcolor/color.
|
||||
|
||||
% FIXME: we should \RequirePackage{xcolor} always now
|
||||
% The xcolor package draws better fcolorboxes around verbatim code
|
||||
\IfFileExists{xcolor.sty}{
|
||||
\RequirePackage{xcolor}
|
||||
}{
|
||||
\RequirePackage{color}
|
||||
}
|
||||
|
||||
% 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}
|
||||
\define@key{sphinx}{bookmarksdepth}{\AtBeginDocument{\hypersetup{bookmarksdepth=#1}}}
|
||||
\AtBeginDocument{\define@key{sphinx}{bookmarksdepth}{\hypersetup{bookmarksdepth=#1}}}
|
||||
% \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 explicitly. 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[false]{verbatimforcewraps}
|
||||
\DeclareStringOption[3]{verbatimmaxoverfull}
|
||||
\DeclareStringOption[100]{verbatimmaxunderfull}
|
||||
\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}
|
||||
% FIXME: this is unrelated to an option, move this elsewhere
|
||||
% To allow hyphenation of first word in narrow contexts; no option,
|
||||
% customization to be done via 'preamble' key
|
||||
\newcommand*\sphinxAtStartPar{\leavevmode\nobreak\hskip\z@skip}
|
||||
% No need for the \hspace{0pt} trick (\hskip\z@skip) with luatex
|
||||
\ifdefined\directlua\let\sphinxAtStartPar\@empty\fi
|
||||
% user interface: options can be changed midway in a document!
|
||||
\newcommand\sphinxsetup[1]{\setkeys{sphinx}{#1}}
|
||||
|
||||
|
||||
%% MISCELLANEOUS CONTEXT
|
||||
%
|
||||
% flag to be set in a framed environment
|
||||
% (defined here as currently needed by three sphinxlatex....sty files and
|
||||
% even if not needed if such files are replaced, the definition does no harm)
|
||||
\newif\ifspx@inframed
|
||||
%
|
||||
% \spx@ifcaptionpackage (defined at begin document)
|
||||
% is needed currently in macros from:
|
||||
% sphinxlatexliterals.sty (sphinxVerbatim)
|
||||
% sphinxlatextables.sty (for some macros used in the table templates)
|
||||
%
|
||||
% \sphinxcaption is mark-up injected by the tabular and tabulary templates
|
||||
% it is defined in sphinxlatextables.sty
|
||||
%
|
||||
% store the original \caption macro for usage with figures inside longtable
|
||||
% and tabulary cells. Make sure we get the final \caption in presence of
|
||||
% caption package, whether the latter was loaded before or after sphinx.
|
||||
\AtBeginDocument{%
|
||||
\let\spx@originalcaption\caption
|
||||
\@ifpackageloaded{caption}
|
||||
{\let\spx@ifcaptionpackage\@firstoftwo
|
||||
\caption@AtBeginDocument*{\let\spx@originalcaption\caption}%
|
||||
% in presence of caption package, drop our own \sphinxcaption whose aim was to
|
||||
% ensure same width of caption to all kinds of tables (tabular(y), longtable),
|
||||
% because caption package has its own width (or margin) option
|
||||
\def\sphinxcaption{\caption}%
|
||||
}%
|
||||
{\let\spx@ifcaptionpackage\@secondoftwo}%
|
||||
}
|
||||
|
||||
%% PASS OPTIONS
|
||||
%
|
||||
% pass options to hyperref; it must not have been loaded already
|
||||
\input{sphinxoptionshyperref.sty}
|
||||
% pass options to geometry; it must not have been loaded already
|
||||
\input{sphinxoptionsgeometry.sty}
|
||||
|
||||
|
||||
%% COLOR (general)
|
||||
%
|
||||
% FIXME: these two should be deprecated
|
||||
%
|
||||
% FIXME: \normalcolor should be used and \py@NormalColor never defined
|
||||
\def\py@NormalColor{\color{black}}
|
||||
% FIXME: \color{TitleColor} should be used directly and \py@TitleColor
|
||||
% should never get defined.
|
||||
\def\py@TitleColor{\color{TitleColor}}
|
||||
|
||||
|
||||
%% PACKAGES
|
||||
%
|
||||
% as will be indicated below, secondary style files load some more packages
|
||||
%
|
||||
% For \text macro (sphinx.util.texescape)
|
||||
% also for usage of \firstchoice@true(false) in sphinxlatexgraphics.sty
|
||||
\RequirePackage{amstext}
|
||||
% It was passed "warn" option from latex template in case it is already loaded
|
||||
% via some other package before \usepackage{sphinx} in preamble
|
||||
\RequirePackage{textcomp}
|
||||
% 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}
|
||||
% Provides \captionof, used once by latex writer (\captionof{figure})
|
||||
\RequirePackage{capt-of}
|
||||
% Support hlist directive
|
||||
\RequirePackage{multicol}
|
||||
|
||||
|
||||
%% GRAPHICS
|
||||
%
|
||||
% It will always be needed, so let's load it here
|
||||
\RequirePackage{graphicx}
|
||||
\input{sphinxlatexgraphics.sty}
|
||||
|
||||
|
||||
%% FRAMED ENVIRONMENTS
|
||||
%
|
||||
\input{sphinxlatexadmonitions.sty}
|
||||
\input{sphinxlatexliterals.sty}
|
||||
\input{sphinxlatexshadowbox.sty}
|
||||
|
||||
|
||||
%% CONTAINERS
|
||||
%
|
||||
\input{sphinxlatexcontainers.sty}
|
||||
|
||||
|
||||
%% PYGMENTS
|
||||
% stylesheet for highlighting with pygments
|
||||
\RequirePackage{sphinxhighlight}
|
||||
|
||||
|
||||
%% TABLES
|
||||
%
|
||||
\input{sphinxlatextables.sty}
|
||||
|
||||
|
||||
%% NUMBERING OF FIGURES, TABLES, AND LITERAL BLOCKS
|
||||
%
|
||||
\input{sphinxlatexnumfig.sty}
|
||||
|
||||
|
||||
%% LISTS
|
||||
%
|
||||
\input{sphinxlatexlists.sty}
|
||||
|
||||
|
||||
%% FOOTNOTES
|
||||
%
|
||||
% Support scopes for footnote numbering
|
||||
\newcounter{sphinxscope}
|
||||
\newcommand{\sphinxstepscope}{\stepcounter{sphinxscope}}
|
||||
% Explicitly numbered footnotes may be referred to, and for this to be
|
||||
% clickable we need to have only one target. So we will step this at each
|
||||
% explicit footnote and let \thesphinxscope take it into account
|
||||
\newcounter{sphinxexplicit}
|
||||
\newcommand{\sphinxstepexplicit}{\stepcounter{sphinxexplicit}}
|
||||
% Some babel/polyglossia languages fiddle with \@arabic, so let's be extra
|
||||
% cautious and redefine \thesphinxscope with \number not \@arabic.
|
||||
% Memo: we expect some subtle redefinition of \thesphinxscope to be a part of page
|
||||
% scoping for footnotes, when we shall implement it.
|
||||
\renewcommand{\thesphinxscope}{\number\value{sphinxscope}.\number\value{sphinxexplicit}}
|
||||
\newcommand\sphinxthefootnotemark[2]{%
|
||||
% this is used to make reference to an explicitly numbered footnote not on same page
|
||||
% #1=label of footnote text, #2=page number where footnote text was printed
|
||||
\ifdefined\pagename
|
||||
\pagename\space#2, % <- space
|
||||
\else
|
||||
p. #2, % <- space
|
||||
\fi #1% no space
|
||||
}
|
||||
% support large numbered footnotes in minipage; but this is now obsolete
|
||||
% from systematic use of savenotes environment around minipages
|
||||
\def\thempfootnote{\arabic{mpfootnote}}
|
||||
% This package is needed to support hyperlinked footnotes in tables and
|
||||
% framed contents, and to allow code-blocks in footnotes.
|
||||
\RequirePackage{sphinxpackagefootnote}
|
||||
|
||||
|
||||
%% INDEX, BIBLIOGRAPHY, APPENDIX, TABLE OF CONTENTS
|
||||
%
|
||||
\input{sphinxlatexindbibtoc.sty}
|
||||
|
||||
|
||||
%% STYLING
|
||||
%
|
||||
\input{sphinxlatexstylepage.sty}
|
||||
\input{sphinxlatexstyleheadings.sty}
|
||||
\input{sphinxlatexstyletext.sty}
|
||||
|
||||
|
||||
%% MODULE RELEASE DATA AND OBJECT DESCRIPTIONS
|
||||
%
|
||||
\input{sphinxlatexobjects.sty}
|
||||
|
||||
|
||||
% FIXME: this line should be dropped, as "9" is default anyhow.
|
||||
\ifdefined\pdfcompresslevel\pdfcompresslevel = 9 \fi
|
||||
|
||||
|
||||
\endinput
|
@ -0,0 +1,107 @@
|
||||
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
|
||||
\ProvidesPackage{sphinxhighlight}[2016/05/29 stylesheet for highlighting with pygments]
|
||||
% Its contents depend on pygments_style configuration variable.
|
||||
|
||||
|
||||
\makeatletter
|
||||
\def\PYG@reset{\let\PYG@it=\relax \let\PYG@bf=\relax%
|
||||
\let\PYG@ul=\relax \let\PYG@tc=\relax%
|
||||
\let\PYG@bc=\relax \let\PYG@ff=\relax}
|
||||
\def\PYG@tok#1{\csname PYG@tok@#1\endcsname}
|
||||
\def\PYG@toks#1+{\ifx\relax#1\empty\else%
|
||||
\PYG@tok{#1}\expandafter\PYG@toks\fi}
|
||||
\def\PYG@do#1{\PYG@bc{\PYG@tc{\PYG@ul{%
|
||||
\PYG@it{\PYG@bf{\PYG@ff{#1}}}}}}}
|
||||
\def\PYG#1#2{\PYG@reset\PYG@toks#1+\relax+\PYG@do{#2}}
|
||||
|
||||
\@namedef{PYG@tok@w}{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.73,0.73}{##1}}}
|
||||
\@namedef{PYG@tok@c}{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}}
|
||||
\@namedef{PYG@tok@cp}{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
|
||||
\@namedef{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}}}}
|
||||
\@namedef{PYG@tok@k}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
|
||||
\@namedef{PYG@tok@kp}{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
|
||||
\@namedef{PYG@tok@kt}{\def\PYG@tc##1{\textcolor[rgb]{0.56,0.13,0.00}{##1}}}
|
||||
\@namedef{PYG@tok@o}{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\@namedef{PYG@tok@ow}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
|
||||
\@namedef{PYG@tok@nb}{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
|
||||
\@namedef{PYG@tok@nf}{\def\PYG@tc##1{\textcolor[rgb]{0.02,0.16,0.49}{##1}}}
|
||||
\@namedef{PYG@tok@nc}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.05,0.52,0.71}{##1}}}
|
||||
\@namedef{PYG@tok@nn}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.05,0.52,0.71}{##1}}}
|
||||
\@namedef{PYG@tok@ne}{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
|
||||
\@namedef{PYG@tok@nv}{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.38,0.84}{##1}}}
|
||||
\@namedef{PYG@tok@no}{\def\PYG@tc##1{\textcolor[rgb]{0.38,0.68,0.84}{##1}}}
|
||||
\@namedef{PYG@tok@nl}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.13,0.44}{##1}}}
|
||||
\@namedef{PYG@tok@ni}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.84,0.33,0.22}{##1}}}
|
||||
\@namedef{PYG@tok@na}{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
|
||||
\@namedef{PYG@tok@nt}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.02,0.16,0.45}{##1}}}
|
||||
\@namedef{PYG@tok@nd}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.33,0.33,0.33}{##1}}}
|
||||
\@namedef{PYG@tok@s}{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
|
||||
\@namedef{PYG@tok@sd}{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
|
||||
\@namedef{PYG@tok@si}{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.44,0.63,0.82}{##1}}}
|
||||
\@namedef{PYG@tok@se}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
|
||||
\@namedef{PYG@tok@sr}{\def\PYG@tc##1{\textcolor[rgb]{0.14,0.33,0.53}{##1}}}
|
||||
\@namedef{PYG@tok@ss}{\def\PYG@tc##1{\textcolor[rgb]{0.32,0.47,0.09}{##1}}}
|
||||
\@namedef{PYG@tok@sx}{\def\PYG@tc##1{\textcolor[rgb]{0.78,0.36,0.04}{##1}}}
|
||||
\@namedef{PYG@tok@m}{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
|
||||
\@namedef{PYG@tok@gh}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}
|
||||
\@namedef{PYG@tok@gu}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.50,0.00,0.50}{##1}}}
|
||||
\@namedef{PYG@tok@gd}{\def\PYG@tc##1{\textcolor[rgb]{0.63,0.00,0.00}{##1}}}
|
||||
\@namedef{PYG@tok@gi}{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.63,0.00}{##1}}}
|
||||
\@namedef{PYG@tok@gr}{\def\PYG@tc##1{\textcolor[rgb]{1.00,0.00,0.00}{##1}}}
|
||||
\@namedef{PYG@tok@ge}{\let\PYG@it=\textit}
|
||||
\@namedef{PYG@tok@gs}{\let\PYG@bf=\textbf}
|
||||
\@namedef{PYG@tok@ges}{\let\PYG@bf=\textbf\let\PYG@it=\textit}
|
||||
\@namedef{PYG@tok@gp}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.78,0.36,0.04}{##1}}}
|
||||
\@namedef{PYG@tok@go}{\def\PYG@tc##1{\textcolor[rgb]{0.20,0.20,0.20}{##1}}}
|
||||
\@namedef{PYG@tok@gt}{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.27,0.87}{##1}}}
|
||||
\@namedef{PYG@tok@err}{\def\PYG@bc##1{{\setlength{\fboxsep}{\string -\fboxrule}\fcolorbox[rgb]{1.00,0.00,0.00}{1,1,1}{\strut ##1}}}}
|
||||
\@namedef{PYG@tok@kc}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
|
||||
\@namedef{PYG@tok@kd}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
|
||||
\@namedef{PYG@tok@kn}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
|
||||
\@namedef{PYG@tok@kr}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
|
||||
\@namedef{PYG@tok@bp}{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
|
||||
\@namedef{PYG@tok@fm}{\def\PYG@tc##1{\textcolor[rgb]{0.02,0.16,0.49}{##1}}}
|
||||
\@namedef{PYG@tok@vc}{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.38,0.84}{##1}}}
|
||||
\@namedef{PYG@tok@vg}{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.38,0.84}{##1}}}
|
||||
\@namedef{PYG@tok@vi}{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.38,0.84}{##1}}}
|
||||
\@namedef{PYG@tok@vm}{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.38,0.84}{##1}}}
|
||||
\@namedef{PYG@tok@sa}{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
|
||||
\@namedef{PYG@tok@sb}{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
|
||||
\@namedef{PYG@tok@sc}{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
|
||||
\@namedef{PYG@tok@dl}{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
|
||||
\@namedef{PYG@tok@s2}{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
|
||||
\@namedef{PYG@tok@sh}{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
|
||||
\@namedef{PYG@tok@s1}{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
|
||||
\@namedef{PYG@tok@mb}{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
|
||||
\@namedef{PYG@tok@mf}{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
|
||||
\@namedef{PYG@tok@mh}{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
|
||||
\@namedef{PYG@tok@mi}{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
|
||||
\@namedef{PYG@tok@il}{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
|
||||
\@namedef{PYG@tok@mo}{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
|
||||
\@namedef{PYG@tok@ch}{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}}
|
||||
\@namedef{PYG@tok@cm}{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}}
|
||||
\@namedef{PYG@tok@cpf}{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}}
|
||||
\@namedef{PYG@tok@c1}{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}}
|
||||
|
||||
\def\PYGZbs{\char`\\}
|
||||
\def\PYGZus{\char`\_}
|
||||
\def\PYGZob{\char`\{}
|
||||
\def\PYGZcb{\char`\}}
|
||||
\def\PYGZca{\char`\^}
|
||||
\def\PYGZam{\char`\&}
|
||||
\def\PYGZlt{\char`\<}
|
||||
\def\PYGZgt{\char`\>}
|
||||
\def\PYGZsh{\char`\#}
|
||||
\def\PYGZpc{\char`\%}
|
||||
\def\PYGZdl{\char`\$}
|
||||
\def\PYGZhy{\char`\-}
|
||||
\def\PYGZsq{\char`\'}
|
||||
\def\PYGZdq{\char`\"}
|
||||
\def\PYGZti{\char`\~}
|
||||
% for compatibility with earlier versions
|
||||
\def\PYGZat{@}
|
||||
\def\PYGZlb{[}
|
||||
\def\PYGZrb{]}
|
||||
\makeatother
|
||||
|
||||
\renewcommand\PYGZsq{\textquotesingle}
|
@ -0,0 +1,102 @@
|
||||
%
|
||||
% sphinxhowto.cls for Sphinx (https://www.sphinx-doc.org/)
|
||||
%
|
||||
|
||||
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
|
||||
\ProvidesClass{sphinxhowto}[2019/12/01 v2.3.0 Document class (Sphinx howto)]
|
||||
|
||||
% 'oneside' option overriding the 'twoside' default
|
||||
\newif\if@oneside
|
||||
\DeclareOption{oneside}{\@onesidetrue}
|
||||
% Pass remaining document options to the parent class.
|
||||
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\sphinxdocclass}}
|
||||
\ProcessOptions\relax
|
||||
|
||||
% Default to two-side document
|
||||
\if@oneside
|
||||
% nothing to do (oneside is the default)
|
||||
\else
|
||||
\PassOptionsToClass{twoside}{\sphinxdocclass}
|
||||
\fi
|
||||
|
||||
\LoadClass{\sphinxdocclass}
|
||||
|
||||
% Set some sane defaults for section numbering depth and TOC depth. You can
|
||||
% reset these counters in your preamble.
|
||||
%
|
||||
\setcounter{secnumdepth}{2}
|
||||
\setcounter{tocdepth}{2}% i.e. section and subsection
|
||||
|
||||
% Adapt \and command to the flushright context of \sphinxmaketitle, to
|
||||
% avoid ragged line endings if author names do not fit all on one single line
|
||||
\DeclareRobustCommand{\and}{%
|
||||
\end{tabular}\kern-\tabcolsep
|
||||
\allowbreak
|
||||
\hskip\dimexpr1em+\tabcolsep\@plus.17fil\begin{tabular}[t]{c}%
|
||||
}%
|
||||
% If it is desired that each author name be on its own line, use in preamble:
|
||||
%\DeclareRobustCommand{\and}{%
|
||||
% \end{tabular}\kern-\tabcolsep\\\begin{tabular}[t]{c}%
|
||||
%}%
|
||||
% Change the title page to look a bit better, and fit in with the fncychap
|
||||
% ``Bjarne'' style a bit better.
|
||||
%
|
||||
\newcommand{\sphinxmaketitle}{%
|
||||
\noindent\rule{\textwidth}{1pt}\par
|
||||
\begingroup % for PDF information dictionary
|
||||
\def\endgraf{ }\def\and{\& }%
|
||||
\pdfstringdefDisableCommands{\def\\{, }}% overwrite hyperref setup
|
||||
\hypersetup{pdfauthor={\@author}, pdftitle={\@title}}%
|
||||
\endgroup
|
||||
\begin{flushright}
|
||||
\sphinxlogo
|
||||
\py@HeaderFamily
|
||||
{\Huge \@title }\par
|
||||
{\itshape\large \py@release \releaseinfo}\par
|
||||
\vspace{25pt}
|
||||
{\Large
|
||||
\begin{tabular}[t]{c}
|
||||
\@author
|
||||
\end{tabular}\kern-\tabcolsep}\par
|
||||
\vspace{25pt}
|
||||
\@date \par
|
||||
\py@authoraddress \par
|
||||
\end{flushright}
|
||||
\@thanks
|
||||
\setcounter{footnote}{0}
|
||||
\let\thanks\relax\let\maketitle\relax
|
||||
%\gdef\@thanks{}\gdef\@author{}\gdef\@title{}
|
||||
}
|
||||
|
||||
\newcommand{\sphinxtableofcontents}{%
|
||||
\begingroup
|
||||
\parskip \z@skip
|
||||
\sphinxtableofcontentshook
|
||||
\tableofcontents
|
||||
\endgroup
|
||||
\noindent\rule{\textwidth}{1pt}\par
|
||||
\vspace{12pt}%
|
||||
}
|
||||
\newcommand\sphinxtableofcontentshook{}
|
||||
\pagenumbering{arabic}
|
||||
|
||||
% 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}}}
|
@ -0,0 +1,148 @@
|
||||
%% NOTICES AND ADMONITIONS
|
||||
%
|
||||
% change this info string if making any custom modification
|
||||
\ProvidesFile{sphinxlatexadmonitions.sty}[2021/01/27 admonitions]
|
||||
|
||||
% Provides support for this output mark-up from Sphinx latex writer:
|
||||
%
|
||||
% - sphinxadmonition (environment)
|
||||
% This is a dispatch supporting
|
||||
%
|
||||
% - note, hint, important, tip (via sphinxlightbox)
|
||||
% - warning, caution, attention, danger, error (via sphinxheavybox)
|
||||
%
|
||||
% Each sphinx<notice name> environment can be redefined by user.
|
||||
% The defaults are customizable via various colour and dimension
|
||||
% settings, cf sphinx docs (latex customization).
|
||||
%
|
||||
% Requires:
|
||||
\RequirePackage{framed}% used by sphinxheavybox
|
||||
%
|
||||
% Dependencies (they do not need to be defined at time of loading):
|
||||
% - of course the various colour and dimension options handled via sphinx.sty
|
||||
% - \sphinxstrong (for sphinxlightbox and sphinxheavybox)
|
||||
% - dimension register \spx@image@maxheight from sphinxlatexgraphics.sty
|
||||
% - \savenotes/\spewnotes from sphinxpackagefootnote (for sphinxheavybox)
|
||||
|
||||
% Provides: (also in sphinxlatexliterals.sty)
|
||||
\providecommand*\sphinxvspacefixafterfrenchlists{%
|
||||
\ifvmode\ifdim\lastskip<\z@ \vskip\parskip\fi\else\par\fi
|
||||
}
|
||||
|
||||
% Some are quite plain
|
||||
% the spx@notice@bordercolor etc are set in the sphinxadmonition environment
|
||||
\newenvironment{sphinxlightbox}{%
|
||||
\par
|
||||
\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}
|
||||
\advance\spx@image@maxheight
|
||||
-\dimexpr2\FrameRule
|
||||
+2\FrameSep
|
||||
+\baselineskip\relax % will happen again if nested, needed indeed!
|
||||
% 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}
|
||||
|
||||
\endinput
|
@ -0,0 +1,22 @@
|
||||
%% CONTAINER DIRECTIVES
|
||||
%
|
||||
% change this info string if making any custom modification
|
||||
\ProvidesFile{sphinxlatexcontainers.sty}[2021/05/03 containers]
|
||||
|
||||
% The purpose of this file is to provide a dummy environment sphinxclass which
|
||||
% will be inserted for each class in each container directive. The class name
|
||||
% will be passed as the argument to the environment.
|
||||
%
|
||||
% For a class foo, the user can define customised handling of that class by
|
||||
% defining the sphinxclassfoo LaTeX environment.
|
||||
|
||||
\newenvironment{sphinxuseclass}[1]{%
|
||||
\def\sphinxClassFunctionName{sphinxclass#1}%
|
||||
\ltx@ifundefined{\sphinxClassFunctionName}%
|
||||
{}% undefined so do nothing
|
||||
{\expandafter\begin\expandafter{\sphinxClassFunctionName}}%
|
||||
}{%
|
||||
\ltx@ifundefined{\sphinxClassFunctionName}%
|
||||
{}% we did nothing so we keep doing nothing
|
||||
{\expandafter\end\expandafter{\sphinxClassFunctionName}}%
|
||||
}%
|
@ -0,0 +1,122 @@
|
||||
%% GRAPHICS
|
||||
%
|
||||
% change this info string if making any custom modification
|
||||
\ProvidesFile{sphinxlatexgraphics.sty}[2021/01/27 graphics]
|
||||
|
||||
% Provides support for this output mark-up from Sphinx latex writer:
|
||||
%
|
||||
% - macros:
|
||||
%
|
||||
% - \sphinxfigcaption
|
||||
% - \sphinxincludegraphics
|
||||
%
|
||||
% - environments:
|
||||
%
|
||||
% - sphinxfigure-in-table
|
||||
%
|
||||
% May change:
|
||||
%
|
||||
% - \sphinxcaption (at begin document)
|
||||
%
|
||||
% Also provides:
|
||||
%
|
||||
% - \sphinxsafeincludegraphics (default of \sphinxincludegraphics since 2.0)
|
||||
% - \spx@image@maxheight dimension (used by sphinxlatexadmonitions.sty)
|
||||
% - \spx@image@box scratch box register (also used by sphinxlatexliterals.sty)
|
||||
%
|
||||
% Requires:
|
||||
% \RequirePackage{graphicx}% done in sphinx.sty
|
||||
\RequirePackage{amstext}% needed for \firstchoice@true(false)
|
||||
|
||||
% \sphinxincludegraphics resizes images larger than the TeX \linewidth (which
|
||||
% is adjusted in indented environments), or taller than a certain maximal
|
||||
% height (usually \textheight and this is reduced in the environments which use
|
||||
% framed.sty to avoid infinite loop if image too tall).
|
||||
%
|
||||
% In case height or width options are present the rescaling is done
|
||||
% (since 2.0), in a way keeping the width:height ratio either native from
|
||||
% image or from the width and height options if both were present.
|
||||
%
|
||||
\newdimen\spx@image@maxheight
|
||||
\AtBeginDocument{\spx@image@maxheight\textheight}
|
||||
|
||||
% box scratch register
|
||||
\newbox\spx@image@box
|
||||
\newcommand*{\sphinxsafeincludegraphics}[2][]{%
|
||||
% #1 contains possibly width=, height=, but no scale= since 1.8.4
|
||||
\setbox\spx@image@box\hbox{\includegraphics[#1,draft]{#2}}%
|
||||
\in@false % use some handy boolean flag
|
||||
\ifdim \wd\spx@image@box>\linewidth
|
||||
\in@true % flag to remember to adjust options and set box dimensions
|
||||
% compute height which results from rescaling width to \linewidth
|
||||
% and keep current aspect ratio. multiply-divide in \numexpr uses
|
||||
% temporarily doubled precision, hence no overflow. (of course we
|
||||
% assume \ht is not a few sp's below \maxdimen...(about 16384pt).
|
||||
\edef\spx@image@rescaledheight % with sp units
|
||||
{\the\numexpr\ht\spx@image@box
|
||||
*\linewidth/\wd\spx@image@box sp}%
|
||||
\ifdim\spx@image@rescaledheight>\spx@image@maxheight
|
||||
% the rescaled height will be too big, so it is height which decides
|
||||
% the rescaling factor
|
||||
\def\spx@image@requiredheight{\spx@image@maxheight}% dimen register
|
||||
\edef\spx@image@requiredwidth % with sp units
|
||||
{\the\numexpr\wd\spx@image@box
|
||||
*\spx@image@maxheight/\ht\spx@image@box sp}%
|
||||
% TODO: decide if this commented-out block could be needed due to
|
||||
% rounding in numexpr operations going up
|
||||
% \ifdim\spx@image@requiredwidth>\linewidth
|
||||
% \def\spx@image@requiredwidth{\linewidth}% dimen register
|
||||
% \fi
|
||||
\else
|
||||
\def\spx@image@requiredwidth{\linewidth}% dimen register
|
||||
\let\spx@image@requiredheight\spx@image@rescaledheight% sp units
|
||||
\fi
|
||||
\else
|
||||
% width is ok, let's check height
|
||||
\ifdim\ht\spx@image@box>\spx@image@maxheight
|
||||
\in@true
|
||||
\edef\spx@image@requiredwidth % with sp units
|
||||
{\the\numexpr\wd\spx@image@box
|
||||
*\spx@image@maxheight/\ht\spx@image@box sp}%
|
||||
\def\spx@image@requiredheight{\spx@image@maxheight}% dimen register
|
||||
\fi
|
||||
\fi % end of check of width and height
|
||||
\ifin@
|
||||
\setbox\spx@image@box
|
||||
\hbox{\includegraphics
|
||||
[%#1,% contained only width and/or height and overruled anyhow
|
||||
width=\spx@image@requiredwidth,height=\spx@image@requiredheight]%
|
||||
{#2}}%
|
||||
% \includegraphics does not set box dimensions to the exactly
|
||||
% requested ones, see https://github.com/latex3/latex2e/issues/112
|
||||
\wd\spx@image@box\spx@image@requiredwidth
|
||||
\ht\spx@image@box\spx@image@requiredheight
|
||||
\leavevmode\box\spx@image@box
|
||||
\else
|
||||
% here we do not modify the options, no need to adjust width and height
|
||||
% on output, they will be computed exactly as with "draft" option
|
||||
\setbox\spx@image@box\box\voidb@x % clear memory
|
||||
\includegraphics[#1]{#2}%
|
||||
\fi
|
||||
}%
|
||||
% Use the "safe" one by default (2.0)
|
||||
\def\sphinxincludegraphics{\sphinxsafeincludegraphics}
|
||||
|
||||
|
||||
%% FIGURE IN TABLE
|
||||
%
|
||||
\newenvironment{sphinxfigure-in-table}[1][\linewidth]{%
|
||||
\def\@captype{figure}%
|
||||
\sphinxsetvskipsforfigintablecaption
|
||||
\begin{minipage}{#1}%
|
||||
}{\end{minipage}}
|
||||
% tabulary expands twice contents, we need to prevent double counter stepping
|
||||
\newcommand*\sphinxfigcaption
|
||||
{\ifx\equation$%$% this is trick to identify tabulary first pass
|
||||
\firstchoice@false\else\firstchoice@true\fi
|
||||
\spx@originalcaption }
|
||||
\newcommand*\sphinxsetvskipsforfigintablecaption
|
||||
{\abovecaptionskip\smallskipamount
|
||||
\belowcaptionskip\smallskipamount}
|
||||
|
||||
\endinput
|
@ -0,0 +1,69 @@
|
||||
%% INDEX, BIBLIOGRAPHY, APPENDIX, TABLE OF CONTENTS
|
||||
%
|
||||
% change this info string if making any custom modification
|
||||
\ProvidesFile{sphinxlatexindbibtoc.sty}[2021/01/27 index, bib., toc]
|
||||
|
||||
% Provides support for this output mark-up from Sphinx latex writer:
|
||||
%
|
||||
% - environments: (backup defaults or get redefined)
|
||||
%
|
||||
% - sphinxtheindex (direct mark-up or via python.ist or sphinx.xdy)
|
||||
% - sphinxthebibliography
|
||||
%
|
||||
% - macros: (defines defaults)
|
||||
%
|
||||
% - \sphinxmaketitle
|
||||
% - \sphinxtableofcontents
|
||||
% - \sphinxnonalphabeticalgroupname
|
||||
% - \sphinxsymbolsname
|
||||
% - \sphinxnumbersname
|
||||
% - \sphinxcite
|
||||
%
|
||||
% Requires:
|
||||
\RequirePackage{makeidx}
|
||||
|
||||
% fix the double index and bibliography on the table of contents
|
||||
% in jsclasses (Japanese standard document classes)
|
||||
\ifx\@jsc@uplatextrue\@undefined\else
|
||||
\renewenvironment{sphinxtheindex}
|
||||
{\cleardoublepage\phantomsection
|
||||
\begin{theindex}}
|
||||
{\end{theindex}}
|
||||
|
||||
\renewenvironment{sphinxthebibliography}[1]
|
||||
{\cleardoublepage% \phantomsection % not needed here since TeXLive 2010's hyperref
|
||||
\begin{thebibliography}{#1}}
|
||||
{\end{thebibliography}}
|
||||
\fi
|
||||
|
||||
% disable \@chappos in Appendix in pTeX
|
||||
\ifx\kanjiskip\@undefined\else
|
||||
\let\py@OldAppendix=\appendix
|
||||
\renewcommand{\appendix}{
|
||||
\py@OldAppendix
|
||||
\gdef\@chappos{}
|
||||
}
|
||||
\fi
|
||||
|
||||
% make commands known to non-Sphinx document classes
|
||||
\providecommand*{\sphinxmaketitle}{\maketitle}
|
||||
\providecommand*{\sphinxtableofcontents}{\tableofcontents}
|
||||
\ltx@ifundefined{sphinxthebibliography}
|
||||
{\newenvironment
|
||||
{sphinxthebibliography}{\begin{thebibliography}}{\end{thebibliography}}%
|
||||
}
|
||||
{}% else clause of \ltx@ifundefined
|
||||
\ltx@ifundefined{sphinxtheindex}
|
||||
{\newenvironment{sphinxtheindex}{\begin{theindex}}{\end{theindex}}}%
|
||||
{}% else clause of \ltx@ifundefined
|
||||
|
||||
% for usage with xindy: this string gets internationalized in preamble
|
||||
\newcommand*{\sphinxnonalphabeticalgroupname}{}
|
||||
% redefined in preamble, headings for makeindex produced index
|
||||
\newcommand*{\sphinxsymbolsname}{}
|
||||
\newcommand*{\sphinxnumbersname}{}
|
||||
|
||||
\protected\def\sphinxcite{\cite}
|
||||
|
||||
|
||||
\endinput
|
@ -0,0 +1,97 @@
|
||||
%% ALPHANUMERIC LIST ITEMS
|
||||
%
|
||||
% change this info string if making any custom modification
|
||||
\ProvidesFile{sphinxlatexlists.sty}[2021/01/27 lists]
|
||||
|
||||
% Provides support for this output mark-up from Sphinx latex writer:
|
||||
% - \sphinxsetlistlabels
|
||||
|
||||
% Dependencies: the \spx@opt@maxlistdepth from sphinx.sty
|
||||
|
||||
\newcommand\sphinxsetlistlabels[5]
|
||||
{% #1 = style, #2 = enum, #3 = enumnext, #4 = prefix, #5 = suffix
|
||||
% #2 and #3 are counters used by enumerate environment e.g. enumi, enumii.
|
||||
% #1 is a macro such as \arabic or \alph
|
||||
% prefix and suffix are strings (by default empty and a dot).
|
||||
\@namedef{the#2}{#1{#2}}%
|
||||
\@namedef{label#2}{#4\@nameuse{the#2}#5}%
|
||||
\@namedef{p@#3}{\@nameuse{p@#2}#4\@nameuse{the#2}#5}%
|
||||
}%
|
||||
|
||||
|
||||
%% MAXLISTDEPTH
|
||||
%
|
||||
% remove LaTeX's cap on nesting depth if 'maxlistdepth' key used.
|
||||
% This is a hack, which works with the standard classes: it assumes \@toodeep
|
||||
% is always used in "true" branches: "\if ... \@toodeep \else .. \fi."
|
||||
|
||||
% will force use the "false" branch (if there is one)
|
||||
\def\spx@toodeep@hack{\fi\iffalse}
|
||||
|
||||
% do nothing if 'maxlistdepth' key not used or if package enumitem loaded.
|
||||
\ifnum\spx@opt@maxlistdepth=\z@\expandafter\@gobbletwo\fi
|
||||
\AtBeginDocument{%
|
||||
\@ifpackageloaded{enumitem}{\remove@to@nnil}{}%
|
||||
\let\spx@toodeepORI\@toodeep
|
||||
\def\@toodeep{%
|
||||
\ifnum\@listdepth<\spx@opt@maxlistdepth\relax
|
||||
\expandafter\spx@toodeep@hack
|
||||
\else
|
||||
\expandafter\spx@toodeepORI
|
||||
\fi}%
|
||||
% define all missing \@list... macros
|
||||
\count@\@ne
|
||||
\loop
|
||||
\ltx@ifundefined{@list\romannumeral\the\count@}
|
||||
{\iffalse}{\iftrue\advance\count@\@ne}%
|
||||
\repeat
|
||||
\loop
|
||||
\ifnum\count@>\spx@opt@maxlistdepth\relax\else
|
||||
\expandafter\let
|
||||
\csname @list\romannumeral\the\count@\expandafter\endcsname
|
||||
\csname @list\romannumeral\the\numexpr\count@-\@ne\endcsname
|
||||
% workaround 2.6--3.2d babel-french issue (fixed in 3.2e; no change needed)
|
||||
\ltx@ifundefined{leftmargin\romannumeral\the\count@}
|
||||
{\expandafter\let
|
||||
\csname leftmargin\romannumeral\the\count@\expandafter\endcsname
|
||||
\csname leftmargin\romannumeral\the\numexpr\count@-\@ne\endcsname}{}%
|
||||
\advance\count@\@ne
|
||||
\repeat
|
||||
% define all missing enum... counters and \labelenum... macros and \p@enum..
|
||||
\count@\@ne
|
||||
\loop
|
||||
\ltx@ifundefined{c@enum\romannumeral\the\count@}
|
||||
{\iffalse}{\iftrue\advance\count@\@ne}%
|
||||
\repeat
|
||||
\loop
|
||||
\ifnum\count@>\spx@opt@maxlistdepth\relax\else
|
||||
\newcounter{enum\romannumeral\the\count@}%
|
||||
\expandafter\def
|
||||
\csname labelenum\romannumeral\the\count@\expandafter\endcsname
|
||||
\expandafter
|
||||
{\csname theenum\romannumeral\the\numexpr\count@\endcsname.}%
|
||||
\expandafter\def
|
||||
\csname p@enum\romannumeral\the\count@\expandafter\endcsname
|
||||
\expandafter
|
||||
{\csname p@enum\romannumeral\the\numexpr\count@-\@ne\expandafter
|
||||
\endcsname\csname theenum\romannumeral\the\numexpr\count@-\@ne\endcsname.}%
|
||||
\advance\count@\@ne
|
||||
\repeat
|
||||
% define all missing labelitem... macros
|
||||
\count@\@ne
|
||||
\loop
|
||||
\ltx@ifundefined{labelitem\romannumeral\the\count@}
|
||||
{\iffalse}{\iftrue\advance\count@\@ne}%
|
||||
\repeat
|
||||
\loop
|
||||
\ifnum\count@>\spx@opt@maxlistdepth\relax\else
|
||||
\expandafter\let
|
||||
\csname labelitem\romannumeral\the\count@\expandafter\endcsname
|
||||
\csname labelitem\romannumeral\the\numexpr\count@-\@ne\endcsname
|
||||
\advance\count@\@ne
|
||||
\repeat
|
||||
\PackageInfo{sphinx}{maximal list depth extended to \spx@opt@maxlistdepth}%
|
||||
\@gobble\@nnil
|
||||
}
|
||||
|
||||
\endinput
|
@ -0,0 +1,804 @@
|
||||
%% LITERAL BLOCKS
|
||||
%
|
||||
% change this info string if making any custom modification
|
||||
\ProvidesFile{sphinxlatexliterals.sty}[2021/12/06 code-blocks and parsed literals]
|
||||
|
||||
% Provides support for this output mark-up from Sphinx latex writer:
|
||||
%
|
||||
% - macros:
|
||||
% - \sphinxLiteralBlockLabel
|
||||
% - \sphinxSetupCaptionForVerbatim
|
||||
% - \sphinxSetupCodeBlockInFootnote
|
||||
% - \sphinxhref
|
||||
% - \sphinxnolinkurl
|
||||
% - \sphinxresetverbatimhllines
|
||||
% - \sphinxunactivateextrasandspace
|
||||
% - \sphinxupquote
|
||||
% - \sphinxurl
|
||||
%
|
||||
% - environments:
|
||||
% - sphinxVerbatim
|
||||
% - sphinxVerbatimintable
|
||||
% - sphinxalltt
|
||||
%
|
||||
% Dependency:
|
||||
%
|
||||
% - hyperref (for \phantomsection and \capstart) (loaded later)
|
||||
%
|
||||
% Executes \RequirePackage for:
|
||||
%
|
||||
% - framed
|
||||
% - fancyvrb
|
||||
% - alltt
|
||||
% - upquote
|
||||
% - needspace
|
||||
|
||||
% also in sphinxlatexadmonitions.sty:
|
||||
% This is a workaround to a "feature" of French lists, when literal block
|
||||
% follows immediately; usable generally (does only \par then), a priori...
|
||||
\providecommand*\sphinxvspacefixafterfrenchlists{%
|
||||
\ifvmode\ifdim\lastskip<\z@ \vskip\parskip\fi\else\par\fi
|
||||
}
|
||||
|
||||
% For framing allowing pagebreaks
|
||||
\RequirePackage{framed}
|
||||
% For source code
|
||||
% MEMO: fancyvrb is used mainly to
|
||||
% 1- control horizontal and vertical spacing
|
||||
% 2- optional line numbering
|
||||
% 3- optional line emphasizing
|
||||
% 4- while still allowing expansion of Pygments latex mark-up
|
||||
% Other aspects such as framing, caption handling, codeline wrapping are
|
||||
% added on top of it. We should stop using fancyvrb and implement
|
||||
% 1, 2, 3, 4 by own Sphinx fully native Verbatim. This would allow to solve
|
||||
% limitations with wrapped long code line not allowing page break.
|
||||
\RequirePackage{fancyvrb}
|
||||
% For parsed-literal blocks.
|
||||
\RequirePackage{alltt}
|
||||
% Display "real" single quotes in literal blocks.
|
||||
\RequirePackage{upquote}
|
||||
% Skip to next page if not enough space at bottom
|
||||
\RequirePackage{needspace}
|
||||
|
||||
% 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 ("sphinxpackagefootnote.sty").
|
||||
|
||||
% for emphasizing lines
|
||||
\define@key{FV}{hllines}{\def\sphinx@verbatim@checkifhl##1{\in@{, ##1,}{#1}}}
|
||||
% sphinxVerbatim must be usable by third party without requiring hllines set-up
|
||||
\def\sphinxresetverbatimhllines{\def\sphinx@verbatim@checkifhl##1{\in@false}}
|
||||
\sphinxresetverbatimhllines
|
||||
|
||||
% Prior to Sphinx 1.5, \Verbatim and \endVerbatim were modified by Sphinx.
|
||||
% The aliases defined here are used in sphinxVerbatim environment and can
|
||||
% serve as hook-points with no need to modify \Verbatim itself.
|
||||
\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}
|
||||
|
||||
% 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\~% >, -, ~
|
||||
\do\PYGZbs\\% \
|
||||
}
|
||||
\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 neither pygmentized nor "tex-escaped".
|
||||
% 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 box to measure contents if nested as inner \MakeFramed requires then
|
||||
% minipage encapsulation but too long contents then break outer \MakeFramed
|
||||
\newbox\sphinxVerbatim@ContentsBox
|
||||
% 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}%
|
||||
}
|
||||
\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{%
|
||||
\hsize\linewidth
|
||||
\ifspx@opt@verbatimforcewraps
|
||||
\expandafter\spx@verb@FormatLineForceWrap
|
||||
\else\expandafter\spx@verb@FormatLineWrap
|
||||
\fi
|
||||
}%
|
||||
\newcommand\sphinxVerbatimFormatLineNoWrap[1]{\hb@xt@\linewidth{\strut #1\hss}}%
|
||||
\long\def\spx@verb@FormatLineWrap#1{%
|
||||
\vtop{\raggedright\hyphenpenalty\z@\exhyphenpenalty\z@
|
||||
\doublehyphendemerits\z@\finalhyphendemerits\z@
|
||||
\strut #1\strut}%
|
||||
}%
|
||||
%
|
||||
% The normal line wrapping allows breaks at spaces and ascii non
|
||||
% letters, non digits. The \raggedright above means there will be
|
||||
% an overfilled line only if some non-breakable "word" was
|
||||
% encountered, which is longer than a line (it is moved always to
|
||||
% be on its own on a new line).
|
||||
%
|
||||
% The "forced" line wrapping will parse the tokens to add potential
|
||||
% breakpoints at each character. As some strings are highlighted,
|
||||
% we have to apply the highlighting character per character, which
|
||||
% requires to manipulate the output of the Pygments LaTeXFormatter.
|
||||
%
|
||||
% Doing this at latex level is complicated. The contents should
|
||||
% be as expected: i.e. some active characters from
|
||||
% \sphinxbreaksviaactive, some Pygments character escapes such as
|
||||
% \PYGZdl{}, and the highlighting \PYG macro with always 2
|
||||
% arguments. No other macros should be there, except perhaps
|
||||
% zero-parameter macros. In particular:
|
||||
% - the texcomments Pygments option must be set to False
|
||||
%
|
||||
% With pdflatex, Unicode input gives multi-bytes characters
|
||||
% where the first byte is active. We support the "utf8" macros
|
||||
% only. "utf8x" is not supported.
|
||||
%
|
||||
% The highlighting macro \PYG will be applied character per
|
||||
% character. Highlighting via a colored background gives thus a
|
||||
% chain of small colored boxes which may cause some artefact in
|
||||
% some pdf viewers. Can't do anything here if we do want the line
|
||||
% break to be possible.
|
||||
%
|
||||
% First a measurement step is done of what would the standard line
|
||||
% wrapping give (i.e line breaks only at spaces and non-letter,
|
||||
% non-digit ascii characters), cf TeX by Topic for the basic
|
||||
% dissecting technique: TeX unfortunately when building a vertical
|
||||
% box does not store in an accessible way what was the maximal
|
||||
% line-width during paragraph building.
|
||||
%
|
||||
% Avoid LaTeX 2021 alteration of \@@par which potentially could break our
|
||||
% measurement step (typically if the para/after hook is configured to use
|
||||
% \vspace). Of course, breakage could happen only from user or package
|
||||
% adding things to basic Sphinx latex. And perhaps spring LaTeX 2021 will
|
||||
% provide a non-hooked \@@par, but this should work anyway and can't be
|
||||
% beaten for speed.
|
||||
\ltx@ifundefined{tex_par:D}
|
||||
% We could use \@ifl@t@r\fmtversion{2020/02/02}{use \tex_par:D}{use \@@par}.
|
||||
{\let\spx@par\@@par}% \@@par is then expected to be TeX's original \par
|
||||
{\expandafter\let\expandafter\spx@par\csname tex_par:D\endcsname}
|
||||
% More hesitation for avoiding the at-start-of-par hooks for our
|
||||
% measurement : 1. with old LaTeX, we can not avoid hooks from everyhook
|
||||
% or similar packages, 2. and perhaps the hooks add stuff which we should
|
||||
% actually measure. Ideally, hooks are for inserting things in margin
|
||||
% which do not change spacing. Most everything else in fact should not be
|
||||
% executed in our scratch box for measurement, such as counter stepping.
|
||||
\ltx@ifundefined{tex_everypar:D}
|
||||
{\let\spx@everypar\everypar}
|
||||
{\expandafter\let\expandafter\spx@everypar\csname tex_everypar:D\endcsname}
|
||||
%
|
||||
% If the max width exceeds the linewidth by more than verbatimmaxoverfull
|
||||
% character widths, or if the min width plus verbatimmaxunderfull character
|
||||
% widths is inferior to linewidth, then we apply the "force wrapping" with
|
||||
% potential line break at each character, else we don't.
|
||||
\long\def\spx@verb@FormatLineForceWrap#1{%
|
||||
% \spx@image@box is a scratch box register that we can use here
|
||||
\global\let\spx@verb@maxwidth\z@
|
||||
\global\let\spx@verb@minwidth\linewidth
|
||||
\setbox\spx@image@box
|
||||
\vtop{\raggedright\hyphenpenalty\z@\exhyphenpenalty\z@
|
||||
\doublehyphendemerits\z@\finalhyphendemerits\z@
|
||||
\spx@everypar{}\noindent\strut #1\strut\spx@par
|
||||
\spx@verb@getwidths}%
|
||||
\ifdim\spx@verb@maxwidth>
|
||||
\dimexpr\linewidth+\spx@opt@verbatimmaxoverfull\fontcharwd\font`X \relax
|
||||
\spx@verb@FormatLineWrap{\spx@verb@wrapPYG #1\spx@verb@wrapPYG}%
|
||||
\else
|
||||
\ifdim\spx@verb@minwidth<
|
||||
\dimexpr\linewidth-\spx@opt@verbatimmaxunderfull\fontcharwd\font`X \relax
|
||||
\spx@verb@FormatLineWrap{\spx@verb@wrapPYG #1\spx@verb@wrapPYG}%
|
||||
\else
|
||||
\spx@verb@FormatLineWrap{#1}%
|
||||
\fi\fi
|
||||
}%
|
||||
% auxiliary paragraph dissector to get max and min widths
|
||||
% but minwidth must not take into account the last line
|
||||
\newbox\spx@scratchbox
|
||||
\def\spx@verb@getwidths {%
|
||||
\unskip\unpenalty
|
||||
\setbox\spx@scratchbox\lastbox
|
||||
\ifvoid\spx@scratchbox
|
||||
\else
|
||||
\setbox\spx@scratchbox\hbox{\unhbox\spx@scratchbox}%
|
||||
\ifdim\spx@verb@maxwidth<\wd\spx@scratchbox
|
||||
\xdef\spx@verb@maxwidth{\number\wd\spx@scratchbox sp}%
|
||||
\fi
|
||||
\expandafter\spx@verb@getwidths@loop
|
||||
\fi
|
||||
}%
|
||||
\def\spx@verb@getwidths@loop {%
|
||||
\unskip\unpenalty
|
||||
\setbox\spx@scratchbox\lastbox
|
||||
\ifvoid\spx@scratchbox
|
||||
\else
|
||||
\setbox\spx@scratchbox\hbox{\unhbox\spx@scratchbox}%
|
||||
\ifdim\spx@verb@maxwidth<\wd\spx@scratchbox
|
||||
\xdef\spx@verb@maxwidth{\number\wd\spx@scratchbox sp}%
|
||||
\fi
|
||||
\ifdim\spx@verb@minwidth>\wd\spx@scratchbox
|
||||
\xdef\spx@verb@minwidth{\number\wd\spx@scratchbox sp}%
|
||||
\fi
|
||||
\expandafter\spx@verb@getwidths@loop
|
||||
\fi
|
||||
}%
|
||||
% auxiliary macros to implement "cut long line even in middle of word"
|
||||
\catcode`Z=3 % safe delimiter
|
||||
\def\spx@verb@wrapPYG{%
|
||||
\futurelet\spx@nexttoken\spx@verb@wrapPYG@i
|
||||
}%
|
||||
\def\spx@verb@wrapPYG@i{%
|
||||
\ifx\spx@nexttoken\spx@verb@wrapPYG\let\next=\@gobble\else
|
||||
\ifx\spx@nexttoken\PYG\let\next=\spx@verb@wrapPYG@PYG@onebyone\else
|
||||
\discretionary{}{\sphinxafterbreak}{}%
|
||||
\let\next\spx@verb@wrapPYG@ii
|
||||
\fi\fi
|
||||
\next
|
||||
}%
|
||||
% Let's recognize active characters. We don't support utf8x only utf8.
|
||||
% And here #1 should not have picked up (non empty) braced contents
|
||||
\long\def\spx@verb@wrapPYG@ii#1{%
|
||||
\ifcat\noexpand~\noexpand#1\relax% active character
|
||||
\expandafter\spx@verb@wrapPYG@active
|
||||
\else % non-active character, control sequence such as \PYGZdl, or empty
|
||||
\expandafter\spx@verb@wrapPYG@one
|
||||
\fi {#1}%
|
||||
}%
|
||||
\long\def\spx@verb@wrapPYG@active#1{%
|
||||
% Let's hope expansion of active character does not really require arguments,
|
||||
% as we certainly don't want to go into expanding upfront token stream anyway.
|
||||
\expandafter\spx@verb@wrapPYG@iii#1{}{}{}{}{}{}{}{}{}Z#1%
|
||||
}%
|
||||
\long\def\spx@verb@wrapPYG@iii#1#2Z{%
|
||||
\ifx\UTFviii@four@octets#1\let\next=\spx@verb@wrapPYG@four\else
|
||||
\ifx\UTFviii@three@octets#1\let\next=\spx@verb@wrapPYG@three\else
|
||||
\ifx\UTFviii@two@octets#1\let\next=\spx@verb@wrapPYG@two\else
|
||||
\let\next=\spx@verb@wrapPYG@one
|
||||
\fi\fi\fi
|
||||
\next
|
||||
}%
|
||||
\long\def\spx@verb@wrapPYG@one #1{#1\futurelet\spx@nexttoken\spx@verb@wrapPYG@i}%
|
||||
\long\def\spx@verb@wrapPYG@two #1#2{#1#2\futurelet\spx@nexttoken\spx@verb@wrapPYG@i}%
|
||||
\long\def\spx@verb@wrapPYG@three #1#2#3{#1#2#3\futurelet\spx@nexttoken\spx@verb@wrapPYG@i}%
|
||||
\long\def\spx@verb@wrapPYG@four #1#2#3#4{#1#2#3#4\futurelet\spx@nexttoken\spx@verb@wrapPYG@i}%
|
||||
% Replace \PYG by itself applied one character at a time! This way breakpoints
|
||||
% can be inserted.
|
||||
\def\spx@verb@wrapPYG@PYG@onebyone#1#2#3{% #1 = \PYG, #2 = highlight spec, #3 = tokens
|
||||
\def\spx@verb@wrapPYG@PYG@spec{{#2}}%
|
||||
\futurelet\spx@nexttoken\spx@verb@wrapPYG@PYG@i#3Z%
|
||||
}%
|
||||
\def\spx@verb@wrapPYG@PYG@i{%
|
||||
\ifx\spx@nexttokenZ\let\next=\spx@verb@wrapPYG@PYG@done\else
|
||||
\discretionary{}{\sphinxafterbreak}{}%
|
||||
\let\next\spx@verb@wrapPYG@PYG@ii
|
||||
\fi
|
||||
\next
|
||||
}%
|
||||
\def\spx@verb@wrapPYG@PYG@doneZ{\futurelet\spx@nexttoken\spx@verb@wrapPYG@i}%
|
||||
\long\def\spx@verb@wrapPYG@PYG@ii#1{%
|
||||
\ifcat\noexpand~\noexpand#1\relax% active character
|
||||
\expandafter\spx@verb@wrapPYG@PYG@active
|
||||
\else % non-active character, control sequence such as \PYGZdl, or empty
|
||||
\expandafter\spx@verb@wrapPYG@PYG@one
|
||||
\fi {#1}%
|
||||
}%
|
||||
\long\def\spx@verb@wrapPYG@PYG@active#1{%
|
||||
% Let's hope expansion of active character does not really require arguments,
|
||||
% as we certainly don't want to go into expanding upfront token stream anyway.
|
||||
\expandafter\spx@verb@wrapPYG@PYG@iii#1{}{}{}{}{}{}{}{}{}Z#1%
|
||||
}%
|
||||
\long\def\spx@verb@wrapPYG@PYG@iii#1#2Z{%
|
||||
\ifx\UTFviii@four@octets#1\let\next=\spx@verb@wrapPYG@PYG@four\else
|
||||
\ifx\UTFviii@three@octets#1\let\next=\spx@verb@wrapPYG@PYG@three\else
|
||||
\ifx\UTFviii@two@octets#1\let\next=\spx@verb@wrapPYG@PYG@two\else
|
||||
\let\next=\spx@verb@wrapPYG@PYG@one
|
||||
\fi\fi\fi
|
||||
\next
|
||||
}%
|
||||
\long\def\spx@verb@wrapPYG@PYG@one#1{%
|
||||
\expandafter\PYG\spx@verb@wrapPYG@PYG@spec{#1}%
|
||||
\futurelet\spx@nexttoken\spx@verb@wrapPYG@PYG@i
|
||||
}%
|
||||
\long\def\spx@verb@wrapPYG@PYG@two#1#2{%
|
||||
\expandafter\PYG\spx@verb@wrapPYG@PYG@spec{#1#2}%
|
||||
\futurelet\spx@nexttoken\spx@verb@wrapPYG@PYG@i
|
||||
}%
|
||||
\long\def\spx@verb@wrapPYG@PYG@three#1#2#3{%
|
||||
\expandafter\PYG\spx@verb@wrapPYG@PYG@spec{#1#2#3}%
|
||||
\futurelet\spx@nexttoken\spx@verb@wrapPYG@PYG@i
|
||||
}%
|
||||
\long\def\spx@verb@wrapPYG@PYG@four#1#2#3#4{%
|
||||
\expandafter\PYG\spx@verb@wrapPYG@PYG@spec{#1#2#3#4}%
|
||||
\futurelet\spx@nexttoken\spx@verb@wrapPYG@PYG@i
|
||||
}%
|
||||
\catcode`Z 11 %
|
||||
%
|
||||
\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
|
||||
% if no frame (code-blocks inside table cells), remove
|
||||
% the "verbatimsep" whitespace from the top (better visually)
|
||||
\ifspx@opt@verbatimwithframe\else-\sphinxverbatimsep\fi
|
||||
% caption package adds \abovecaptionskip vspace, remove it
|
||||
\spx@ifcaptionpackage{-\abovecaptionskip}{}\relax}%
|
||||
\else
|
||||
\vskip\sphinxverbatimsmallskipamount
|
||||
\def\sphinxVerbatim@After
|
||||
{\nointerlineskip\kern\dimexpr\dp\strutbox
|
||||
\ifspx@opt@verbatimwithframe\else-\sphinxverbatimsep\fi
|
||||
\spx@ifcaptionpackage{-\abovecaptionskip}{}\relax
|
||||
\sphinxVerbatim@Title}%
|
||||
\fi
|
||||
\def\@captype{literalblock}%
|
||||
\capstart
|
||||
% \sphinxVerbatimTitle must reset color
|
||||
\setbox\sphinxVerbatim@TitleBox
|
||||
\hbox{\begin{minipage}{\linewidth}%
|
||||
% caption package may detect wrongly if top or bottom, so we help it
|
||||
\spx@ifcaptionpackage
|
||||
{\caption@setposition{\spx@opt@literalblockcappos}}{}%
|
||||
\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
|
||||
\VerbatimEnvironment
|
||||
% 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 (which itself is set to zero above)
|
||||
% \leftmargin will be set to zero by trivlist
|
||||
\rightmargin\z@
|
||||
\parindent \z@% becomes \itemindent. Default zero, but perhaps overwritten.
|
||||
\trivlist\item\relax
|
||||
\ifspx@inframed\setbox\sphinxVerbatim@ContentsBox\vbox\bgroup
|
||||
\@setminipage\hsize\linewidth
|
||||
% use bulk of minipage paragraph shape restores (this is needed
|
||||
% in indented contexts, at least for some)
|
||||
\textwidth\hsize \columnwidth\hsize \@totalleftmargin\z@
|
||||
\leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip
|
||||
\else
|
||||
\ifsphinxverbatimwithminipage\noindent\begin{minipage}{\linewidth}\fi
|
||||
\MakeFramed {% adapted over from framed.sty's snugshade environment
|
||||
\advance\hsize-\width\@totalleftmargin\z@\linewidth\hsize\@setminipage
|
||||
}%
|
||||
\fi
|
||||
% 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
|
||||
\ifspx@inframed
|
||||
\egroup % finish \sphinxVerbatim@ContentsBox vbox
|
||||
\nobreak % update page totals
|
||||
\ifdim\dimexpr\ht\sphinxVerbatim@ContentsBox+
|
||||
\dp\sphinxVerbatim@ContentsBox+
|
||||
\ht\sphinxVerbatim@TitleBox+
|
||||
\dp\sphinxVerbatim@TitleBox+
|
||||
2\fboxsep+2\fboxrule+
|
||||
% try to account for external frame parameters
|
||||
\FrameSep+\FrameRule+
|
||||
% Usage here of 2 baseline distances is empirical.
|
||||
% In border case where code-block fits barely in remaining space,
|
||||
% it gets framed and looks good but the outer frame may continue
|
||||
% on top of next page and give (if no contents after code-block)
|
||||
% an empty framed line, as testing showed.
|
||||
2\baselineskip+
|
||||
% now add all to accumulated page totals and compare to \pagegoal
|
||||
\pagetotal+\pagedepth>\pagegoal
|
||||
% long contents: do not \MakeFramed. Do make a caption (either before or
|
||||
% after) if title exists. Continuation hints across pagebreaks dropped.
|
||||
% FIXME? a bottom caption may end up isolated at top of next page
|
||||
% (no problem with a top caption, which is default)
|
||||
\spx@opt@verbatimwithframefalse
|
||||
\def\sphinxVerbatim@Title{\noindent\box\sphinxVerbatim@TitleBox\par}%
|
||||
\sphinxVerbatim@Before
|
||||
\noindent\unvbox\sphinxVerbatim@ContentsBox\par
|
||||
\sphinxVerbatim@After
|
||||
\else
|
||||
% short enough contents: use \MakeFramed. As it is nested, this requires
|
||||
% minipage encapsulation.
|
||||
\noindent\begin{minipage}{\linewidth}%
|
||||
\MakeFramed {% Use it now with the fetched contents
|
||||
\advance\hsize-\width\@totalleftmargin\z@\linewidth\hsize\@setminipage
|
||||
}%
|
||||
\unvbox\sphinxVerbatim@ContentsBox
|
||||
% some of this may be superfluous:
|
||||
\par\unskip\@minipagefalse\endMakeFramed
|
||||
\end{minipage}%
|
||||
\fi
|
||||
\else % non-nested \MakeFramed
|
||||
\par\unskip\@minipagefalse\endMakeFramed % from framed.sty snugshade
|
||||
\ifsphinxverbatimwithminipage\end{minipage}\fi
|
||||
\fi
|
||||
\endtrivlist
|
||||
}
|
||||
\newenvironment {sphinxVerbatimNoFrame}
|
||||
{\spx@opt@verbatimwithframefalse
|
||||
\VerbatimEnvironment
|
||||
\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}%
|
||||
\VerbatimEnvironment
|
||||
\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\~% >, ~
|
||||
\do\textbackslash\\% \
|
||||
}
|
||||
\newcommand*\sphinxbreaksviaactiveinparsedliteral{%
|
||||
\sphinxbreaksviaactive % by default handles . , ; ? ! /
|
||||
\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}%
|
||||
% the \catcode13=5\relax (deactivate end of input lines) is left to callers
|
||||
\newcommand*{\sphinxunactivateextrasandspace}{\catcode32=10\relax
|
||||
\sphinxunactivateextras}%
|
||||
% alltt uses a monospace font and linebreaks at dashes (which are escaped
|
||||
% to \sphinxhyphen{} which expands to -\kern\z@) are inhibited with pdflatex.
|
||||
% Not with xelatex (cf \defaultfontfeatures in latex writer), so:
|
||||
\newcommand*{\sphinxhypheninparsedliteral}{\sphinxhyphennobreak}
|
||||
% 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}%
|
||||
\let\sphinxhyphen\sphinxhypheninparsedliteral
|
||||
\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}}
|
||||
|
||||
|
||||
%% INLINE MARK-UP
|
||||
%
|
||||
|
||||
% 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!
|
||||
% for the \endlinechar business, https://github.com/latex3/latex2e/issues/286
|
||||
\endlinechar\m@ne\everyeof{{\endlinechar13 #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}}%
|
||||
}}
|
||||
|
||||
% \sphinxupquote
|
||||
% 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,
|
||||
% and also at \ character (which is escaped to \textbackslash{}).
|
||||
\protected\def\sphinxtextbackslashbreakbefore
|
||||
{\discretionary{}{\sphinxafterbreak\sphinx@textbackslash}{\sphinx@textbackslash}}
|
||||
\protected\def\sphinxtextbackslashbreakafter
|
||||
{\discretionary{\sphinx@textbackslash}{\sphinxafterbreak}{\sphinx@textbackslash}}
|
||||
\let\sphinxtextbackslash\sphinxtextbackslashbreakafter
|
||||
% - is escaped to \sphinxhyphen{} and this default ensures no linebreak
|
||||
% behaviour (also with a non monospace font, or with xelatex)
|
||||
\newcommand*{\sphinxhyphenininlineliteral}{\sphinxhyphennobreak}
|
||||
% 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
|
||||
\let\sphinxhyphen\sphinxhyphenininlineliteral
|
||||
\ifspx@opt@inlineliteralwraps
|
||||
% break at . , ; ? ! /
|
||||
\sphinxbreaksviaactive
|
||||
% break also at \
|
||||
\setbox8=\hbox{\textbackslash}%
|
||||
\def\sphinx@textbackslash{\copy8}%
|
||||
\let\textbackslash\sphinxtextbackslash
|
||||
% by default, no continuation symbol on next line but may be added
|
||||
\let\sphinxafterbreak\sphinxafterbreakofinlineliteral
|
||||
% 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
|
||||
% TODO: using \@noligs as patched by upquote.sty is now unneeded because
|
||||
% either ` and ' are escaped (non-unicode engines) or they don't build
|
||||
% ligatures (unicode engines). Thus remove this and unify handling of `, <, >,
|
||||
% ' and - with the characters . , ; ? ! / as handled via
|
||||
% \sphinxbreaksviaactive.
|
||||
% Hence \sphinx@do@noligs will be removed, or rather replaced with code
|
||||
% inserting discretionaries, as they allow a continuation symbol on start of
|
||||
% next line to achieve common design with code-blocks.
|
||||
\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\-}%
|
||||
\let\sphinxafterbreakofinlineliteral\empty
|
||||
|
||||
|
||||
\endinput
|
@ -0,0 +1,122 @@
|
||||
%% NUMBERING OF FIGURES, TABLES, AND LITERAL BLOCKS
|
||||
%
|
||||
% change this info string if making any custom modification
|
||||
\ProvidesFile{sphinxlatexnumfig.sty}[2021/01/27 numbering]
|
||||
|
||||
% Requires: remreset (old LaTeX only)
|
||||
% relates to numfig and numfig_secnum_depth configuration variables
|
||||
|
||||
% LaTeX 2018-04-01 and later provides \@removefromreset
|
||||
\ltx@ifundefined{@removefromreset}
|
||||
{\RequirePackage{remreset}}
|
||||
{}% avoid warning
|
||||
% Everything is delayed to \begin{document} to allow hyperref patches into
|
||||
% \newcounter to solve duplicate label problems for internal hyperlinks to
|
||||
% code listings (literalblock counter). User or extension re-definitions of
|
||||
% \theliteralblock, et al., thus have also to be delayed. (changed at 3.5.0)
|
||||
\AtBeginDocument{%
|
||||
\ltx@ifundefined{c@chapter}
|
||||
{\newcounter{literalblock}}%
|
||||
{\newcounter{literalblock}[chapter]%
|
||||
\def\theliteralblock{\ifnum\c@chapter>\z@\arabic{chapter}.\fi
|
||||
\arabic{literalblock}}%
|
||||
}%
|
||||
\ifspx@opt@nonumfigreset
|
||||
\ltx@ifundefined{c@chapter}{}{%
|
||||
\@removefromreset{figure}{chapter}%
|
||||
\@removefromreset{table}{chapter}%
|
||||
\@removefromreset{literalblock}{chapter}%
|
||||
\ifspx@opt@mathnumfig
|
||||
\@removefromreset{equation}{chapter}%
|
||||
\fi
|
||||
}%
|
||||
\def\thefigure{\arabic{figure}}%
|
||||
\def\thetable {\arabic{table}}%
|
||||
\def\theliteralblock{\arabic{literalblock}}%
|
||||
\ifspx@opt@mathnumfig
|
||||
\def\theequation{\arabic{equation}}%
|
||||
\fi
|
||||
\else
|
||||
\let\spx@preAthefigure\@empty
|
||||
\let\spx@preBthefigure\@empty
|
||||
% \ifspx@opt@usespart % <-- LaTeX writer could pass such a 'usespart' boolean
|
||||
% % as sphinx.sty package option
|
||||
% If document uses \part, (triggered in Sphinx by latex_toplevel_sectioning)
|
||||
% LaTeX core per default does not reset chapter or section
|
||||
% counters at each part.
|
||||
% But if we modify this, we need to redefine \thechapter, \thesection to
|
||||
% include the part number and this will cause problems in table of contents
|
||||
% because of too wide numbering. Simplest is to do nothing.
|
||||
% \fi
|
||||
\ifnum\spx@opt@numfigreset>0
|
||||
\ltx@ifundefined{c@chapter}
|
||||
{}
|
||||
{\g@addto@macro\spx@preAthefigure{\ifnum\c@chapter>\z@\arabic{chapter}.}%
|
||||
\g@addto@macro\spx@preBthefigure{\fi}}%
|
||||
\fi
|
||||
\ifnum\spx@opt@numfigreset>1
|
||||
\@addtoreset{figure}{section}%
|
||||
\@addtoreset{table}{section}%
|
||||
\@addtoreset{literalblock}{section}%
|
||||
\ifspx@opt@mathnumfig
|
||||
\@addtoreset{equation}{section}%
|
||||
\fi%
|
||||
\g@addto@macro\spx@preAthefigure{\ifnum\c@section>\z@\arabic{section}.}%
|
||||
\g@addto@macro\spx@preBthefigure{\fi}%
|
||||
\fi
|
||||
\ifnum\spx@opt@numfigreset>2
|
||||
\@addtoreset{figure}{subsection}%
|
||||
\@addtoreset{table}{subsection}%
|
||||
\@addtoreset{literalblock}{subsection}%
|
||||
\ifspx@opt@mathnumfig
|
||||
\@addtoreset{equation}{subsection}%
|
||||
\fi%
|
||||
\g@addto@macro\spx@preAthefigure{\ifnum\c@subsection>\z@\arabic{subsection}.}%
|
||||
\g@addto@macro\spx@preBthefigure{\fi}%
|
||||
\fi
|
||||
\ifnum\spx@opt@numfigreset>3
|
||||
\@addtoreset{figure}{subsubsection}%
|
||||
\@addtoreset{table}{subsubsection}%
|
||||
\@addtoreset{literalblock}{subsubsection}%
|
||||
\ifspx@opt@mathnumfig
|
||||
\@addtoreset{equation}{subsubsection}%
|
||||
\fi%
|
||||
\g@addto@macro\spx@preAthefigure{\ifnum\c@subsubsection>\z@\arabic{subsubsection}.}%
|
||||
\g@addto@macro\spx@preBthefigure{\fi}%
|
||||
\fi
|
||||
\ifnum\spx@opt@numfigreset>4
|
||||
\@addtoreset{figure}{paragraph}%
|
||||
\@addtoreset{table}{paragraph}%
|
||||
\@addtoreset{literalblock}{paragraph}%
|
||||
\ifspx@opt@mathnumfig
|
||||
\@addtoreset{equation}{paragraph}%
|
||||
\fi%
|
||||
\g@addto@macro\spx@preAthefigure{\ifnum\c@subparagraph>\z@\arabic{subparagraph}.}%
|
||||
\g@addto@macro\spx@preBthefigure{\fi}%
|
||||
\fi
|
||||
\ifnum\spx@opt@numfigreset>5
|
||||
\@addtoreset{figure}{subparagraph}%
|
||||
\@addtoreset{table}{subparagraph}%
|
||||
\@addtoreset{literalblock}{subparagraph}%
|
||||
\ifspx@opt@mathnumfig
|
||||
\@addtoreset{equation}{subparagraph}%
|
||||
\fi%
|
||||
\g@addto@macro\spx@preAthefigure{\ifnum\c@subsubparagraph>\z@\arabic{subsubparagraph}.}%
|
||||
\g@addto@macro\spx@preBthefigure{\fi}%
|
||||
\fi
|
||||
\expandafter\g@addto@macro
|
||||
\expandafter\spx@preAthefigure\expandafter{\spx@preBthefigure}%
|
||||
\let\thefigure\spx@preAthefigure
|
||||
\let\thetable\spx@preAthefigure
|
||||
\let\theliteralblock\spx@preAthefigure
|
||||
\g@addto@macro\thefigure{\arabic{figure}}%
|
||||
\g@addto@macro\thetable{\arabic{table}}%
|
||||
\g@addto@macro\theliteralblock{\arabic{literalblock}}%
|
||||
\ifspx@opt@mathnumfig
|
||||
\let\theequation\spx@preAthefigure
|
||||
\g@addto@macro\theequation{\arabic{equation}}%
|
||||
\fi
|
||||
\fi
|
||||
}% end of big \AtBeginDocument
|
||||
|
||||
\endinput
|
@ -0,0 +1,215 @@
|
||||
%% MODULE RELEASE DATA AND OBJECT DESCRIPTIONS
|
||||
%
|
||||
% change this info string if making any custom modification
|
||||
\ProvidesFile{sphinxlatexobjects.sty}[2021/12/05 documentation environments]
|
||||
|
||||
% Provides support for this output mark-up from Sphinx latex writer:
|
||||
%
|
||||
% - environments
|
||||
%
|
||||
% - fulllineitems
|
||||
% - productionlist
|
||||
% - optionlist
|
||||
% - DUlineblock (also "lineblock")
|
||||
%
|
||||
% - macros
|
||||
%
|
||||
% - \DUrole
|
||||
% - various legacy support macros related to author and release
|
||||
% data of documented objects and modules.
|
||||
|
||||
% \moduleauthor{name}{email}
|
||||
\newcommand{\moduleauthor}[2]{}
|
||||
|
||||
% \sectionauthor{name}{email}
|
||||
\newcommand{\sectionauthor}[2]{}
|
||||
|
||||
% Allow the release number to be specified independently of the
|
||||
% \date{}. This allows the date to reflect the document's date and
|
||||
% release to specify the release that is documented.
|
||||
%
|
||||
\newcommand{\py@release}{\releasename\space\version}
|
||||
\newcommand{\version}{}% part of \py@release, used by title page and headers
|
||||
% \releaseinfo is used on titlepage (sphinxmanual.cls, sphinxhowto.cls)
|
||||
\newcommand{\releaseinfo}{}
|
||||
\newcommand{\setreleaseinfo}[1]{\renewcommand{\releaseinfo}{#1}}
|
||||
% this is inserted via template and #1=release config variable
|
||||
\newcommand{\release}[1]{\renewcommand{\version}{#1}}
|
||||
% this is defined by template to 'releasename' latex_elements key
|
||||
\newcommand{\releasename}{}
|
||||
% Fix issue in case release and releasename deliberately left blank
|
||||
\newcommand{\sphinxheadercomma}{, }% used in fancyhdr header definition
|
||||
\newcommand{\sphinxifemptyorblank}[1]{%
|
||||
% test after one expansion of macro #1 if contents is empty or spaces
|
||||
\if&\expandafter\@firstofone\detokenize\expandafter{#1}&%
|
||||
\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}%
|
||||
\AtBeginDocument {%
|
||||
\sphinxifemptyorblank{\releasename}
|
||||
{\sphinxifemptyorblank{\version}{\let\sphinxheadercomma\empty}{}}
|
||||
{}%
|
||||
}%
|
||||
|
||||
% Allow specification of the author's address separately from the
|
||||
% author's name. This can be used to format them differently, which
|
||||
% is a good thing.
|
||||
%
|
||||
\newcommand{\py@authoraddress}{}
|
||||
\newcommand{\authoraddress}[1]{\renewcommand{\py@authoraddress}{#1}}
|
||||
|
||||
% {fulllineitems} is the main environment for object descriptions.
|
||||
%
|
||||
% With 4.0.0 \pysigline (and \pysiglinewithargsret), used in a fulllineitems
|
||||
% environment the #1 will already be of the width which is computed here, i.e.
|
||||
% the available width on line, so the \makebox becomes a bit superfluous
|
||||
\newcommand{\py@itemnewline}[1]{% macro used as \makelabel in fulllineitems
|
||||
% Memo: this presupposes \itemindent is 0pt
|
||||
\kern\labelsep % because \@labels core latex box does \hskip-\labelsep
|
||||
\makebox[\dimexpr\linewidth+\labelwidth\relax][l]{#1}%
|
||||
\kern-\labelsep % because at end of \@labels box there is \hskip\labelsep
|
||||
}
|
||||
|
||||
\newenvironment{fulllineitems}{%
|
||||
\begin{list}{}{\labelwidth \leftmargin
|
||||
\rightmargin \z@ \topsep -\parskip \partopsep \parskip
|
||||
\itemsep -\parsep
|
||||
\let\makelabel=\py@itemnewline}%
|
||||
}{\end{list}}
|
||||
|
||||
% Signatures, possibly multi-line
|
||||
%
|
||||
\newlength{\py@argswidth}
|
||||
\newcommand{\py@sigparams}[2]{%
|
||||
% The \py@argswidth has been computed in \pysiglinewithargsret to make this
|
||||
% occupy full available width on line.
|
||||
\parbox[t]{\py@argswidth}{\raggedright #1\sphinxcode{)}#2\strut}%
|
||||
% final strut is to help get correct vertical separation in case of multi-line
|
||||
% box with the item contents.
|
||||
}
|
||||
\newcommand{\pysigline}[1]{%
|
||||
% the \py@argswidth is available we use it despite its name (no "args" here)
|
||||
% the \relax\relax is because \py@argswidth is a "skip" variable and the first
|
||||
% \relax only ends its "dimen" part
|
||||
\py@argswidth=\dimexpr\linewidth+\labelwidth\relax\relax
|
||||
\item[{\parbox[t]{\py@argswidth}{\raggedright #1\strut}}]
|
||||
\futurelet\sphinx@token\pysigline@preparevspace@i
|
||||
}
|
||||
\newcommand{\pysiglinewithargsret}[3]{%
|
||||
\settowidth{\py@argswidth}{#1\sphinxcode{(}}%
|
||||
\py@argswidth=\dimexpr\linewidth+\labelwidth-\py@argswidth\relax\relax
|
||||
\item[{#1\sphinxcode{(}\py@sigparams{#2}{#3}\strut}]
|
||||
\futurelet\sphinx@token\pysigline@preparevspace@i
|
||||
}
|
||||
\def\pysigline@preparevspace@i{%
|
||||
\ifx\sphinx@token\@sptoken
|
||||
\expandafter\pysigline@preparevspace@again
|
||||
\else\expandafter\pysigline@preparevspace@ii
|
||||
\fi
|
||||
}
|
||||
\@firstofone{\def\pysigline@preparevspace@again} {\futurelet\sphinx@token\pysigline@preparevspace@i}
|
||||
\long\def\pysigline@preparevspace@ii#1{%
|
||||
\ifx\sphinx@token\bgroup\expandafter\@firstoftwo
|
||||
\else
|
||||
\ifx\sphinx@token\phantomsection
|
||||
\else
|
||||
% this strange incantation is because at its root LaTeX in fact did not
|
||||
% imagine a multi-line label, it is always wrapped in a horizontal box at core
|
||||
% LaTeX level and we have to find tricks to get correct interline distances.
|
||||
% It interacts badly with a follow-up \phantomsection hence the test above
|
||||
\leavevmode\par\nobreak\vskip-\parskip\prevdepth\dp\strutbox
|
||||
\fi
|
||||
\expandafter\@secondoftwo
|
||||
\fi
|
||||
{{#1}}{#1}%
|
||||
}
|
||||
\newcommand{\pysigstartmultiline}{%
|
||||
\def\pysigstartmultiline{\vskip\smallskipamount\parskip\z@skip\itemsep\z@skip}%
|
||||
\edef\pysigstopmultiline
|
||||
{\noexpand\leavevmode\parskip\the\parskip\relax\itemsep\the\itemsep\relax}%
|
||||
\parskip\z@skip\itemsep\z@skip
|
||||
}
|
||||
|
||||
% Production lists
|
||||
%
|
||||
\newenvironment{productionlist}{%
|
||||
% \def\sphinxoptional##1{{\Large[}##1{\Large]}}
|
||||
\def\production##1##2{\\\sphinxcode{\sphinxupquote{##1}}&::=&\sphinxcode{\sphinxupquote{##2}}}%
|
||||
\def\productioncont##1{\\& &\sphinxcode{\sphinxupquote{##1}}}%
|
||||
\parindent=2em
|
||||
\indent
|
||||
\setlength{\LTpre}{0pt}%
|
||||
\setlength{\LTpost}{0pt}%
|
||||
\begin{longtable}[l]{lcl}
|
||||
}{%
|
||||
\end{longtable}
|
||||
}
|
||||
|
||||
% Definition lists; requested by AMK for HOWTO documents. Probably useful
|
||||
% elsewhere as well, so keep in in the general style support.
|
||||
%
|
||||
\newenvironment{definitions}{%
|
||||
\begin{description}%
|
||||
\def\term##1{\item[{##1}]\mbox{}\\*[0mm]}%
|
||||
}{%
|
||||
\end{description}%
|
||||
}
|
||||
|
||||
%% 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
|
||||
|
||||
\endinput
|
@ -0,0 +1,100 @@
|
||||
%% TOPIC AND CONTENTS BOXES
|
||||
%
|
||||
% change this info string if making any custom modification
|
||||
\ProvidesFile{sphinxlatexshadowbox.sty}[2021/01/27 sphinxShadowBox]
|
||||
|
||||
% Provides support for this output mark-up from Sphinx latex writer:
|
||||
%
|
||||
% - sphinxShadowBox (environment)
|
||||
%
|
||||
% Dependencies (they do not need to be defined at time of loading):
|
||||
%
|
||||
% - of course the various colour and dimension options handled via sphinx.sty
|
||||
% - dimension register \spx@image@maxheight from sphinxlatexgraphics.sty
|
||||
% - \savenotes/\spewnotes from sphinxpackagefootnote
|
||||
% - \ifspx@inframed defined in sphinx.sty
|
||||
%
|
||||
% Requires:
|
||||
\RequirePackage{framed}
|
||||
|
||||
% Again based on use of "framed.sty", this allows breakable framed boxes.
|
||||
\long\def\spx@ShadowFBox#1{%
|
||||
\leavevmode\begingroup
|
||||
% first we frame the box #1
|
||||
\setbox\@tempboxa
|
||||
\hbox{\vrule\@width\sphinxshadowrule
|
||||
\vbox{\hrule\@height\sphinxshadowrule
|
||||
\kern\sphinxshadowsep
|
||||
\hbox{\kern\sphinxshadowsep #1\kern\sphinxshadowsep}%
|
||||
\kern\sphinxshadowsep
|
||||
\hrule\@height\sphinxshadowrule}%
|
||||
\vrule\@width\sphinxshadowrule}%
|
||||
% Now we add the shadow, like \shadowbox from fancybox.sty would do
|
||||
\dimen@\dimexpr.5\sphinxshadowrule+\sphinxshadowsize\relax
|
||||
\hbox{\vbox{\offinterlineskip
|
||||
\hbox{\copy\@tempboxa\kern-.5\sphinxshadowrule
|
||||
% add shadow on right side
|
||||
\lower\sphinxshadowsize
|
||||
\hbox{\vrule\@height\ht\@tempboxa \@width\dimen@}%
|
||||
}%
|
||||
\kern-\dimen@ % shift back vertically to bottom of frame
|
||||
% and add shadow at bottom
|
||||
\moveright\sphinxshadowsize
|
||||
\vbox{\hrule\@width\wd\@tempboxa \@height\dimen@}%
|
||||
}%
|
||||
% move left by the size of right shadow so shadow adds no width
|
||||
\kern-\sphinxshadowsize
|
||||
}%
|
||||
\endgroup
|
||||
}
|
||||
|
||||
% use framed.sty to allow page breaks in frame+shadow
|
||||
% works well inside Lists and Quote-like environments
|
||||
% produced by ``topic'' directive (or local contents)
|
||||
% could nest if LaTeX writer authorized it
|
||||
\newenvironment{sphinxShadowBox}
|
||||
{\def\FrameCommand {\spx@ShadowFBox }%
|
||||
\advance\spx@image@maxheight
|
||||
-\dimexpr2\sphinxshadowrule
|
||||
+2\sphinxshadowsep
|
||||
+\sphinxshadowsize
|
||||
+\baselineskip\relax
|
||||
% configure framed.sty not to add extra vertical spacing
|
||||
\ltx@ifundefined{OuterFrameSep}{}{\OuterFrameSep\z@skip}%
|
||||
% the \trivlist will add the vertical spacing on top and bottom which is
|
||||
% typical of center environment as used in Sphinx <= 1.4.1
|
||||
% the \noindent has the effet of an extra blank line on top, to
|
||||
% imitate closely the layout from Sphinx <= 1.4.1; the \FrameHeightAdjust
|
||||
% will put top part of frame on this baseline.
|
||||
\def\FrameHeightAdjust {\baselineskip}%
|
||||
% use package footnote to handle footnotes
|
||||
\savenotes
|
||||
\trivlist\item\noindent
|
||||
% use a minipage if we are already inside a framed environment
|
||||
\ifspx@inframed\begin{minipage}{\linewidth}\fi
|
||||
\MakeFramed {\spx@inframedtrue
|
||||
% framed.sty puts into "\width" the added width (=2shadowsep+2shadowrule)
|
||||
% adjust \hsize to what the contents must use
|
||||
\advance\hsize-\width
|
||||
% adjust LaTeX parameters to behave properly in indented/quoted contexts
|
||||
\FrameRestore
|
||||
% typeset the contents as in a minipage (Sphinx <= 1.4.1 used a minipage and
|
||||
% itemize/enumerate are therein typeset more tightly, we want to keep
|
||||
% that). We copy-paste from LaTeX source code but don't do a real minipage.
|
||||
\@pboxswfalse
|
||||
\let\@listdepth\@mplistdepth \@mplistdepth\z@
|
||||
\@minipagerestore
|
||||
\@setminipage
|
||||
}%
|
||||
}%
|
||||
{% insert the "endminipage" code
|
||||
\par\unskip
|
||||
\@minipagefalse
|
||||
\endMakeFramed
|
||||
\ifspx@inframed\end{minipage}\fi
|
||||
\endtrivlist
|
||||
% output the stored footnotes
|
||||
\spewnotes
|
||||
}
|
||||
|
||||
\endinput
|
@ -0,0 +1,83 @@
|
||||
%% TITLES
|
||||
%
|
||||
% change this info string if making any custom modification
|
||||
\ProvidesFile{sphinxlatexstyleheadings.sty}[2021/01/27 headings]
|
||||
|
||||
\RequirePackage[nobottomtitles*]{titlesec}
|
||||
\@ifpackagelater{titlesec}{2016/03/15}%
|
||||
{\@ifpackagelater{titlesec}{2016/03/21}%
|
||||
{}%
|
||||
{\newif\ifsphinx@ttlpatch@ok
|
||||
\IfFileExists{etoolbox.sty}{%
|
||||
\RequirePackage{etoolbox}%
|
||||
\patchcmd{\ttlh@hang}{\parindent\z@}{\parindent\z@\leavevmode}%
|
||||
{\sphinx@ttlpatch@oktrue}{}%
|
||||
\ifsphinx@ttlpatch@ok
|
||||
\patchcmd{\ttlh@hang}{\noindent}{}{}{\sphinx@ttlpatch@okfalse}%
|
||||
\fi
|
||||
}{}%
|
||||
\ifsphinx@ttlpatch@ok
|
||||
\typeout{^^J Package Sphinx Info: ^^J
|
||||
**** titlesec 2.10.1 successfully patched for bugfix ****^^J}%
|
||||
\else
|
||||
\AtEndDocument{\PackageWarningNoLine{sphinx}{^^J%
|
||||
******** titlesec 2.10.1 has a bug, (section numbers disappear) ......|^^J%
|
||||
******** and Sphinx could not patch it, perhaps because your local ...|^^J%
|
||||
******** copy is already fixed without a changed release date. .......|^^J%
|
||||
******** If not, you must update titlesec! ...........................|}}%
|
||||
\fi
|
||||
}%
|
||||
}{}
|
||||
|
||||
% Augment the sectioning commands used to get our own font family in place,
|
||||
% and reset some internal data items (\titleformat from titlesec package)
|
||||
\titleformat{\section}{\Large\py@HeaderFamily}%
|
||||
{\py@TitleColor\thesection}{0.5em}{\py@TitleColor}
|
||||
\titleformat{\subsection}{\large\py@HeaderFamily}%
|
||||
{\py@TitleColor\thesubsection}{0.5em}{\py@TitleColor}
|
||||
\titleformat{\subsubsection}{\py@HeaderFamily}%
|
||||
{\py@TitleColor\thesubsubsection}{0.5em}{\py@TitleColor}
|
||||
% By default paragraphs (and subsubsections) will not be numbered because
|
||||
% sphinxmanual.cls and sphinxhowto.cls set secnumdepth to 2
|
||||
\titleformat{\paragraph}{\py@HeaderFamily}%
|
||||
{\py@TitleColor\theparagraph}{0.5em}{\py@TitleColor}
|
||||
\titleformat{\subparagraph}{\py@HeaderFamily}%
|
||||
{\py@TitleColor\thesubparagraph}{0.5em}{\py@TitleColor}
|
||||
|
||||
|
||||
% Since Sphinx 1.5, users should use HeaderFamily key to 'sphinxsetup' rather
|
||||
% than defining their own \py@HeaderFamily command (which is still possible).
|
||||
% Memo: \py@HeaderFamily is also used by \maketitle as defined in
|
||||
% sphinxmanual.cls/sphinxhowto.cls
|
||||
\newcommand{\py@HeaderFamily}{\spx@opt@HeaderFamily}
|
||||
|
||||
% This sets up the fancy chapter headings that make the documents look
|
||||
% at least a little better than the usual LaTeX output.
|
||||
\@ifpackagewith{fncychap}{Bjarne}{
|
||||
\ChNameVar {\raggedleft\normalsize \py@HeaderFamily}
|
||||
\ChNumVar {\raggedleft\Large \py@HeaderFamily}
|
||||
\ChTitleVar{\raggedleft\Large \py@HeaderFamily}
|
||||
% This creates (numbered) chapter heads without the leading \vspace*{}:
|
||||
\def\@makechapterhead#1{%
|
||||
{\parindent \z@ \raggedright \normalfont
|
||||
\ifnum \c@secnumdepth >\m@ne
|
||||
\if@mainmatter
|
||||
\DOCH
|
||||
\fi
|
||||
\fi
|
||||
\interlinepenalty\@M
|
||||
\if@mainmatter
|
||||
\DOTI{#1}%
|
||||
\else%
|
||||
\DOTIS{#1}%
|
||||
\fi
|
||||
}}
|
||||
}{}% <-- "false" clause of \@ifpackagewith
|
||||
|
||||
% fix fncychap's bug which uses prematurely the \textwidth value
|
||||
\@ifpackagewith{fncychap}{Bjornstrup}
|
||||
{\AtBeginDocument{\mylen\textwidth\advance\mylen-2\myhi}}%
|
||||
{}% <-- "false" clause of \@ifpackagewith
|
||||
|
||||
|
||||
\endinput
|
@ -0,0 +1,79 @@
|
||||
%% PAGE STYLING
|
||||
%
|
||||
% change this info string if making any custom modification
|
||||
\ProvidesFile{sphinxlatexstylepage.sty}[2021/01/27 page styling]
|
||||
|
||||
% Separate paragraphs by space by default.
|
||||
\IfFileExists{parskip-2001-04-09.sty}% since September 2018 TeXLive update
|
||||
% new parskip.sty, but let it rollback to old one.
|
||||
% hopefully TeX installation not broken and LaTeX kernel not too old
|
||||
{\RequirePackage{parskip}[=v1]}
|
||||
% standard one from 1989. Admittedly \section of article/book gives possibly
|
||||
% anomalous spacing, but we can't require September 2018 release for some time.
|
||||
{\RequirePackage{parskip}}
|
||||
|
||||
% Style parameters and macros used by most documents here
|
||||
\raggedbottom
|
||||
\sloppy
|
||||
\hbadness = 5000 % don't print trivial gripes
|
||||
|
||||
% Require package fancyhdr except under memoir class
|
||||
\@ifclassloaded{memoir}{}{\RequirePackage{fancyhdr}}
|
||||
% Use \pagestyle{normal} as the primary pagestyle for text.
|
||||
% Redefine the 'normal' header/footer style when using "fancyhdr" package:
|
||||
\@ifpackageloaded{fancyhdr}{%
|
||||
\ltx@ifundefined{c@chapter}
|
||||
{% no \chapter, "howto" (non-Japanese) docclass
|
||||
\fancypagestyle{plain}{
|
||||
\fancyhf{}
|
||||
\fancyfoot[C]{{\py@HeaderFamily\thepage}}
|
||||
\renewcommand{\headrulewidth}{0pt}
|
||||
\renewcommand{\footrulewidth}{0pt}
|
||||
}
|
||||
% Same as 'plain', this way we can use it in template
|
||||
% FIXME: shouldn't this have a running header with Name and Release like 'manual'?
|
||||
\fancypagestyle{normal}{
|
||||
\fancyhf{}
|
||||
\fancyfoot[C]{{\py@HeaderFamily\thepage}}
|
||||
\renewcommand{\headrulewidth}{0pt}
|
||||
\renewcommand{\footrulewidth}{0pt}
|
||||
}
|
||||
}%
|
||||
{% classes with \chapter command
|
||||
\fancypagestyle{normal}{
|
||||
\fancyhf{}
|
||||
\fancyfoot[RO]{{\py@HeaderFamily\thepage}}
|
||||
\fancyfoot[LO]{{\py@HeaderFamily\nouppercase{\rightmark}}}
|
||||
\fancyhead[RO]{{\py@HeaderFamily \@title\sphinxheadercomma\py@release}}
|
||||
\if@twoside
|
||||
\fancyfoot[LE]{{\py@HeaderFamily\thepage}}
|
||||
\fancyfoot[RE]{{\py@HeaderFamily\nouppercase{\leftmark}}}
|
||||
\fancyhead[LE]{{\py@HeaderFamily \@title\sphinxheadercomma\py@release}}
|
||||
\fi
|
||||
\renewcommand{\headrulewidth}{0.4pt}
|
||||
\renewcommand{\footrulewidth}{0.4pt}
|
||||
% define chaptermark with \@chappos when \@chappos is available for Japanese
|
||||
\ltx@ifundefined{@chappos}{}
|
||||
{\def\chaptermark##1{\markboth{\@chapapp\space\thechapter\space\@chappos\space ##1}{}}}
|
||||
}
|
||||
% Update the plain style so we get the page number & footer line,
|
||||
% but not a chapter or section title. This is to keep the first
|
||||
% page of a chapter `clean.'
|
||||
\fancypagestyle{plain}{
|
||||
\fancyhf{}
|
||||
\fancyfoot[RO]{{\py@HeaderFamily\thepage}}
|
||||
\if@twoside\fancyfoot[LE]{{\py@HeaderFamily\thepage}}\fi
|
||||
\renewcommand{\headrulewidth}{0pt}
|
||||
\renewcommand{\footrulewidth}{0.4pt}
|
||||
}
|
||||
}
|
||||
}
|
||||
{% no fancyhdr: memoir class
|
||||
% Provide default for 'normal' style simply as an alias of 'plain' style
|
||||
% This way we can use \pagestyle{normal} in LaTeX template
|
||||
\def\ps@normal{\ps@plain}
|
||||
% Users of memoir class are invited to redefine 'normal' style in preamble
|
||||
}
|
||||
|
||||
|
||||
\endinput
|
@ -0,0 +1,134 @@
|
||||
%% TEXT STYLING
|
||||
%
|
||||
% change this info string if making any custom modification
|
||||
\ProvidesFile{sphinxlatexstyletext.sty}[2021/12/06 text styling]
|
||||
|
||||
% Basically everything here consists of macros which are part of the latex
|
||||
% markup produced by the Sphinx latex writer
|
||||
|
||||
% 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\sphinxguilabel#1{\emph{#1}}
|
||||
\protected\def\sphinxkeyboard#1{\sphinxcode{#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
|
||||
\def\sphinxstyleindexentry #1{\texttt{#1}}
|
||||
\def\sphinxstyleindexextra #1{ (\emph{#1})}
|
||||
\def\sphinxstyleindexpageref #1{, \pageref{#1}}
|
||||
\def\sphinxstyleindexpagemain#1{\textbf{#1}}
|
||||
\def\spxentry{\@backslashchar spxentry}% let to \sphinxstyleindexentry in index
|
||||
\def\spxextra{\@backslashchar spxextra}% let to \sphinxstyleindexextra in index
|
||||
\def\sphinxstyleindexlettergroup #1%
|
||||
{{\Large\sffamily#1}\nopagebreak\vspace{1mm}}
|
||||
\def\sphinxstyleindexlettergroupDefault #1%
|
||||
{{\Large\sffamily\sphinxnonalphabeticalgroupname}\nopagebreak\vspace{1mm}}
|
||||
\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}
|
||||
% reduce hyperref "Token not allowed in a PDF string" warnings on PDF builds
|
||||
\AtBeginDocument{\pdfstringdefDisableCommands{%
|
||||
% all "protected" macros possibly ending up in section titles should be here
|
||||
% TODO: examine if \sphinxhref, \sphinxurl, \sphinnolinkurl should be handled
|
||||
\let\sphinxstyleemphasis \@firstofone
|
||||
\let\sphinxstyleliteralemphasis \@firstofone
|
||||
\let\sphinxstylestrong \@firstofone
|
||||
\let\sphinxstyleliteralstrong \@firstofone
|
||||
\let\sphinxstyleabbreviation \@firstofone
|
||||
\let\sphinxstyleliteralintitle \@firstofone
|
||||
\let\sphinxupquote \@firstofone
|
||||
\let\sphinxstrong \@firstofone
|
||||
\let\sphinxcode \@firstofone
|
||||
\let\sphinxbfcode \@firstofone
|
||||
\let\sphinxemail \@firstofone
|
||||
\let\sphinxcrossref \@firstofone
|
||||
\let\sphinxtermref \@firstofone
|
||||
\let\sphinxhyphen\sphinxhyphenforbookmarks
|
||||
}}
|
||||
|
||||
% Special characters
|
||||
%
|
||||
% The \kern\z@ is to prevent en-dash and em-dash TeX ligatures.
|
||||
% A linebreak can occur after the dash in regular text (this is
|
||||
% normal behaviour of "-" in TeX, it is not related to \kern\z@).
|
||||
%
|
||||
% Parsed-literals and inline literals also use the \sphinxhyphen
|
||||
% but linebreaks there are prevented due to monospace font family.
|
||||
% (xelatex needs a special addition, cf. sphinxlatexliterals.sty)
|
||||
%
|
||||
% Inside code-blocks, dashes are escaped via another macro, from
|
||||
% Pygments latex output (search for \PYGZhy in sphinxlatexliterals.sty),
|
||||
% and are configured to allow linebreaks despite the monospace font.
|
||||
% (the #1 swallows the {} from \sphinxhyphen{} mark-up)
|
||||
\protected\def\sphinxhyphen#1{-\kern\z@}
|
||||
\protected\def\sphinxhyphennobreak#1{\mbox{-}}
|
||||
% The {} from texescape mark-up is kept, else -- gives en-dash in PDF bookmark
|
||||
\def\sphinxhyphenforbookmarks{-}
|
||||
|
||||
% 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}
|
||||
|
||||
\endinput
|
@ -0,0 +1,481 @@
|
||||
%% TABLES (WITH SUPPORT FOR MERGED CELLS OF GENERAL CONTENTS)
|
||||
%
|
||||
% change this info string if making any custom modification
|
||||
\ProvidesFile{sphinxlatextables.sty}[2021/01/27 tables]%
|
||||
|
||||
% Provides support for this output mark-up from Sphinx latex writer
|
||||
% and table templates:
|
||||
%
|
||||
% - the tabulary and longtable environments from the eponymous packages
|
||||
% - the varwidth environment
|
||||
% - the >{} etc mark-up possible in tabularcolumns is from array package
|
||||
% which is loaded by longtable and tabulary
|
||||
% - \X, \Y, T column types; others (L, C, R, J) are from tabulary package
|
||||
% - \sphinxaftertopcaption
|
||||
% - \sphinxatlongtableend
|
||||
% - \sphinxatlongtablestart
|
||||
% - \sphinxattableend
|
||||
% - \sphinxattablestart
|
||||
% - \sphinxcapstartof
|
||||
% - \sphinxcolwidth
|
||||
% - \sphinxlongtablecapskipadjust
|
||||
% - \sphinxmultirow
|
||||
% - \sphinxstartmulticolumn
|
||||
% - \sphinxstopmulticolumn
|
||||
% - \sphinxtablestrut
|
||||
% - \sphinxthecaptionisattop
|
||||
% - \sphinxthelongtablecaptionisattop
|
||||
%
|
||||
% Executes \RequirePackage for:
|
||||
%
|
||||
% - tabulary
|
||||
% - longtable
|
||||
% - varwidth
|
||||
%
|
||||
% Extends tabulary and longtable via patches and custom macros to support
|
||||
% merged cells possibly containing code-blocks in complex tables
|
||||
|
||||
\RequirePackage{tabulary}
|
||||
% tabulary has a bug with its re-definition of \multicolumn in its first pass
|
||||
% which is not \long. But now Sphinx does not use LaTeX's \multicolumn but its
|
||||
% own macro. Hence we don't even need to patch tabulary. See
|
||||
% sphinxpackagemulticell.sty
|
||||
% X or S (Sphinx) may have meanings if some table package is loaded hence
|
||||
% \X was chosen to avoid possibility of conflict
|
||||
\newcolumntype{\X}[2]{p{\dimexpr
|
||||
(\linewidth-\arrayrulewidth)*#1/#2-\tw@\tabcolsep-\arrayrulewidth\relax}}
|
||||
\newcolumntype{\Y}[1]{p{\dimexpr
|
||||
#1\dimexpr\linewidth-\arrayrulewidth\relax-\tw@\tabcolsep-\arrayrulewidth\relax}}
|
||||
% using here T (for Tabulary) feels less of a problem than the X could be
|
||||
\newcolumntype{T}{J}%
|
||||
% For tables allowing pagebreaks
|
||||
\RequirePackage{longtable}
|
||||
% User interface to set-up whitespace before and after tables:
|
||||
\newcommand*\sphinxtablepre {0pt}%
|
||||
\newcommand*\sphinxtablepost{\medskipamount}%
|
||||
% Space from caption baseline to top of table or frame of literal-block
|
||||
\newcommand*\sphinxbelowcaptionspace{.5\sphinxbaselineskip}%
|
||||
% as one can not use \baselineskip from inside longtable (it is zero there)
|
||||
% we need \sphinxbaselineskip, which defaults to \baselineskip
|
||||
\def\sphinxbaselineskip{\baselineskip}%
|
||||
% The following is to ensure that, whether tabular(y) or longtable:
|
||||
% - if a caption is on top of table:
|
||||
% a) the space between its last baseline and the top rule of table is
|
||||
% exactly \sphinxbelowcaptionspace
|
||||
% b) the space from last baseline of previous text to first baseline of
|
||||
% caption is exactly \parskip+\baselineskip+ height of a strut.
|
||||
% c) the caption text will wrap at width \LTcapwidth (4in)
|
||||
% - make sure this works also if "caption" package is loaded by user
|
||||
% (with its width or margin option taking place of \LTcapwidth role)
|
||||
% TODO: obtain same for caption of literal block: a) & c) DONE, b) TO BE DONE
|
||||
%
|
||||
% To modify space below such top caption, adjust \sphinxbelowcaptionspace
|
||||
% To add or remove space above such top caption, adjust \sphinxtablepre:
|
||||
% notice that \abovecaptionskip, \belowcaptionskip, \LTpre are **ignored**
|
||||
% A. Table with longtable
|
||||
\def\sphinxatlongtablestart
|
||||
{\par
|
||||
\vskip\parskip
|
||||
\vskip\dimexpr\sphinxtablepre\relax % adjust vertical position
|
||||
\vbox{}% get correct baseline from above
|
||||
\LTpre\z@skip\LTpost\z@skip % set to zero longtable's own skips
|
||||
\edef\sphinxbaselineskip{\dimexpr\the\dimexpr\baselineskip\relax\relax}%
|
||||
}%
|
||||
% Compatibility with caption package
|
||||
\def\sphinxthelongtablecaptionisattop{%
|
||||
\spx@ifcaptionpackage{\noalign{\vskip-\belowcaptionskip}}{}%
|
||||
}%
|
||||
% Achieves exactly \sphinxbelowcaptionspace below longtable caption
|
||||
\def\sphinxlongtablecapskipadjust
|
||||
{\dimexpr-\dp\strutbox
|
||||
-\spx@ifcaptionpackage{\abovecaptionskip}{\sphinxbaselineskip}%
|
||||
+\sphinxbelowcaptionspace\relax}%
|
||||
\def\sphinxatlongtableend{\@nobreakfalse % latex3/latex2e#173
|
||||
\prevdepth\z@\vskip\sphinxtablepost\relax}%
|
||||
% B. Table with tabular or tabulary
|
||||
\def\sphinxattablestart{\par\vskip\dimexpr\sphinxtablepre\relax}%
|
||||
\let\sphinxattableend\sphinxatlongtableend
|
||||
% This is used by tabular and tabulary templates
|
||||
\newcommand*\sphinxcapstartof[1]{%
|
||||
\vskip\parskip
|
||||
\vbox{}% force baselineskip for good positioning by capstart of hyperanchor
|
||||
% hyperref puts the anchor 6pt above this baseline; in case of caption
|
||||
% this baseline will be \ht\strutbox above first baseline of caption
|
||||
\def\@captype{#1}%
|
||||
\capstart
|
||||
% move back vertically, as tabular (or its caption) will compensate
|
||||
\vskip-\baselineskip\vskip-\parskip
|
||||
}%
|
||||
\def\sphinxthecaptionisattop{% locate it after \sphinxcapstartof
|
||||
\spx@ifcaptionpackage
|
||||
{\caption@setposition{t}%
|
||||
\vskip\baselineskip\vskip\parskip % undo those from \sphinxcapstartof
|
||||
\vskip-\belowcaptionskip % anticipate caption package skip
|
||||
% caption package uses a \vbox, not a \vtop, so "single line" case
|
||||
% gives different result from "multi-line" without this:
|
||||
\nointerlineskip
|
||||
}%
|
||||
{}%
|
||||
}%
|
||||
\def\sphinxthecaptionisatbottom{% (not finalized; for template usage)
|
||||
\spx@ifcaptionpackage{\caption@setposition{b}}{}%
|
||||
}%
|
||||
% The aim of \sphinxcaption is to apply to tabular(y) the maximal width
|
||||
% of caption as done by longtable
|
||||
\def\sphinxtablecapwidth{\LTcapwidth}%
|
||||
\newcommand\sphinxcaption{\@dblarg\spx@caption}%
|
||||
\long\def\spx@caption[#1]#2{%
|
||||
\noindent\hb@xt@\linewidth{\hss
|
||||
\vtop{\@tempdima\dimexpr\sphinxtablecapwidth\relax
|
||||
% don't exceed linewidth for the caption width
|
||||
\ifdim\@tempdima>\linewidth\hsize\linewidth\else\hsize\@tempdima\fi
|
||||
% longtable ignores \abovecaptionskip/\belowcaptionskip, so do the same here
|
||||
\abovecaptionskip\sphinxabovecaptionskip % \z@skip
|
||||
\belowcaptionskip\sphinxbelowcaptionskip % \z@skip
|
||||
\caption[{#1}]%
|
||||
{\strut\ignorespaces#2\ifhmode\unskip\@finalstrut\strutbox\fi}%
|
||||
}\hss}%
|
||||
\par\prevdepth\dp\strutbox
|
||||
}%
|
||||
\def\sphinxabovecaptionskip{\z@skip}% Do not use! Flagged for removal
|
||||
\def\sphinxbelowcaptionskip{\z@skip}% Do not use! Flagged for removal
|
||||
% This wrapper of \abovecaptionskip is used in sphinxVerbatim for top
|
||||
% caption, and with another value in sphinxVerbatimintable
|
||||
% TODO: To unify space above caption of a code-block with the one above
|
||||
% caption of a table/longtable, \abovecaptionskip must not be used
|
||||
% This auxiliary will get renamed and receive a different meaning
|
||||
% in future.
|
||||
\def\spx@abovecaptionskip{\abovecaptionskip}%
|
||||
% Achieve \sphinxbelowcaptionspace below a caption located above a tabular
|
||||
% or a tabulary
|
||||
\newcommand\sphinxaftertopcaption
|
||||
{%
|
||||
\spx@ifcaptionpackage
|
||||
{\par\prevdepth\dp\strutbox\nobreak\vskip-\abovecaptionskip}{\nobreak}%
|
||||
\vskip\dimexpr\sphinxbelowcaptionspace\relax
|
||||
\vskip-\baselineskip\vskip-\parskip
|
||||
}%
|
||||
% varwidth is crucial for our handling of general contents in merged cells
|
||||
\RequirePackage{varwidth}
|
||||
% but addition of a compatibility patch with hyperref is needed
|
||||
% (tested with varwidth v 0.92 Mar 2009)
|
||||
\AtBeginDocument {%
|
||||
\let\@@vwid@Hy@raisedlink\Hy@raisedlink
|
||||
\long\def\@vwid@Hy@raisedlink#1{\@vwid@wrap{\@@vwid@Hy@raisedlink{#1}}}%
|
||||
\edef\@vwid@setup{%
|
||||
\let\noexpand\Hy@raisedlink\noexpand\@vwid@Hy@raisedlink % HYPERREF !
|
||||
\unexpanded\expandafter{\@vwid@setup}}%
|
||||
}%
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%
|
||||
% --- MULTICOLUMN ---
|
||||
% standard LaTeX's \multicolumn
|
||||
% 1. does not allow verbatim contents,
|
||||
% 2. interacts very poorly with tabulary.
|
||||
%
|
||||
% It is needed to write own macros for Sphinx: to allow code-blocks in merged
|
||||
% cells rendered by tabular/longtable, and to allow multi-column cells with
|
||||
% paragraphs to be taken into account sanely by tabulary algorithm for column
|
||||
% widths.
|
||||
%
|
||||
% This requires quite a bit of hacking. First, in Sphinx, the multi-column
|
||||
% contents will *always* be wrapped in a varwidth environment. The issue
|
||||
% becomes to pass it the correct target width. We must trick tabulary into
|
||||
% believing the multicolumn is simply separate columns, else tabulary does not
|
||||
% incorporate the contents in its algorithm. But then we must clear the
|
||||
% vertical rules...
|
||||
%
|
||||
% configuration of tabulary
|
||||
\setlength{\tymin}{3\fontcharwd\font`0 }% minimal width of "squeezed" columns
|
||||
\setlength{\tymax}{10000pt}% allow enough room for paragraphs to "compete"
|
||||
% we need access to tabulary's final computed width. \@tempdima is too volatile
|
||||
% to hope it has kept tabulary's value when \sphinxcolwidth needs it.
|
||||
\newdimen\sphinx@TY@tablewidth
|
||||
\def\tabulary{%
|
||||
\def\TY@final{\sphinx@TY@tablewidth\@tempdima\tabular}%
|
||||
\let\endTY@final\endtabular
|
||||
\TY@tabular}%
|
||||
% next hack is needed only if user has set latex_use_latex_multicolumn to True:
|
||||
% it fixes tabulary's bug with \multicolumn defined "short" in first pass. (if
|
||||
% upstream tabulary adds a \long, our extra one causes no harm)
|
||||
\def\sphinx@tempa #1\def\multicolumn#2#3#4#5#6#7#8#9\sphinx@tempa
|
||||
{\def\TY@tab{#1\long\def\multicolumn####1####2####3{\multispan####1\relax}#9}}%
|
||||
\expandafter\sphinx@tempa\TY@tab\sphinx@tempa
|
||||
%
|
||||
% TN. 1: as \omit is never executed, Sphinx multicolumn does not need to worry
|
||||
% like standard multicolumn about |l| vs l|. On the other hand it assumes
|
||||
% columns are separated by a | ... (if not it will add extraneous
|
||||
% \arrayrulewidth space for each column separation in its estimate of available
|
||||
% width).
|
||||
%
|
||||
% TN. 1b: as Sphinx multicolumn uses neither \omit nor \span, it can not
|
||||
% (easily) get rid of extra macros from >{...} or <{...} between columns. At
|
||||
% least, it has been made compatible with colortbl's \columncolor.
|
||||
%
|
||||
% TN. 2: tabulary's second pass is handled like tabular/longtable's single
|
||||
% pass, with the difference that we hacked \TY@final to set in
|
||||
% \sphinx@TY@tablewidth the final target width as computed by tabulary. This is
|
||||
% needed only to handle columns with a "horizontal" specifier: "p" type columns
|
||||
% (inclusive of tabulary's LJRC) holds the target column width in the
|
||||
% \linewidth dimension.
|
||||
%
|
||||
% TN. 3: use of \begin{sphinxmulticolumn}...\end{sphinxmulticolumn} mark-up
|
||||
% would need some hacking around the fact that groups can not span across table
|
||||
% cells (the code does inserts & tokens, see TN1b). It was decided to keep it
|
||||
% simple with \sphinxstartmulticolumn...\sphinxstopmulticolumn.
|
||||
%
|
||||
% MEMO about nesting: if sphinxmulticolumn is encountered in a nested tabular
|
||||
% inside a tabulary it will think to be at top level in the tabulary. But
|
||||
% Sphinx generates no nested tables, and if some LaTeX macro uses internally a
|
||||
% tabular this will not have a \sphinxstartmulticolumn within it!
|
||||
%
|
||||
\def\sphinxstartmulticolumn{%
|
||||
\ifx\equation$% $ tabulary's first pass
|
||||
\expandafter\sphinx@TYI@start@multicolumn
|
||||
\else % either not tabulary or tabulary's second pass
|
||||
\expandafter\sphinx@start@multicolumn
|
||||
\fi
|
||||
}%
|
||||
\def\sphinxstopmulticolumn{%
|
||||
\ifx\equation$% $ tabulary's first pass
|
||||
\expandafter\sphinx@TYI@stop@multicolumn
|
||||
\else % either not tabulary or tabulary's second pass
|
||||
\ignorespaces
|
||||
\fi
|
||||
}%
|
||||
\def\sphinx@TYI@start@multicolumn#1{%
|
||||
% use \gdef always to avoid stack space build up
|
||||
\gdef\sphinx@tempa{#1}\begingroup\setbox\z@\hbox\bgroup
|
||||
}%
|
||||
\def\sphinx@TYI@stop@multicolumn{\egroup % varwidth was used with \tymax
|
||||
\xdef\sphinx@tempb{\the\dimexpr\wd\z@/\sphinx@tempa}% per column width
|
||||
\endgroup
|
||||
\expandafter\sphinx@TYI@multispan\expandafter{\sphinx@tempa}%
|
||||
}%
|
||||
\def\sphinx@TYI@multispan #1{%
|
||||
\kern\sphinx@tempb\ignorespaces % the per column occupied width
|
||||
\ifnum#1>\@ne % repeat, taking into account subtleties of TeX's & ...
|
||||
\expandafter\sphinx@TYI@multispan@next\expandafter{\the\numexpr#1-\@ne\expandafter}%
|
||||
\fi
|
||||
}%
|
||||
\def\sphinx@TYI@multispan@next{&\relax\sphinx@TYI@multispan}%
|
||||
%
|
||||
% Now the branch handling either the second pass of tabulary or the single pass
|
||||
% of tabular/longtable. This is the delicate part where we gather the
|
||||
% dimensions from the p columns either set-up by tabulary or by user p column
|
||||
% or Sphinx \X, \Y columns. The difficulty is that to get the said width, the
|
||||
% template must be inserted (other hacks would be horribly complicated except
|
||||
% if we rewrote crucial parts of LaTeX's \@array !) and we can not do
|
||||
% \omit\span like standard \multicolumn's easy approach. Thus we must cancel
|
||||
% the \vrule separators. Also, perhaps the column specifier is of the l, c, r
|
||||
% type, then we attempt an ad hoc rescue to give varwidth a reasonable target
|
||||
% width.
|
||||
\def\sphinx@start@multicolumn#1{%
|
||||
\gdef\sphinx@multiwidth{0pt}\gdef\sphinx@tempa{#1}\sphinx@multispan{#1}%
|
||||
}%
|
||||
\def\sphinx@multispan #1{%
|
||||
\ifnum#1=\@ne\expandafter\sphinx@multispan@end
|
||||
\else\expandafter\sphinx@multispan@next
|
||||
\fi {#1}%
|
||||
}%
|
||||
\def\sphinx@multispan@next #1{%
|
||||
% trick to recognize L, C, R, J or p, m, b type columns
|
||||
\ifdim\baselineskip>\z@
|
||||
\gdef\sphinx@tempb{\linewidth}%
|
||||
\else
|
||||
% if in an l, r, c type column, try and hope for the best
|
||||
\xdef\sphinx@tempb{\the\dimexpr(\ifx\TY@final\@undefined\linewidth\else
|
||||
\sphinx@TY@tablewidth\fi-\arrayrulewidth)/\sphinx@tempa
|
||||
-\tw@\tabcolsep-\arrayrulewidth\relax}%
|
||||
\fi
|
||||
\noindent\kern\sphinx@tempb\relax
|
||||
\xdef\sphinx@multiwidth
|
||||
{\the\dimexpr\sphinx@multiwidth+\sphinx@tempb+\tw@\tabcolsep+\arrayrulewidth}%
|
||||
% hack the \vline and the colortbl macros
|
||||
\sphinx@hack@vline\sphinx@hack@CT&\relax
|
||||
% repeat
|
||||
\expandafter\sphinx@multispan\expandafter{\the\numexpr#1-\@ne}%
|
||||
}%
|
||||
% packages like colortbl add group levels, we need to "climb back up" to be
|
||||
% able to hack the \vline and also the colortbl inserted tokens. This creates
|
||||
% empty space whether or not the columns were | separated:
|
||||
\def\sphinx@hack@vline{\ifnum\currentgrouptype=6\relax
|
||||
\kern\arrayrulewidth\arrayrulewidth\z@\else\aftergroup\sphinx@hack@vline\fi}%
|
||||
\def\sphinx@hack@CT{\ifnum\currentgrouptype=6\relax
|
||||
\let\CT@setup\sphinx@CT@setup\else\aftergroup\sphinx@hack@CT\fi}%
|
||||
% It turns out \CT@row@color is not expanded contrarily to \CT@column@color
|
||||
% during LaTeX+colortbl preamble preparation, hence it would be possible for
|
||||
% \sphinx@CT@setup to discard only the column color and choose to obey or not
|
||||
% row color and cell color. It would even be possible to propagate cell color
|
||||
% to row color for the duration of the Sphinx multicolumn... the (provisional?)
|
||||
% choice has been made to cancel the colortbl colours for the multicolumn
|
||||
% duration.
|
||||
\def\sphinx@CT@setup #1\endgroup{\endgroup}% hack to remove colour commands
|
||||
\def\sphinx@multispan@end#1{%
|
||||
% first, trace back our steps horizontally
|
||||
\noindent\kern-\dimexpr\sphinx@multiwidth\relax
|
||||
% and now we set the final computed width for the varwidth environment
|
||||
\ifdim\baselineskip>\z@
|
||||
\xdef\sphinx@multiwidth{\the\dimexpr\sphinx@multiwidth+\linewidth}%
|
||||
\else
|
||||
\xdef\sphinx@multiwidth{\the\dimexpr\sphinx@multiwidth+
|
||||
(\ifx\TY@final\@undefined\linewidth\else
|
||||
\sphinx@TY@tablewidth\fi-\arrayrulewidth)/\sphinx@tempa
|
||||
-\tw@\tabcolsep-\arrayrulewidth\relax}%
|
||||
\fi
|
||||
% we need to remove colour set-up also for last cell of the multi-column
|
||||
\aftergroup\sphinx@hack@CT
|
||||
}%
|
||||
\newcommand*\sphinxcolwidth[2]{%
|
||||
% this dimension will always be used for varwidth, and serves as maximum
|
||||
% width when cells are merged either via multirow or multicolumn or both,
|
||||
% as always their contents is wrapped in varwidth environment.
|
||||
\ifnum#1>\@ne % multi-column (and possibly also multi-row)
|
||||
% we wrote our own multicolumn code especially to handle that (and allow
|
||||
% verbatim contents)
|
||||
\ifx\equation$%$
|
||||
\tymax % first pass of tabulary (cf MEMO above regarding nesting)
|
||||
\else % the \@gobble thing is for compatibility with standard \multicolumn
|
||||
\sphinx@multiwidth\@gobble{#1/#2}%
|
||||
\fi
|
||||
\else % single column multirow
|
||||
\ifx\TY@final\@undefined % not a tabulary.
|
||||
\ifdim\baselineskip>\z@
|
||||
% in a p{..} type column, \linewidth is the target box width
|
||||
\linewidth
|
||||
\else
|
||||
% l, c, r columns. Do our best.
|
||||
\dimexpr(\linewidth-\arrayrulewidth)/#2-
|
||||
\tw@\tabcolsep-\arrayrulewidth\relax
|
||||
\fi
|
||||
\else % in tabulary
|
||||
\ifx\equation$%$% first pass
|
||||
\tymax % it is set to a big value so that paragraphs can express themselves
|
||||
\else
|
||||
% second pass.
|
||||
\ifdim\baselineskip>\z@
|
||||
\linewidth % in a L, R, C, J column or a p, \X, \Y ...
|
||||
\else
|
||||
% we have hacked \TY@final to put in \sphinx@TY@tablewidth the table width
|
||||
\dimexpr(\sphinx@TY@tablewidth-\arrayrulewidth)/#2-
|
||||
\tw@\tabcolsep-\arrayrulewidth\relax
|
||||
\fi
|
||||
\fi
|
||||
\fi
|
||||
\fi
|
||||
}%
|
||||
% fallback default in case user has set latex_use_latex_multicolumn to True:
|
||||
% \sphinxcolwidth will use this only inside LaTeX's standard \multicolumn
|
||||
\def\sphinx@multiwidth #1#2{\dimexpr % #1 to gobble the \@gobble (!)
|
||||
(\ifx\TY@final\@undefined\linewidth\else\sphinx@TY@tablewidth\fi
|
||||
-\arrayrulewidth)*#2-\tw@\tabcolsep-\arrayrulewidth\relax}%
|
||||
|
||||
%%%%%%%%%%%%%%%%%%
|
||||
% --- MULTIROW ---
|
||||
% standard \multirow
|
||||
% 1. does not allow verbatim contents,
|
||||
% 2. does not allow blank lines in its argument,
|
||||
% 3. its * specifier means to typeset "horizontally" which is very
|
||||
% bad for paragraph content. 2016 version has = specifier but it
|
||||
% must be used with p type columns only, else results are bad,
|
||||
% 4. it requires manual intervention if the contents is too long to fit
|
||||
% in the asked-for number of rows.
|
||||
% 5. colour panels (either from \rowcolor or \columncolor) will hide
|
||||
% the bottom part of multirow text, hence manual tuning is needed
|
||||
% to put the multirow insertion at the _bottom_.
|
||||
%
|
||||
% The Sphinx solution consists in always having contents wrapped
|
||||
% in a varwidth environment so that it makes sense to estimate how many
|
||||
% lines it will occupy, and then ensure by insertion of suitable struts
|
||||
% that the table rows have the needed height. The needed mark-up is done
|
||||
% by LaTeX writer, which has its own id for the merged cells.
|
||||
%
|
||||
% The colour issue is solved by clearing colour panels in all cells,
|
||||
% whether or not the multirow is single-column or multi-column.
|
||||
%
|
||||
% In passing we obtain baseline alignements across rows (only if
|
||||
% \arraystretch is 1, as LaTeX's does not obey \arraystretch in "p"
|
||||
% multi-line contents, only first and last line...)
|
||||
%
|
||||
% TODO: examine the situation with \arraystretch > 1. The \extrarowheight
|
||||
% is hopeless for multirow anyhow, it makes baseline alignment strictly
|
||||
% impossible.
|
||||
\newcommand\sphinxmultirow[2]{\begingroup
|
||||
% #1 = nb of spanned rows, #2 = Sphinx id of "cell", #3 = contents
|
||||
% but let's fetch #3 in a way allowing verbatim contents !
|
||||
\def\sphinx@nbofrows{#1}\def\sphinx@cellid{#2}%
|
||||
\afterassignment\sphinx@multirow\let\next=
|
||||
}%
|
||||
\def\sphinx@multirow {%
|
||||
\setbox\z@\hbox\bgroup\aftergroup\sphinx@@multirow\strut
|
||||
}%
|
||||
\def\sphinx@@multirow {%
|
||||
% The contents, which is a varwidth environment, has been captured in
|
||||
% \box0 (a \hbox).
|
||||
% We have with \sphinx@cellid an assigned unique id. The goal is to give
|
||||
% about the same height to all the involved rows.
|
||||
% For this Sphinx will insert a \sphinxtablestrut{cell_id} mark-up
|
||||
% in LaTeX file and the expansion of the latter will do the suitable thing.
|
||||
\dimen@\dp\z@
|
||||
\dimen\tw@\ht\@arstrutbox
|
||||
\advance\dimen@\dimen\tw@
|
||||
\advance\dimen\tw@\dp\@arstrutbox
|
||||
\count@=\dimen@ % type conversion dim -> int
|
||||
\count\tw@=\dimen\tw@
|
||||
\divide\count@\count\tw@ % TeX division truncates
|
||||
\advance\dimen@-\count@\dimen\tw@
|
||||
% 1300sp is about 0.02pt. For comparison a rule default width is 0.4pt.
|
||||
% (note that if \count@ holds 0, surely \dimen@>1300sp)
|
||||
\ifdim\dimen@>1300sp \advance\count@\@ne \fi
|
||||
% now \count@ holds the count L of needed "lines"
|
||||
% and \sphinx@nbofrows holds the number N of rows
|
||||
% we have L >= 1 and N >= 1
|
||||
% if L is a multiple of N, ... clear what to do !
|
||||
% else write L = qN + r, 1 <= r < N and we will
|
||||
% arrange for each row to have enough space for:
|
||||
% q+1 "lines" in each of the first r rows
|
||||
% q "lines" in each of the (N-r) bottom rows
|
||||
% for a total of (q+1) * r + q * (N-r) = q * N + r = L
|
||||
% It is possible that q == 0.
|
||||
\count\tw@\count@
|
||||
% the TeX division truncates
|
||||
\divide\count\tw@\sphinx@nbofrows\relax
|
||||
\count4\count\tw@ % q
|
||||
\multiply\count\tw@\sphinx@nbofrows\relax
|
||||
\advance\count@-\count\tw@ % r
|
||||
\expandafter\xdef\csname sphinx@tablestrut_\sphinx@cellid\endcsname
|
||||
{\noexpand\sphinx@tablestrut{\the\count4}{\the\count@}{\sphinx@cellid}}%
|
||||
\dp\z@\z@
|
||||
% this will use the real height if it is >\ht\@arstrutbox
|
||||
\sphinxtablestrut{\sphinx@cellid}\box\z@
|
||||
\endgroup % group was opened in \sphinxmultirow
|
||||
}%
|
||||
\newcommand*\sphinxtablestrut[1]{%
|
||||
% #1 is a "cell_id", i.e. the id of a merged group of table cells
|
||||
\csname sphinx@tablestrut_#1\endcsname
|
||||
}%
|
||||
% LaTeX typesets the table row by row, hence each execution can do
|
||||
% an update for the next row.
|
||||
\newcommand*\sphinx@tablestrut[3]{\begingroup
|
||||
% #1 = q, #2 = (initially) r, #3 = cell_id, q+1 lines in first r rows
|
||||
% if #2 = 0, create space for max(q,1) table lines
|
||||
% if #2 > 0, create space for q+1 lines and decrement #2
|
||||
\leavevmode
|
||||
\count@#1\relax
|
||||
\ifnum#2=\z@
|
||||
\ifnum\count@=\z@\count@\@ne\fi
|
||||
\else
|
||||
% next row will be with a #2 decremented by one
|
||||
\expandafter\xdef\csname sphinx@tablestrut_#3\endcsname
|
||||
{\noexpand\sphinx@tablestrut{#1}{\the\numexpr#2-\@ne}{#3}}%
|
||||
\advance\count@\@ne
|
||||
\fi
|
||||
\vrule\@height\ht\@arstrutbox
|
||||
\@depth\dimexpr\count@\ht\@arstrutbox+\count@\dp\@arstrutbox-\ht\@arstrutbox\relax
|
||||
\@width\z@
|
||||
\endgroup
|
||||
% we need this to avoid colour panels hiding bottom parts of multirow text
|
||||
\sphinx@hack@CT
|
||||
}%
|
||||
|
||||
\endinput
|
@ -0,0 +1,128 @@
|
||||
%
|
||||
% sphinxmanual.cls for Sphinx (https://www.sphinx-doc.org/)
|
||||
%
|
||||
|
||||
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
|
||||
\ProvidesClass{sphinxmanual}[2019/12/01 v2.3.0 Document class (Sphinx manual)]
|
||||
|
||||
% chapters starting at odd pages (overridden by 'openany' document option)
|
||||
\PassOptionsToClass{openright}{\sphinxdocclass}
|
||||
|
||||
% 'oneside' option overriding the 'twoside' default
|
||||
\newif\if@oneside
|
||||
\DeclareOption{oneside}{\@onesidetrue}
|
||||
% Pass remaining document options to the parent class.
|
||||
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\sphinxdocclass}}
|
||||
\ProcessOptions\relax
|
||||
|
||||
% Defaults two-side document
|
||||
\if@oneside
|
||||
% nothing to do (oneside is the default)
|
||||
\else
|
||||
\PassOptionsToClass{twoside}{\sphinxdocclass}
|
||||
\fi
|
||||
|
||||
\LoadClass{\sphinxdocclass}
|
||||
|
||||
% Set some sane defaults for section numbering depth and TOC depth. You can
|
||||
% reset these counters in your preamble.
|
||||
%
|
||||
\setcounter{secnumdepth}{2}
|
||||
\setcounter{tocdepth}{1}
|
||||
|
||||
% Adapt \and command to the flushright context of \sphinxmaketitle, to
|
||||
% avoid ragged line endings if author names do not fit all on one single line
|
||||
\DeclareRobustCommand{\and}{%
|
||||
\end{tabular}\kern-\tabcolsep
|
||||
\allowbreak
|
||||
\hskip\dimexpr1em+\tabcolsep\@plus.17fil\begin{tabular}[t]{c}%
|
||||
}%
|
||||
% If it is desired that each author name be on its own line, use in preamble:
|
||||
%\DeclareRobustCommand{\and}{%
|
||||
% \end{tabular}\kern-\tabcolsep\\\begin{tabular}[t]{c}%
|
||||
%}%
|
||||
% Change the title page to look a bit better, and fit in with the fncychap
|
||||
% ``Bjarne'' style a bit better.
|
||||
%
|
||||
\newcommand{\sphinxmaketitle}{%
|
||||
\let\sphinxrestorepageanchorsetting\relax
|
||||
\ifHy@pageanchor\def\sphinxrestorepageanchorsetting{\Hy@pageanchortrue}\fi
|
||||
\hypersetup{pageanchor=false}% avoid duplicate destination warnings
|
||||
\begin{titlepage}%
|
||||
\let\footnotesize\small
|
||||
\let\footnoterule\relax
|
||||
\noindent\rule{\textwidth}{1pt}\par
|
||||
\begingroup % for PDF information dictionary
|
||||
\def\endgraf{ }\def\and{\& }%
|
||||
\pdfstringdefDisableCommands{\def\\{, }}% overwrite hyperref setup
|
||||
\hypersetup{pdfauthor={\@author}, pdftitle={\@title}}%
|
||||
\endgroup
|
||||
\begin{flushright}%
|
||||
\sphinxlogo
|
||||
\py@HeaderFamily
|
||||
{\Huge \@title \par}
|
||||
{\itshape\LARGE \py@release\releaseinfo \par}
|
||||
\vfill
|
||||
{\LARGE
|
||||
\begin{tabular}[t]{c}
|
||||
\@author
|
||||
\end{tabular}\kern-\tabcolsep
|
||||
\par}
|
||||
\vfill\vfill
|
||||
{\large
|
||||
\@date \par
|
||||
\vfill
|
||||
\py@authoraddress \par
|
||||
}%
|
||||
\end{flushright}%\par
|
||||
\@thanks
|
||||
\end{titlepage}%
|
||||
\setcounter{footnote}{0}%
|
||||
\let\thanks\relax\let\maketitle\relax
|
||||
%\gdef\@thanks{}\gdef\@author{}\gdef\@title{}
|
||||
\clearpage
|
||||
\ifdefined\sphinxbackoftitlepage\sphinxbackoftitlepage\fi
|
||||
\if@openright\cleardoublepage\else\clearpage\fi
|
||||
\sphinxrestorepageanchorsetting
|
||||
}
|
||||
|
||||
\newcommand{\sphinxtableofcontents}{%
|
||||
\pagenumbering{roman}%
|
||||
\begingroup
|
||||
\parskip \z@skip
|
||||
\sphinxtableofcontentshook
|
||||
\tableofcontents
|
||||
\endgroup
|
||||
% before resetting page counter, let's do the right thing.
|
||||
\if@openright\cleardoublepage\else\clearpage\fi
|
||||
\pagenumbering{arabic}%
|
||||
}
|
||||
|
||||
% This is needed to get the width of the section # area wide enough in the
|
||||
% library reference. Doing it here keeps it the same for all the manuals.
|
||||
%
|
||||
\newcommand{\sphinxtableofcontentshook}{%
|
||||
\renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.6em}}%
|
||||
\renewcommand*\l@subsection{\@dottedtocline{2}{4.1em}{3.5em}}%
|
||||
}
|
||||
|
||||
% Fix the bibliography environment to add an entry to the Table of
|
||||
% Contents.
|
||||
% For a report document class this environment is a chapter.
|
||||
%
|
||||
\newenvironment{sphinxthebibliography}[1]{%
|
||||
\if@openright\cleardoublepage\else\clearpage\fi
|
||||
% \phantomsection % not needed here since TeXLive 2010's hyperref
|
||||
\begin{thebibliography}{#1}%
|
||||
\addcontentsline{toc}{chapter}{\bibname}}{\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}{%
|
||||
\if@openright\cleardoublepage\else\clearpage\fi
|
||||
\phantomsection % needed as no chapter, section, ... created
|
||||
\begin{theindex}%
|
||||
\addcontentsline{toc}{chapter}{\indexname}}{\end{theindex}}}
|
@ -0,0 +1,21 @@
|
||||
%
|
||||
% sphinxmessages.sty
|
||||
%
|
||||
% message resources for Sphinx
|
||||
%
|
||||
\ProvidesPackage{sphinxmessages}[2019/01/04 v2.0 Localized LaTeX macros (Sphinx team)]
|
||||
|
||||
\renewcommand{\literalblockcontinuedname}{continued from previous page}
|
||||
\renewcommand{\literalblockcontinuesname}{continues on next page}
|
||||
\renewcommand{\sphinxnonalphabeticalgroupname}{Non\sphinxhyphen{}alphabetical}
|
||||
\renewcommand{\sphinxsymbolsname}{Symbols}
|
||||
\renewcommand{\sphinxnumbersname}{Numbers}
|
||||
\def\pageautorefname{page}
|
||||
|
||||
\addto\captionsenglish{\renewcommand{\figurename}{Figure }}
|
||||
\def\fnum@figure{\figurename\thefigure{}.}
|
||||
|
||||
\addto\captionsenglish{\renewcommand{\tablename}{Table }}
|
||||
\def\fnum@table{\tablename\thetable{}.}
|
||||
|
||||
\addto\captionsenglish{\renewcommand{\literalblockname}{Listing}}
|
@ -0,0 +1,54 @@
|
||||
%% OPTIONS FOR GEOMETRY
|
||||
%
|
||||
% change this info string if making any custom modification
|
||||
\ProvidesFile{sphinxoptionsgeometry.sty}[2021/01/27 geometry]
|
||||
|
||||
% geometry
|
||||
\ifx\kanjiskip\@undefined
|
||||
\PassOptionsToPackage{%
|
||||
hmargin={\unexpanded{\spx@opt@hmargin}},%
|
||||
vmargin={\unexpanded{\spx@opt@vmargin}},%
|
||||
marginpar=\unexpanded{\spx@opt@marginpar}}
|
||||
{geometry}
|
||||
\else
|
||||
% set text width for Japanese documents to be integer multiple of 1zw
|
||||
% and text height to be integer multiple of \baselineskip
|
||||
% the execution is delayed to \sphinxsetup then geometry.sty
|
||||
\normalsize\normalfont
|
||||
\newcommand*\sphinxtextwidthja[1]{%
|
||||
\if@twocolumn\tw@\fi
|
||||
\dimexpr
|
||||
\numexpr\dimexpr\paperwidth-\tw@\dimexpr#1\relax\relax/
|
||||
\dimexpr\if@twocolumn\tw@\else\@ne\fi zw\relax
|
||||
zw\relax}%
|
||||
\newcommand*\sphinxmarginparwidthja[1]{%
|
||||
\dimexpr\numexpr\dimexpr#1\relax/\dimexpr1zw\relax zw\relax}%
|
||||
\newcommand*\sphinxtextlinesja[1]{%
|
||||
\numexpr\@ne+\dimexpr\paperheight-\topskip-\tw@\dimexpr#1\relax\relax/
|
||||
\baselineskip\relax}%
|
||||
\ifx\@jsc@uplatextrue\@undefined\else
|
||||
% the way we found in order for the papersize special written by
|
||||
% geometry in the dvi file to be correct in case of jsbook class
|
||||
\ifnum\mag=\@m\else % do nothing special if nomag class option or 10pt
|
||||
\PassOptionsToPackage{truedimen}{geometry}%
|
||||
\fi
|
||||
\fi
|
||||
\PassOptionsToPackage{%
|
||||
hmarginratio={1:1},%
|
||||
textwidth=\unexpanded{\sphinxtextwidthja{\spx@opt@hmargin}},%
|
||||
vmarginratio={1:1},%
|
||||
lines=\unexpanded{\sphinxtextlinesja{\spx@opt@vmargin}},%
|
||||
marginpar=\unexpanded{\sphinxmarginparwidthja{\spx@opt@marginpar}},%
|
||||
footskip=2\baselineskip,%
|
||||
}{geometry}%
|
||||
\AtBeginDocument
|
||||
{% update a dimension used by the jsclasses
|
||||
\ifx\@jsc@uplatextrue\@undefined\else\fullwidth\textwidth\fi
|
||||
% for some reason, jreport normalizes all dimensions with \@settopoint
|
||||
\@ifclassloaded{jreport}
|
||||
{\@settopoint\textwidth\@settopoint\textheight\@settopoint\marginparwidth}
|
||||
{}% <-- "false" clause of \@ifclassloaded
|
||||
}%
|
||||
\fi
|
||||
|
||||
\endinput
|
@ -0,0 +1,35 @@
|
||||
%% Bookmarks and hyperlinks
|
||||
%
|
||||
% change this info string if making any custom modification
|
||||
\ProvidesFile{sphinxoptionshyperref.sty}[2021/01/27 hyperref]
|
||||
|
||||
% to make pdf with correct encoded bookmarks in Japanese
|
||||
% this should precede the hyperref package
|
||||
\ifx\kanjiskip\@undefined
|
||||
% for non-Japanese: make sure bookmarks are ok also with lualatex
|
||||
\PassOptionsToPackage{pdfencoding=unicode}{hyperref}
|
||||
\else
|
||||
\RequirePackage{atbegshi}
|
||||
\ifx\ucs\@undefined
|
||||
\ifnum 42146=\euc"A4A2
|
||||
\AtBeginShipoutFirst{\special{pdf:tounicode EUC-UCS2}}
|
||||
\else
|
||||
\AtBeginShipoutFirst{\special{pdf:tounicode 90ms-RKSJ-UCS2}}
|
||||
\fi
|
||||
\else
|
||||
\AtBeginShipoutFirst{\special{pdf:tounicode UTF8-UCS2}}
|
||||
\fi
|
||||
\fi
|
||||
|
||||
\ifx\@jsc@uplatextrue\@undefined\else
|
||||
\PassOptionsToPackage{setpagesize=false}{hyperref}
|
||||
\fi
|
||||
|
||||
% These options can be overridden inside 'hyperref' key
|
||||
% or by later use of \hypersetup.
|
||||
\PassOptionsToPackage{colorlinks,breaklinks,%
|
||||
linkcolor=InnerLinkColor,filecolor=OuterLinkColor,%
|
||||
menucolor=OuterLinkColor,urlcolor=OuterLinkColor,%
|
||||
citecolor=InnerLinkColor}{hyperref}
|
||||
|
||||
\endinput
|
@ -0,0 +1,396 @@
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{sphinxpackagefootnote}%
|
||||
[2021/02/04 v1.1d footnotehyper adapted to sphinx (Sphinx team)]
|
||||
% Provides support for this output mark-up from Sphinx latex writer:
|
||||
% - footnote environment
|
||||
% - savenotes environment (table templates)
|
||||
% - \sphinxfootnotemark
|
||||
%
|
||||
%%
|
||||
%% Package: sphinxpackagefootnote
|
||||
%% Version: based on footnotehyper.sty 2021/02/04 v1.1d
|
||||
%% as available at https://www.ctan.org/pkg/footnotehyper
|
||||
%% License: the one applying to Sphinx
|
||||
%%
|
||||
%% Refer to the PDF documentation at https://www.ctan.org/pkg/footnotehyper for
|
||||
%% the code comments.
|
||||
%%
|
||||
%% Differences:
|
||||
%% 1. a partial tabulary compatibility layer added (enough for Sphinx mark-up),
|
||||
%% 2. use of \spx@opt@BeforeFootnote from sphinx.sty,
|
||||
%% 3. use of \sphinxunactivateextrasandspace from sphinx.sty,
|
||||
%% 4. macro definition \sphinxfootnotemark,
|
||||
%% 5. macro definition \sphinxlongtablepatch
|
||||
%% 6. replaced some \undefined by \@undefined
|
||||
\newif\iffootnotehyperparse\footnotehyperparsetrue
|
||||
\DeclareOption*{\PackageWarning{sphinxpackagefootnote}{Option `\CurrentOption' is unknown}}%
|
||||
\ProcessOptions\relax
|
||||
\newbox\FNH@notes
|
||||
\newtoks\FNH@toks % 1.1c
|
||||
\newdimen\FNH@width
|
||||
\let\FNH@colwidth\columnwidth
|
||||
\newif\ifFNH@savingnotes
|
||||
\AtBeginDocument {%
|
||||
\let\FNH@latex@footnote \footnote
|
||||
\let\FNH@latex@footnotetext\footnotetext
|
||||
\let\FNH@H@@footnotetext \@footnotetext
|
||||
\let\FNH@H@@mpfootnotetext \@mpfootnotetext
|
||||
\newenvironment{savenotes}
|
||||
{\FNH@savenotes\ignorespaces}{\FNH@spewnotes\ignorespacesafterend}%
|
||||
\let\spewnotes \FNH@spewnotes
|
||||
\let\footnote \FNH@footnote
|
||||
\let\footnotetext \FNH@footnotetext
|
||||
\let\endfootnote \FNH@endfntext
|
||||
\let\endfootnotetext\FNH@endfntext
|
||||
\@ifpackageloaded{hyperref}
|
||||
{\ifHy@hyperfootnotes
|
||||
\let\FNH@H@@footnotetext\H@@footnotetext
|
||||
\let\FNH@H@@mpfootnotetext\H@@mpfootnotetext
|
||||
\else
|
||||
\let\FNH@hyper@fntext\FNH@nohyp@fntext
|
||||
\fi}%
|
||||
{\let\FNH@hyper@fntext\FNH@nohyp@fntext}%
|
||||
}%
|
||||
\def\FNH@hyper@fntext{\FNH@fntext\FNH@hyper@fntext@i}%
|
||||
\def\FNH@nohyp@fntext{\FNH@fntext\FNH@nohyp@fntext@i}%
|
||||
\def\FNH@fntext #1{%
|
||||
\ifx\ifmeasuring@\@undefined
|
||||
\expandafter\@secondoftwo\else\expandafter\@firstofone\fi
|
||||
% these two lines modified for Sphinx (tabulary compatibility):
|
||||
{\ifmeasuring@\expandafter\@gobbletwo\else\expandafter\@firstofone\fi}%
|
||||
{\ifx\equation$\expandafter\@gobbletwo\fi #1}%$
|
||||
}%
|
||||
\long\def\FNH@hyper@fntext@i#1{%
|
||||
\global\setbox\FNH@notes\vbox
|
||||
{\unvbox\FNH@notes
|
||||
\FNH@startnote
|
||||
\@makefntext
|
||||
{\rule\z@\footnotesep\ignorespaces
|
||||
\ifHy@nesting\expandafter\ltx@firstoftwo
|
||||
\else\expandafter\ltx@secondoftwo
|
||||
\fi
|
||||
{\expandafter\hyper@@anchor\expandafter{\Hy@footnote@currentHref}{#1}}%
|
||||
{\Hy@raisedlink
|
||||
{\expandafter\hyper@@anchor\expandafter{\Hy@footnote@currentHref}%
|
||||
{\relax}}%
|
||||
\let\@currentHref\Hy@footnote@currentHref
|
||||
\let\@currentlabelname\@empty
|
||||
#1}%
|
||||
\@finalstrut\strutbox
|
||||
}%
|
||||
\FNH@endnote
|
||||
}%
|
||||
}%
|
||||
\long\def\FNH@nohyp@fntext@i#1{%
|
||||
\global\setbox\FNH@notes\vbox
|
||||
{\unvbox\FNH@notes
|
||||
\FNH@startnote
|
||||
\@makefntext{\rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
|
||||
\FNH@endnote
|
||||
}%
|
||||
}%
|
||||
\def\FNH@startnote{%
|
||||
\hsize\FNH@colwidth
|
||||
\interlinepenalty\interfootnotelinepenalty
|
||||
\reset@font\footnotesize
|
||||
\floatingpenalty\@MM
|
||||
\@parboxrestore
|
||||
\protected@edef\@currentlabel{\csname p@\@mpfn\endcsname\@thefnmark}%
|
||||
\color@begingroup
|
||||
}%
|
||||
\def\FNH@endnote{\color@endgroup}%
|
||||
\def\FNH@savenotes{%
|
||||
\begingroup
|
||||
\ifFNH@savingnotes\else
|
||||
\FNH@savingnotestrue
|
||||
\let\@footnotetext \FNH@hyper@fntext
|
||||
\let\@mpfootnotetext \FNH@hyper@fntext
|
||||
\let\H@@mpfootnotetext\FNH@nohyp@fntext
|
||||
\FNH@width\columnwidth
|
||||
\let\FNH@colwidth\FNH@width
|
||||
\global\setbox\FNH@notes\box\voidb@x
|
||||
\let\FNH@thempfn\thempfn
|
||||
\let\FNH@mpfn\@mpfn
|
||||
\ifx\@minipagerestore\relax\let\@minipagerestore\@empty\fi
|
||||
\expandafter\def\expandafter\@minipagerestore\expandafter{%
|
||||
\@minipagerestore
|
||||
\let\thempfn\FNH@thempfn
|
||||
\let\@mpfn\FNH@mpfn
|
||||
}%
|
||||
\fi
|
||||
}%
|
||||
\def\FNH@spewnotes {%
|
||||
\if@endpe\ifx\par\@@par\FNH@toks{}\else
|
||||
\FNH@toks\expandafter{\expandafter
|
||||
\def\expandafter\par\expandafter{\par}\@endpetrue}%
|
||||
\expandafter\expandafter\expandafter
|
||||
\FNH@toks
|
||||
\expandafter\expandafter\expandafter
|
||||
{\expandafter\the\expandafter\FNH@toks
|
||||
\expandafter\def\expandafter\@par\expandafter{\@par}}%
|
||||
\expandafter\expandafter\expandafter
|
||||
\FNH@toks
|
||||
\expandafter\expandafter\expandafter
|
||||
{\expandafter\the\expandafter\FNH@toks
|
||||
\expandafter\everypar\expandafter{\the\everypar}}\fi
|
||||
\else\FNH@toks{}\fi
|
||||
\expandafter
|
||||
\endgroup\the\FNH@toks
|
||||
\ifFNH@savingnotes\else
|
||||
\ifvoid\FNH@notes\else
|
||||
\begingroup
|
||||
\let\@makefntext\@empty
|
||||
\let\@finalstrut\@gobble
|
||||
\let\rule\@gobbletwo
|
||||
\ifx\@footnotetext\@mpfootnotetext
|
||||
\expandafter\FNH@H@@mpfootnotetext
|
||||
\else
|
||||
\expandafter\FNH@H@@footnotetext
|
||||
\fi{\unvbox\FNH@notes}%
|
||||
\endgroup
|
||||
\fi
|
||||
\fi
|
||||
}%
|
||||
\def\FNH@footnote@envname {footnote}%
|
||||
\def\FNH@footnotetext@envname{footnotetext}%
|
||||
\def\FNH@footnote{%
|
||||
% this line added for Sphinx:
|
||||
\spx@opt@BeforeFootnote
|
||||
\ifx\@currenvir\FNH@footnote@envname
|
||||
\expandafter\FNH@footnoteenv
|
||||
\else
|
||||
\expandafter\FNH@latex@footnote
|
||||
\fi
|
||||
}%
|
||||
\def\FNH@footnoteenv{%
|
||||
% this line added for Sphinx (footnotes in parsed literal blocks):
|
||||
\catcode13=5 \sphinxunactivateextrasandspace
|
||||
\@ifnextchar[%
|
||||
\FNH@footnoteenv@i %]
|
||||
{\stepcounter\@mpfn
|
||||
\protected@xdef\@thefnmark{\thempfn}%
|
||||
\@footnotemark
|
||||
\def\FNH@endfntext@fntext{\@footnotetext}%
|
||||
\FNH@startfntext}%
|
||||
}%
|
||||
\def\FNH@footnoteenv@i[#1]{%
|
||||
\begingroup
|
||||
\csname c@\@mpfn\endcsname #1\relax
|
||||
\unrestored@protected@xdef\@thefnmark{\thempfn}%
|
||||
\endgroup
|
||||
\@footnotemark
|
||||
\def\FNH@endfntext@fntext{\@footnotetext}%
|
||||
\FNH@startfntext
|
||||
}%
|
||||
\def\FNH@footnotetext{%
|
||||
\ifx\@currenvir\FNH@footnotetext@envname
|
||||
\expandafter\FNH@footnotetextenv
|
||||
\else
|
||||
\expandafter\FNH@latex@footnotetext
|
||||
\fi
|
||||
}%
|
||||
\def\FNH@footnotetextenv{%
|
||||
\@ifnextchar[%
|
||||
\FNH@footnotetextenv@i %]
|
||||
{\protected@xdef\@thefnmark{\thempfn}%
|
||||
\def\FNH@endfntext@fntext{\@footnotetext}%
|
||||
\FNH@startfntext}%
|
||||
}%
|
||||
\def\FNH@footnotetextenv@i[#1]{%
|
||||
\begingroup
|
||||
\csname c@\@mpfn\endcsname #1\relax
|
||||
\unrestored@protected@xdef\@thefnmark{\thempfn}%
|
||||
\endgroup
|
||||
\ifFNH@savingnotes
|
||||
\def\FNH@endfntext@fntext{\FNH@nohyp@fntext}%
|
||||
\else
|
||||
\def\FNH@endfntext@fntext{\FNH@H@@footnotetext}%
|
||||
\fi
|
||||
\FNH@startfntext
|
||||
}%
|
||||
\def\FNH@startfntext{%
|
||||
\setbox\z@\vbox\bgroup
|
||||
\FNH@startnote
|
||||
\FNH@prefntext
|
||||
\rule\z@\footnotesep\ignorespaces
|
||||
}%
|
||||
\def\FNH@endfntext {%
|
||||
\@finalstrut\strutbox
|
||||
\FNH@postfntext
|
||||
\FNH@endnote
|
||||
\egroup
|
||||
\begingroup
|
||||
\let\@makefntext\@empty\let\@finalstrut\@gobble\let\rule\@gobbletwo
|
||||
\FNH@endfntext@fntext {\unvbox\z@}%
|
||||
\endgroup
|
||||
}%
|
||||
\let\FNH@prefntext\@empty
|
||||
\let\FNH@postfntext\@empty
|
||||
\AtBeginDocument{\iffootnotehyperparse\expandafter\FNH@check\fi}%
|
||||
\def\FNH@safeif#1{%
|
||||
\iftrue\csname if#1\endcsname\csname fi\endcsname\expandafter\@firstoftwo
|
||||
\else\csname fi\endcsname\expandafter\@secondoftwo
|
||||
\fi
|
||||
}%
|
||||
\def\FNH@check{%
|
||||
\ifx\@makefntextFB\@undefined\expandafter\FNH@check@
|
||||
\else\expandafter\FNH@frenchb@
|
||||
\fi
|
||||
}%
|
||||
\def\FNH@frenchb@{%
|
||||
\def\FNH@prefntext{%
|
||||
\localleftbox{}%
|
||||
\let\FBeverypar@save\FBeverypar@quote
|
||||
\let\FBeverypar@quote\relax
|
||||
\FNH@safeif{FB@koma}%
|
||||
{\FNH@safeif{FBFrenchFootnotes}%
|
||||
{\ifx\footnote\thanks
|
||||
\let\@@makefnmark\@@makefnmarkTH
|
||||
\@makefntextTH{} % space as in french.ldf
|
||||
\else
|
||||
\let\@@makefnmark\@@makefnmarkFB
|
||||
\@makefntextFB{} % space as in french.ldf
|
||||
\fi
|
||||
}{\let\@@makefnmark\@@makefnmarkORI
|
||||
\@makefntextORI{}% no space as in french.ldf
|
||||
}%
|
||||
}%
|
||||
{\FNH@safeif{FBFrenchFootnotes}%
|
||||
{\@makefntextFB{}}%
|
||||
{\@makefntextORI{}}%
|
||||
}%
|
||||
}%
|
||||
\def\FNH@postfntext{%
|
||||
\let\FBeverypar@quote\FBeverypar@save
|
||||
\localleftbox{\FBeveryline@quote}%
|
||||
}%
|
||||
}%
|
||||
\def\FNH@check@{%
|
||||
\expandafter\FNH@check@a\@makefntext{1.2!3?4,}%
|
||||
\FNH@@@1.2!3?4,\FNH@@@\relax
|
||||
}%
|
||||
\long\def\FNH@check@a #11.2!3?4,#2\FNH@@@#3{%
|
||||
\ifx\relax#3\expandafter\FNH@checkagain@
|
||||
\else
|
||||
\def\FNH@prefntext{#1}\def\FNH@postfntext{#2}%
|
||||
\expandafter\FNH@check@b
|
||||
\fi
|
||||
}%
|
||||
\def\FNH@checkagain@{%
|
||||
\expandafter\FNH@checkagain@a
|
||||
\detokenize\expandafter{\@makefntext{1.2!3?4,}}\relax\FNH@@@
|
||||
}%
|
||||
\edef\FNH@temp{\noexpand\FNH@checkagain@a ##1\string{1.2!3?4,\string}}%
|
||||
\expandafter\def\FNH@temp#2#3\FNH@@@{%
|
||||
\ifx\relax#2%
|
||||
\def\FNH@prefntext{\@makefntext{}}%
|
||||
\else\FNH@bad@makefntext@alert
|
||||
\fi
|
||||
}%
|
||||
\def\FNH@check@b #1\relax{%
|
||||
\expandafter\expandafter\expandafter\FNH@check@c
|
||||
\expandafter\meaning\expandafter\FNH@prefntext
|
||||
\meaning\FNH@postfntext1.2!3?4,\FNH@check@c\relax
|
||||
}%
|
||||
\def\FNH@check@c #11.2!3?4,#2#3\relax{%
|
||||
\ifx\FNH@check@c#2\else\FNH@bad@makefntext@alert\fi
|
||||
}%
|
||||
% slight reformulation for Sphinx
|
||||
\def\FNH@bad@makefntext@alert{%
|
||||
\PackageWarningNoLine{sphinxpackagefootnote}%
|
||||
{Footnotes will be sub-optimal, sorry. This is due to the document class or^^J
|
||||
some package modifying macro \string\@makefntext.^^J
|
||||
You can try to report this incompatibility at^^J
|
||||
https://github.com/sphinx-doc/sphinx with this info:}%
|
||||
\typeout{\meaning\@makefntext}%
|
||||
\let\FNH@prefntext\@empty\let\FNH@postfntext\@empty
|
||||
}%
|
||||
% this macro from original footnote.sty is not used anymore by Sphinx
|
||||
% but for simplicity sake let's just keep it as is
|
||||
\def\makesavenoteenv{\@ifnextchar[\FNH@msne@ii\FNH@msne@i}%]
|
||||
\def\FNH@msne@i #1{%
|
||||
\expandafter\let\csname FNH$#1\expandafter\endcsname %$
|
||||
\csname #1\endcsname
|
||||
\expandafter\let\csname endFNH$#1\expandafter\endcsname %$
|
||||
\csname end#1\endcsname
|
||||
\FNH@msne@ii[#1]{FNH$#1}%$
|
||||
}%
|
||||
\def\FNH@msne@ii[#1]#2{%
|
||||
\expandafter\edef\csname#1\endcsname{%
|
||||
\noexpand\savenotes
|
||||
\expandafter\noexpand\csname#2\endcsname
|
||||
}%
|
||||
\expandafter\edef\csname end#1\endcsname{%
|
||||
\expandafter\noexpand\csname end#2\endcsname
|
||||
\noexpand\expandafter
|
||||
\noexpand\spewnotes
|
||||
\noexpand\if@endpe\noexpand\@endpetrue\noexpand\fi
|
||||
}%
|
||||
}%
|
||||
%
|
||||
% some extras for Sphinx :
|
||||
% \sphinxfootnotemark: usable in section titles and silently removed from TOCs.
|
||||
\def\sphinxfootnotemark [#1]%
|
||||
{\ifx\thepage\relax\else\sphinxfootref{#1}\fi}%
|
||||
% \sphinxfootref:
|
||||
% - \spx@opt@BeforeFootnote is from BeforeFootnote sphinxsetup option
|
||||
% - \ref:
|
||||
% the latex.py writer inserts a \phantomsection\label{<scope>.<num>}
|
||||
% whenever
|
||||
% - the footnote was explicitly numbered in sources,
|
||||
% - or it was in restrained context and is rendered using footnotetext
|
||||
%
|
||||
% These are the two types of footnotes that \sphinxfootnotemark must
|
||||
% handle. But for explicitly numbered footnotes the same number
|
||||
% can be found in document. So a secondary part in <scope> is updated
|
||||
% at each novel such footnote to know what is the target from then on
|
||||
% for \sphinxfootnotemark and already encountered [1], or [2],...
|
||||
%
|
||||
% LaTeX package varioref is not supported by hyperref (from its doc: "There
|
||||
% are too many problems with varioref. Nobody has time to sort them out.
|
||||
% Therefore this package is now unsupported.") So we will simply use our own
|
||||
% macros to access the page number of footnote text and decide whether to print
|
||||
% it. \pagename is internationalized by latex-babel.
|
||||
\def\spx@thefnmark#1#2{%
|
||||
% #1=label for reference, #2=page where footnote was printed
|
||||
\ifx\spx@tempa\spx@tempb
|
||||
% same page
|
||||
#1%
|
||||
\else
|
||||
\sphinxthefootnotemark{#1}{#2}%
|
||||
\fi
|
||||
}%
|
||||
\def\sphinxfootref@get #1#2#3#4#5\relax{%
|
||||
\def\sphinxfootref@label{#1}%
|
||||
\def\sphinxfootref@page {#2}%
|
||||
\def\sphinxfootref@Href {#4}%
|
||||
}%
|
||||
\protected\def\sphinxfootref#1{% #1 always explicit number in Sphinx usage
|
||||
\spx@opt@BeforeFootnote
|
||||
\ltx@ifundefined{r@\thesphinxscope.#1}%
|
||||
{\gdef\@thefnmark{?}\H@@footnotemark}%
|
||||
{\expandafter\expandafter\expandafter\sphinxfootref@get
|
||||
\csname r@\thesphinxscope.#1\endcsname\relax
|
||||
\edef\spx@tempa{\thepage}\edef\spx@tempb{\sphinxfootref@page}%
|
||||
\protected@xdef\@thefnmark{\spx@thefnmark{\sphinxfootref@label}{\sphinxfootref@page}}%
|
||||
\let\spx@@makefnmark\@makefnmark
|
||||
\def\@makefnmark{%
|
||||
\hyper@linkstart{link}{\sphinxfootref@Href}%
|
||||
\spx@@makefnmark
|
||||
\hyper@linkend
|
||||
}%
|
||||
\H@@footnotemark
|
||||
\let\@makefnmark\spx@@makefnmark
|
||||
}%
|
||||
}%
|
||||
\AtBeginDocument{%
|
||||
% let hyperref less complain
|
||||
\pdfstringdefDisableCommands{\def\sphinxfootnotemark [#1]{}}%
|
||||
% to obtain hyperlinked footnotes in longtable environment we must replace
|
||||
% hyperref's patch of longtable's patch of \@footnotetext by our own
|
||||
\let\LT@p@ftntext\FNH@hyper@fntext
|
||||
% this *requires* longtable to be used always wrapped in savenotes environment
|
||||
}%
|
||||
\endinput
|
||||
%%
|
||||
%% End of file `sphinxpackagefootnote.sty'.
|