0

In the texbook, the hash mark symbol is obtained with the sequence \# which produces this.

hash mark

\documentclass[border=2mm]{standalone}
\begin{document}
\#
\end{document}

But on the texbook itself, there is the hash mark preceded by the backslash \which does not have the same form as the one obtained.

hash mark

How to get the texbook symbol here underlined in yellow?

AndréC
  • 24,137

1 Answers1

2

This looks like the typewriter/tt version of the symbol.

I guess the TeXbook uses some kind of verbatim mode to typeset the example from the question

\documentclass{article}
\begin{document}
\texttt{\#}

\verb|\#| gives \#
\end{document}

enter image description here

daleif
  • 54,450
moewe
  • 175,683
  • thanks, please add a screenshot – AndréC Dec 27 '19 at 10:20
  • @AndréC Unfortunately, my internet connection is a bit flaky at the moment and won't allow me to upload pictures. Feel free to add a screenshot. – moewe Dec 27 '19 at 10:21
  • 1
    I added an image. – daleif Dec 27 '19 at 10:27
  • @daleif Thanks. – moewe Dec 27 '19 at 10:33
  • I have just noticed the use of the macro \verb, can you give some details about this macro? What is it used for, its use, its origin, etc? I have personally researched this, and I know the answers, but this will save other readers from doing the same. – AndréC Dec 27 '19 at 19:05
  • 1
    @AndréC Have a look at https://tex.stackexchange.com/q/2790/35864, https://tex.stackexchange.com/q/303865/35864 and §53.3 Verbatim (File y: ltmiscen.dtx) of source2e. I'd guess that every more advanced LaTeX introduction would cover verbatim text and in particular the verbatim environment and \verb. – moewe Dec 27 '19 at 19:13
  • I have already read these pages, I ask you to add some explanations so that the users reading your answer are not forced to do this research which takes time and which we often miss. :-) – AndréC Dec 27 '19 at 19:35