I find the default code example font in the PDF generated by Sphinx to be far too large.
I’ve tried getting my hands dirty in the generated .tex file inserting font size commands like \tiny above the code blocks, but it just makes the line above the code block tiny, not the code block itself.
I’m not sure what else to do – I’m an absolute beginner with LaTeX.
I worked it out. Pygments uses a
\begin{Verbatim}block to denote code snippets, which uses thefancyvrbpackage. The documentation I found (warning: PDF) mentions aformatcomoption for the verbatim block.Pygments’ latex writer source indicates an instance variable,
verboptions, is stapled to the end of each verbatim block and Sphinx’ latex bridge lets you replace theLatexFormatter.At the top of my
conf.pyfile, I added the following:\footnotesizewas my preference, but a list of sizes is available here