AllenDowney/ThinkPython

Get confused about {\tt } and \verb" "

jlwangPoincare opened this issue · 3 comments

In line 4796, two different styles were used to display almost the same thing:
blah blah \verb"'dx is 3'" blah blah {\tt 'dy is 4'} blah

They have different displaying effects. Why they are used in this way?

I generally use {\tt} because it's easier to type, but have to use \verb""
for some special characters like underscore. They should have the same
effect. What difference are you seeing?

On Wed, Sep 23, 2015 at 4:15 AM, Jialiu Wang notifications@github.com
wrote:

In line 4796, two different styles were used to display almost the same
thing:
blah blah \verb"'dx is 3'" blah blah {\tt 'dy is 4'} blah

They have different displaying effects. Why they are used in this way?


Reply to this email directly or view it on GitHub
#1.

In my environment, when the PDF file is generated, the quotation marks are
displayed in different ways. The ones in \verb"'dx is 3'" (a pair of single
quotation marks inside the double quotation marks) look like vertical
quotation marks, while the ones in {\tt 'dy is 4'} seem like written
towards the down-left direction.

This is what the paragraph looks like on my computer.

2015-09-23 5:27 GMT-07:00 Allen Downey notifications@github.com:

I generally use {\tt} because it's easier to type, but have to use \verb""
for some special characters like underscore. They should have the same
effect. What difference are you seeing?

On Wed, Sep 23, 2015 at 4:15 AM, Jialiu Wang notifications@github.com
wrote:

In line 4796, two different styles were used to display almost the same
thing:
blah blah \verb"'dx is 3'" blah blah {\tt 'dy is 4'} blah

They have different displaying effects. Why they are used in this way?


Reply to this email directly or view it on GitHub
#1.


Reply to this email directly or view it on GitHub
#1 (comment)
.

Ah, now I understand the issue. I will clean this up to make it
consistent. Thanks!

On Wed, Sep 23, 2015 at 2:42 PM, Jialiu Wang notifications@github.com
wrote:

In my environment, when the PDF file is generated, the quotation marks are
displayed in different ways. The ones in \verb"'dx is 3'" (a pair of single
quotation marks inside the double quotation marks) look like vertical
quotation marks, while the ones in {\tt 'dy is 4'} seem like written
towards the down-left direction.

This is what the paragraph looks like on my computer.

2015-09-23 5:27 GMT-07:00 Allen Downey notifications@github.com:

I generally use {\tt} because it's easier to type, but have to use
\verb""
for some special characters like underscore. They should have the same
effect. What difference are you seeing?

On Wed, Sep 23, 2015 at 4:15 AM, Jialiu Wang notifications@github.com
wrote:

In line 4796, two different styles were used to display almost the same
thing:
blah blah \verb"'dx is 3'" blah blah {\tt 'dy is 4'} blah

They have different displaying effects. Why they are used in this way?


Reply to this email directly or view it on GitHub
#1.


Reply to this email directly or view it on GitHub
<
#1 (comment)

.


Reply to this email directly or view it on GitHub
#1 (comment)
.