Re: getting out of LaTeX
- From: Tak To <takto@xxxxxxxxxxxxxx>
- Date: Mon, 04 Sep 2006 04:16:20 -0400
*** T. Winter wrote:
In article <htmlf2l07ovt5n5qq4o9duqrgpbet261vq@xxxxxxx> Ruud Harmsen <realemailonsite@xxxxxxxxxxxxxxxxxx> writes:
....
> In ASCII, CR means exactly what the word says, the typing position is
> changed from the current position to the start of the line. However,
> it stays in the same line!
> Line feed or newline also means what the words say: advance the line,
> but do not change the position in the line!
Incorrect. LF does indeed mean that, but NL does mean CR+LF or LF+CR.
And, as the standard states, when there is agreement between the
parties, LF can be replaced by NL. The ASCII standard of 1963 already
mentions this, I think.
> Of course, only the two (CR&LF) together make sense, which is done
> mechanically in old typewriters, and by convention in text processors
> and later, word processors.
No. Using CR only makes also sense for overprinting. That is why ANSI
mandated that when a single NL was used, that the code used should be
that of LF. So both Unix and Windows follow the standard, but the Mac
does not (it uses CR to separate lines).
There is really no NL character in ASCII. The original non-print control
codes are
000 00 NUL Null ctrl-shift-P, ctrl-@
001 01 SOH Start of Header ctrl-A
002 02 STX Start of Text ctrl-B
003 03 ETX End of Text ctrl-C
004 04 EOT End of Transmission ctrl-D
005 05 ENQ Enquire ctrl-E
006 06 ACK Acknowledge ctrl-F
007 07 BEL Bell ctrl-G
010 08 BS Backspace ctrl-H
011 09 HT Horizontal Tab ctrl-I
012 0A LF Linefeed ctrl-J
013 0B VT Vertical Tab ctrl-K
014 0C FF Formfeed ctrl-L
015 0D CR Carriage Return ctrl-M
016 0E SO Shift Out (ribbon) ctrl-N
017 0F SI Shift In (ribbon) ctrl-O
020 10 DLE Data Link Escape ctrl-P
021 11 DC1 Device Control 1 ctrl-Q (turns on paper tape reader, aka XON)
022 12 DC2 Device Control 2 ctrl-R (turns of paper punch)
023 13 DC3 Device Control 3 ctrl-S (turns off paper tape reader, aka XOFF)
024 14 DC4 Device Control 4 ctrl-T (turns off paper punch)
025 15 NAK Neg. Ack. ctrl-U
026 16 SYN Synchronous Idle ctrl-V
027 17 ETB End of Trans. Block ctrl-W
030 18 CAN Canccel ctrl-X
031 19 EM End of Medium ctrl-Y
032 1A SUB Substitute ctrl-Z (commonly used for EOF; unrelated)
033 1B ESC Escape ctrl-[, "ESC" Key
034 1C FS File Separater ctrl-\, ctrl-shift-L
035 1D GS Group Separator ctrl-], ctrl-shift-M
036 1E RS Record Separator ctrl-^, ctrl-shift-N
037 1F US Unit Separator ctrl-_, ctrl-shift-O
175 7D ALT Alternate Mode "ALT" Key, "}" (used for "}" eventually)
176 7E PRE Prefix "Prefix" Key, "~" (used for "~" eventually)
177 7F DEL Rubout "Rubout" Key
As have been pointed out by various, there are differet conventions
of demarking lines in a "text files". Note that the very idea of
using one or more characters to represent "end of line" in disk
files wasn't that prevalent until Unix came along and popularized
the idea of files as byte streams. (Before that, files could be
word streams, record streams, ISAM, etc.) Unix uses linefeed
(0x0A) as line terminator and calls it "new line". This spreads
to C/C++, shell script, Perl, etc. Thus, "new line" has meaning
only in the context of byte streams.
Note that many network protocols such as Telnet were designed
at a time when CR+LF were more prevalent than LF as the EOL
mark and thus require CR+LF in their "text" mode transmissions.
Protocols such as SMTP, POP, and NNTP are based on Telnet and
has the same requirement.
As far as interactive WP programs are concerned one should
remember that
- what you type is not necessarily what the program gets;
- what the program gets is not necessarily what it keeps
in memory; and
- what it keeps is not necessarily what it writes to a
file
In general, a program can receive keyboard input in several
levels of abstraction, from raw key code to Unicode "character".
<GSA Gross Simplication Alert> At the rawest mode, for example,
"shift A" is essentially received as a sequence of key
movement info: <left shift key down> <"A" key down> <"A" key
up> <left shift key up>. And at the most "done" mode, the
program would receive a byte = 0x40, the ASCII (uppercase)
"A". </GSA>
To keep a long story short: there is not standard character
that represent "shift Enter". Most programs choose to
receive keyboard input in a way that makes the combo
indistinguishable from just "Enter". MS Word uses a more
"raw" mode. MS Word also decides that the "shift Enter"
represents "line break" whereas "Enter" represents
"paragraph break". Insides .DOC files, MS Word uses 0xB to
represent "line break" and 0xD to represent "paragraph break".
Needless to say, "line break" and "paragraph break" here
are WP concepts and are meaningless in the context of
general character stream files. There is no general
"line break" or "paragraph break" character that is
recognized by a majority of WP programs.
Tak
--
----------------------------------------------------------------+-----
Tak To takto@xxxxxxxxxxxxxx
--------------------------------------------------------------------^^
[taode takto ~{LU5B~}] NB: trim the xx to get my real email addr
.
- Follow-Ups:
- Re: getting out of LaTeX
- From: Peter T. Daniels
- Re: getting out of LaTeX
- From: *** T. Winter
- Re: getting out of LaTeX
- References:
- Re: getting out of LaTeX
- From: Ruud Harmsen
- Re: getting out of LaTeX
- From: Peter T. Daniels
- Re: getting out of LaTeX
- From: Ruud Harmsen
- Re: getting out of LaTeX
- From: *** T. Winter
- Re: getting out of LaTeX
- Prev by Date: Re: getting out of LaTeX
- Next by Date: Re: /S/ /Z/ /tS/ etc.
- Previous by thread: Re: getting out of LaTeX
- Next by thread: Re: getting out of LaTeX
- Index(es):
Loading