Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7735779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:35:09+00:00 2026-06-01T07:35:09+00:00

I find the default code example font in the PDF generated by Sphinx to

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T07:35:10+00:00Added an answer on June 1, 2026 at 7:35 am

    I worked it out. Pygments uses a \begin{Verbatim} block to denote code snippets, which uses the fancyvrb package. The documentation I found (warning: PDF) mentions a formatcom option 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 the LatexFormatter.

    At the top of my conf.py file, I added the following:

    from sphinx.highlighting import PygmentsBridge
    from pygments.formatters.latex import LatexFormatter
    
    class CustomLatexFormatter(LatexFormatter):
        def __init__(self, **options):
            super(CustomLatexFormatter, self).__init__(**options)
            self.verboptions = r"formatcom=\footnotesize"
    
    PygmentsBridge.latex_formatter = CustomLatexFormatter
    

    \footnotesize was my preference, but a list of sizes is available here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Where to find Generic.xaml (or other code with the default look) for native WPF
In MOSS2007 I need to find and remove for example the default content type
I'm trying to find a solution for this problem. This is my example code:
When trying to run a simple animation example code in python, I am getting
I'm used to lazy evaluation from Haskell, and find myself getting irritated with eager-by-default
Auto-binding of request params seems like default behaviour, but I can't find a lot
In the iPad Programming Guide, it gives the following code example for specifying the
I can't seem to be able to find any example of how to add
i'm really freaking out cause i don't know how to find example or documentation
I'm trying to write a SSL-based async server using Boost ASIO example code from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.