Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

LaTeX Font Change in Section Title

  1. Oct 1, 2011 #1
    I want to have a section title to the effect of "Pseudocode for the Func1 Function," but I would like "Func1" to be in typewriter font to indicate that I'm referencing programming code. Is there any good way to do this? The verbatim and verb commands don't seem to work.

    Thanks.
     
  2. jcsd
  3. Oct 1, 2011 #2

    jhae2.718

    User Avatar
    Gold Member

    Code (Text):
    \textt{}
     
  4. Oct 2, 2011 #3
    It seems that
    Code (Text):
    \texttt{}
    is actually the correct command that doesn't give errors, but yes, that works. Thanks!
     
  5. Oct 2, 2011 #4

    AlephZero

    User Avatar
    Science Advisor
    Homework Helper

    You can do
    Code (Text):

    Pseudocode for the {\tt Func1} Function
     
    If ttyping the righttt number of t's is a problem :smile:
     
  6. Oct 3, 2011 #5

    jhae2.718

    User Avatar
    Gold Member

    Oops...that's what auto-complete of TeX statements get you. Sorry about that.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: LaTeX Font Change in Section Title
  1. Bold font in latex (Replies: 6)

Loading...