连字符和减号是 MIA。

连字符和减号是 MIA。

我遇到了一个奇怪的错误,涉及 .dvi 文件中连字符的遗漏。

% This is a sample LaTeX input file.  (Version of 12 August 2004.) % % A '%' character causes TeX to ignore all remaining text on the line, % and is used for comments like this one.

\documentclass{article}      % Specifies the document class

                             % The preamble begins here. \usepackage{hyperref}

\title{ Chapter 0, A Quick Description of the Workings of a Computer }
% Declares the document's title.
\author{John M. Morrison}      % Declares the author's name.
%\date{\today}      % Deleting this command produces today's date.

\setlength{\parskip}{6pt}
\newenvironment{code}{\begin{quote}\obeylines\tt\setlength{\parskip}{0pt}}{\end{quote}}
\newenvironment{ul}{\begin{itemize}\setlength{\parskip}{0pt} }{\end{itemize}}
\newenvironment{ol}{\begin{enumerate}\setlength{\parskip}{0pt}}{\end{enumerate}}
\setcounter{section}{-1}
\begin{document}             % End of preamble and beginning of text.

\maketitle                   % Produces the title.
\tableofcontents
\input c0core.tex


\end{document}               % End of document.

此代码在文件 c0core.tex 中

\section{Integers and Computers}
Every operating system has a word size; machines today are 32 or 64 bit
machines. What does this mean? The most basic unit of memory in a computer is
an integer, or whole number. There are two types of integer, signed integers
and unsigned integers. Unsigned integers are always non-negative. Unsigned
integers are used to supply memory addresses for your computer’s RAM. Signed
integers (having a + or - sign) are often used in arithmetic. When the computer
puts them to the screen or a file, you see a sign for the integer. When the
computer manipulates them behind the scenes, it actually stores them as
unsigned integers using a very clever scheme. We will discuss this scheme
shortly, but we will begin by looking at unsigned integers.

If you have a 32 bit machine, integers have 32 bits; likewise, if you have a 64
bit machine, integers have 64 bits. A 32 bit unsigned integer can store numbers
from 0 to $2^{32}$ − 1. This number represents the 4 gig limit for usable RAM
on 32 bit machines. A 64 bit unsigned integer can store numbers from 0 to
$2^{64} − 1$; this can support memory up to 18 exabytes. Since today’s machines
are coming with 4 or more gigs of RAM, going to the 64 bit system is necessary.
A 32 bit unsigned integer can be represented with 8 hex digits; a 64 bit
integer requires 16 hex digits. Unsigned integers are just plain–vanilla binary
numbers.

这段代码中没有出现 - 符号和连字符。软件包中是否存在错误或冲突?

感谢您的帮助!

答案1

您用作减号的字符无法识别;请改用键盘字符-。以下是文本的修改版本(我在数学模式下也始终使用加号和减号):

\section{Integers and Computers}
Every operating system has a word size; machines today are 32 or 64 bit
machines. What does this mean? The most basic unit of memory in a computer is
an integer, or whole number. There are two types of integer, signed integers
and unsigned integers. Unsigned integers are always non-negative. Unsigned
integers are used to supply memory addresses for your computer's RAM. Signed
integers (having a $+$ or $-$ sign) are often used in arithmetic. When the computer
puts them to the screen or a file, you see a sign for the integer. When the
computer manipulates them behind the scenes, it actually stores them as
unsigned integers using a very clever scheme. We will discuss this scheme
shortly, but we will begin by looking at unsigned integers.

If you have a 32 bit machine, integers have 32 bits; likewise, if you have a 64
bit machine, integers have 64 bits. A 32 bit unsigned integer can store numbers
from 0 to $2^{32} - 1$. This number represents the 4 gig limit for usable RAM
on 32 bit machines. A 64 bit unsigned integer can store numbers from 0 to
$2^{64} - 1$; this can support memory up to 18 exabytes. Since today’s machines
are coming with 4 or more gigs of RAM, going to the 64 bit system is necessary.
A 32 bit unsigned integer can be represented with 8 hex digits; a 64 bit
integer requires 16 hex digits. Unsigned integers are just plain–vanilla binary
numbers.

相关内容