|
Synopsis Platforms
Description Options
Notes Examples
See also |
Synopsis |
etr [-s] [-n] [-e1 x]
[...] [-e127 x] [file...]
|
Platforms |
Unix, Windows NT
|
Description |
Etr reads each file in sequence and translates
character strings x into the corresponding CSS control strings (e1:
ESC,1 / e2: ESC,2 / ...). If no input file is given, or if a single dash (-) is
given, etr read from the standard input. Etr is designed to insert special
characters used to control CSS devices into text files.
The s-option will cause etr to use a predefined standard set of
input strings:
e1 |
@1 |
10 CPI (characters per inch) |
e2 |
@2 |
12 CPI |
e3 |
@3 |
16.5 CPI |
e4 |
@4 |
> 16.5 CPI (if supported) |
e5 |
+% |
correspondence quality on |
e6 |
% |
correspondence quality off |
e7 |
+! |
near letter quality on |
e8 |
! |
near letter quality off |
e9 |
+^ |
elongated printing on |
e10 |
^ |
elongated printing off |
e11 |
+/ |
Italic on |
e12 |
/ |
Italic off |
e13 |
+_ |
underline on |
e14 |
_ |
underline off |
e15 |
+> |
reverse half line (superscript) |
e16 |
> |
forward half line (reset superscript) |
e17 |
+< |
forward half line (subscript) |
e18 |
< |
reverse half line (reset subscript) |
e19 |
+# |
load alternate character set |
e20 |
# |
load primary character set |
|
Options |
-s
|
Use standard translation strings as listed above. This option
behaves as if the corresponding e1..e20 options would have been specified on the
command line. Starting with release 2.7, this option is set by default.
|
-n |
Do not use the standard translation strings. |
-e1 x |
The string x (1 to 5 characters) will be translated to
the control characters ESC,1. All the possible CSS escape codes -e2..-e127
may be defined in the same way. From multiple definitions of the same option, the last one
is taken. If the first character of the string x is a caret '^',
the following up to four characters will be translated only at the begin of a line. To
define a leading caret by itself, it has to be defined as '\^'. To
prevent the shell from interpreting meta characters, the string x should be
enclosed by single quotes. |
|
Notes |
To protect your terminal from unwanted escape sequences, etr
will not write its output on the TTY. This can however be forced by the pipe etr | cat.
Etr
options may be also defined in the file $HOME/.etrrc as well as in the shell
environment variable ETROPT. The evaluation order is described in the section
'Syntax of Command Lines' page 1-7.
Many capabilities of etr may also be achieved through the tr-entry of the
device definitions. Etr however allows to define different sets of control-strings
for each application. |
Examples |
etr -s <<!! | lpr
E = mc+>2> / Copyright (C) 1916 by Albert +_Einstein-_ !
!! |
Output:
E = mc2 / Copyright (C) 1916 by Albert Einstein!
etr -e13 '^.ul ' -e14 '^.ue ' <<!! | lpr
The following word shall be written in
.ul underlined
.ue mode.
!! |
(Note: The first input line has a trailing space after the word 'in'.)
Output:
The following word shall be written in underlined mode.
etr -e17 '\^-' -e18 '\^+' <<!! | lpr
The formula for water is H^2^+O.
!! |
Output:
The formula for water is H2O. |
See also |
css.devices(C), ulp
|
|
|