summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/lhcyr/lhcyrwin/README
blob: 3c1f4a93adbab2d55f8765c3ffadfa5c8e819548 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176

  LHCYR 1.0 (c) 1998 V.V.Zhytnikov (vvzhy@td.lpi.ac.ru)
  The LaTeX 2e style for Russian typesetting in bilingual environment
  Available at CTAN:/tex-archive/macros/latex/contrib/supported/lhcyr
  Main CTAN sites:   ctan.tug.org   ftp.dante.de   ftp.tex.ac.uk

  This package is free. You may modify and use it for whatever
  purpose you want. But you are not allowed to redistribute modified
  version under the same name.

  CONTENTS

      1. General Features
      2. Installing Fonts
      3. Generating Format File
      4. Using lhcyrwin Style


  1. GENERAL FEATURES

     LaTeX 2e style lhcyrwin is intended for typesetting Russian or
     bilingual English-Russian documents. Other latin-alphabet
     languages will probably work as well but none where tested.

     The style is based on the so called lh-fonts in the cp1251
     (codepage 1251) encoding which is standard for Russian in the
     MS Windows.  The style works by replacing each standard TeX computer
     modern text font by the analogous lh-font (e.g. cmr10 -> wcr10 etc
     replacing all 'cm' by 'wc').  Upper part of an lh-font (character
     codes 0-127) exactly coincides with the corresponding cm-font and
     its lower part (codes 128-255) contains Russian alphabet in the
     cp1251 encoding together with some extra symbols such as
     Russian number sign and angular double quotes.

     The installation described below is emTeX specific but provides
     rather good idea how the package can be installed with other
     TeX distributives. I assume that you have Metafont and it can
     automatically generate fonts upon request.

     The lhcyrwin package consists of the following files:

        README             - this file

        lhcyrwin.sty       - LaTeX 2e style file

        ot1wcdh.fd         - LaTeX 2e font driver files
        ot1wcfib.fd
        ot1wcfr.fd
        ot1wcr.fd
        ot1wcss.fd
        ot1wctt.fd
        ot1wcvtt.fd

        hyphen.cfg         - LaTeX 2e hyphenation configuration file
        rhyphen.tex        - Russian hyphenation patterns by A.Slepukhin
                             in the cp1251 encoding

        dvidrv.mfj         - mfjob configuration files for automatic
        wcjob.mfj            font generation

        karabas.tex        - sample and test files
        kniga.tex
        otchet.tex
        pismo.tex
        rusfonts.tex
        statya.tex


  2. INSTALLING FONTS

     First of all make sure that you have metafont sources for
     standard cm (Knuth's computer modern) fonts. They are used for
     the upper part of the lh-fonts. If not then get them at
       CTAN: /tex-archive/fonts/cm

     Next get latest lh-fonts distributive. It available at
       CTAN: /tex-archive/fonts/cyrillic/lh
       ftp:  ftp.vsu.ru/pub/tex

     Create some temporary directory and unpack .zip or .tgz lh-font
     archive with the directory structure (use -d switch with pkunzip.ex).
     Go into the subdirectory \tex and create in it directory \tex\wrk
     (if absent). Return to \tex and run plain TeX on the 22cm-wc.tex
       tex 22cm-wc.tex
     This will create several files in the \tex\wkr directory.
     Copy all *.mf files from the directory \mf (about 750K) and
     from the directory \tex\wrk into the place where your Metafont
     looks for *.mf source files.

     To tell mfjob how to generate lh-fonts replace your dvidrv.mfj
     file with the dvidrv.mfj file provided with the lhcyrwin package.
     If you have some specific dvidrv.mfj containing your local nonstandard
     definitions you must extract definition for lh-fonts generation from
     lhcyrwin's dvidrv.mfj and manually insert it into your local
     dvidrv.mfj file.

     To create *.tfm files for lh-fonts run mfjob on wcjob.mfj file
       mfjob wcjob.mfj
     This may take from several minutes up to an hour depending on
     the computer. Copy created *.tfm files into the directory where
     your TeX looks for *.tfm.

     If you have testfont.tex you may test lh-fonts by running
       tex testfont
     when prompted for font name type
       wcr10
       \table\end
     and print or preview the resulting tesfont.dvi.


  3. GENERATING FORMAT FILE

     To enable correct Russian hyphenation you have to create a new
     LaTeX 2e format file. With the lhcyrwin style both English and Russian
     languages are represented as one combined language (from the TeX's
     point of view). With such setup you can freely mix English and Russian
     words with correct hyphenation for both languages without any
     language switching commands. This approach is orthogonal to the method
     used by the standard LaTeX babel package. With babel each language is
     stored separately (you may have more than two languages but must
     use explicit language switching commands). If the babel package is
     installed on your system you must disable it (at least temporary
     during LaTeX format generation).

     Rename any hyphen.cfg file to something else (This file may
     resides in the babel's directory). Copy the
       hyphen.cfg  and  rhyphen.tex
     files from the lhcyrwin distributive into directory where TeX
     can find them. Make sure that you have the file hyphen.tex
     and this file is the original Knuth's US-English hyphenation
     patterns file. Sometimes with babel installed this patterns
     are renamed to ushyph1.tex or something else. If so or if
     you want to use some other English hyphenation tables
     (say UK-patterns) edit hyphen.cfg and replace {hyphen.tex} by
     {ushyph1.tex} or any other pattern file name.

     Create LaTeX format file by running

       tex386.exe /i /o /8 /mt15000 latex.ltx

     You'll get new latex format file latex.ftm. Use it with the same
     /mt switch as during format generation:

       tex386.exe /mt15000 &latex


  4. USING lhcyrwin STYLE

     Now to use lhcyrwin style copy lhcyrwin.sty and all *.fd files
     into the directory where your TeX can find them and include
     the line

       \usepackage{lhcyrwin}

     into the LaTeX document header. With this style you can freely
     type English and Russian in the Windows cp1251 encoding. Besides
     you get three extra commands
        \No  \<  \>
     for Russian number sign and Russian angular double quotes.

     With the additional [russtyle] option enabled

       \usepackage[russtyle]{lhcyrwin}

     all English texts such as "Chapter", "Appendix" are replaced
     by the corresponding Russian translations "Glava","Prilozhenie" etc.

     You may test lhcyrwin style by latexing test files
       karabas.tex
       rusfonts.tex
     and sample files
       kniga.tex
       otchet.tex
       pismo.tex
       statya.tex