Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Possible Duplicate:
How do I find out what fonts are used in a document/picture?

I would know which font it is. Someone could tell me?

enter image description here

share|improve this question

marked as duplicate by Matthew Leingang, Guido, Werner, Qrrbrbirlbel, doncherry Dec 12 '12 at 5:12

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
This is the the regular \ttfamily (from Computer Modern) font. –  Werner Dec 12 '12 at 2:17
    
to use it in that form, what package I should use? –  Mazzy Dec 12 '12 at 2:18
3  
For just the font, use \texttt{...}, or the switch {\ttfamily ...}. For the colour formatting, you'll have to look into the listings package. As it stands, this is a duplicate of How do I find out what fonts are used in a document/picture? –  Werner Dec 12 '12 at 2:19
    
Just look at the documentation of TikZ/PGF package. You can search your own texmf tree for the doc files it uses a custom listings-like structure. –  percusse Dec 12 '12 at 4:14

1 Answer 1

As Werner has mentioned, you can use the listings package to produce a similar output; a little example (refer to the package documentation to learn all the customization possibilities it offers):

\documentclass{article}
\usepackage{pgfplots}
\usepackage{listings}
\usepackage{xcolor}

\definecolor{myblue}{RGB}{63,88,167}
\definecolor{mygray}{RGB}{204,202,229}

\lstset{  language=[LaTeX]TeX,
  basicstyle=\ttfamily,
  keywordstyle=\color{myblue},
  morekeywords={addplot,coordinates,legend,axis,tikzpicture},
  backgroundcolor=\color{mygray},
  texcsstyle=*\color{black} 
}

\begin{document}

\begin{lstlisting}
\begin{tikzpicture}
\begin{axis}[grid=major,width=6cm]
\addplot [thick,blue]
    coordinates {(1,0.0000001) (2,0.0065) (3,0.1) (4,0.9)};
\end{axis}
\end{tikzpicture}
\end{lstlisting}

\end{document}

enter image description here

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.