2

This question already has an answer here:

I would like to learn this type of fonts in latex. I have tried all the math fonts but it does not seem to be ana appropriate one. So my question is:what the name of this font in latex? enter image description here

Answer of Heiko Oberdiek

The question is already closed, thus I have to use the question for the answer; images cannot be put in comments.

Comparison of the image in the question

question

and the typewriter font of Computer Modern (or EC or Latin Modern):

\documentclass{article}
\begin{document}
\texttt{age=25 AND name=`Bob'.}
\end{document}

age25-cm

Together with the original in black and the \texttt variant in red:

\documentclass{article}
\usepackage{graphicx}
\usepackage{color}

\begin{document}

\leavevmode
\raise.8pt\rlap{\includegraphics[width=50mm,trim=0 0 -.7pt 0]{age25.png}}%
\textcolor{red}{\includegraphics[width=50mm]{age25-cm.pdf}}%

\end{document}

comparison

The thickness is quite correct.

However the space between the ' and . is smaller. Next idea: the . is not set in a fixed-width font:

\documentclass{article}
\begin{document}
\texttt{age=25 AND name=`Bob'}.
\end{document}

rm-dot

Comparison with this variant yields:

\documentclass{article}
\usepackage{graphicx}
\usepackage{color}

\begin{document}
  \leavevmode
  \raise1pt\rlap{\includegraphics[width=50mm,trim=-.25pt 0 -1.25pt 0]{age25.png}}%
  \textcolor{red}{\includegraphics[width=50mm]{t-crop.pdf}}%
\end{document}

Final comparison

Result: \texttt{age=25 AND name=`Bob'}. (cmtt or lmtt)

marked as duplicate by LaRiFaRi, percusse, jub0bs, Jesse, Claudio Fiandrino Jun 11 '14 at 9:03

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.

  • \texttt{<Your text>} – percusse Jun 11 '14 at 8:39
  • tiniestfont ever, from that very, very, very, very tiny screen shot ;-) ... Seriously, it looks like typewriter font, created with \texttt{...} – user31729 Jun 11 '14 at 8:41
  • It doesn't seem so...It is more bold and small than texttt – curious Jun 11 '14 at 8:42
2

Although the screenshot provides a font more bold, this might be an issue of the displaying program or the display itself, I am rather sure, that is \texttt{}.

\documentclass[paper=a4,12pt]{scrbook}

\begin{document}

\tiny%
\texttt{age=25 AND name=`Bob'}%

\end{document}

enter image description here

  • 1
    We got .It is more bold and small than texttt as a comment – percusse Jun 11 '14 at 8:47
  • @percusse: I do not claim that my trial of solution and the OP's screenshot are identical, but is rather near at the edge ;-) – user31729 Jun 11 '14 at 8:55
  • 1
    @LaRiFaRi: Yes, I noticed it too, and changed ;-) – user31729 Jun 11 '14 at 8:58
1
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
%\usepackage[scaled=0.85]{beramono}%% a good alternative
\begin{document}
\texttt{age=25 and name=`Bob'}
\end{document}

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