summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ncclatex/ncclatex.tex
blob: f157e444fe74c7de5bd0aba6317ada1774807293 (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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
\documentclass[11pt]{ncc}
\ToCenter[h]{160mm}{240mm}

\title{\Huge NCC-\LaTeX}
\author{by Alexander I. Rozhenko}
\usepackage[headings]{ncchdr}

\TitleBeforeAuthor
\sectionstyle{center}
\indentaftersection

\newcommand*\package[1]{\textbf{#1}}
\newcommand*\bungle[1]{\textit{#1}}
\newcommand*\Opt[1]{\texttt{\textbf{#1}}}

\newcommand*\Meta[1]{\texttt{\upshape#1}}
\newcommand*\com[1]{\Meta{\symbol{"5C}#1}}
\newcommand*\meta[1]{\Meta{\symbol{"7B}{\itshape #1}\symbol{"7D}}}
\newcommand*\opt[1]{\Meta{[{\itshape #1}]}}

\begin{document}
\maketitle

\thispageheading{\footnotesize This document was prepared in
\com{sectionstyle}\meta{\upshape center} with \com{indentaftersection}.\\
This heading was printed with \com{thispageheading} command from
the \package{watermark} package}

\begin{abstract}
This document describes classes and packages from NCC-\LaTeX. We
compare the \package{ncc} class with standard \LaTeX's classes
and point out a difference between the \package{ncc} class and
\package{ncclatex} package. Packages from the \bungle{ncclatex}
and \bungle{ncctools} bungles are partially described here.
\end{abstract}

\tableofcontents
\newpage

\section{The ncc class}

To mark out features of the \package{ncc} class, we compare it
with standard \LaTeX\ classes \package{article}, \package{book},
and \package{report}. The first and the main distinction is that
preparing of articles, books, and reports in NCC-\LaTeX\ is
provided with special options (called \textbf{styles}) of the
\package{ncc} class instead of using different classes. The
following style options are allowed for this:

\begin{description}[\Opt{preprint}]
\item[\Opt{article}] prepares an article.

\item[\Opt{preprint}] prepares an article with a title going on a separate page. The
\com{preprint}\meta{No} command allows inserting a preprint
number under the preprint title.

\item[\Opt{book}] prepares a book. The \com{bookeditor}\meta{text}
command allows inserting a text under the book title.

\item[\Opt{report}] is equivalent to the \Opt{book} option used
together with the \Opt{oneside} option.
\end{description}

The \Opt{titlepage} and \Opt{notitlepage} options are not used in
the \package{ncc} class. The appearance of a title on a separate
page is controlled in a style used. An \Opt{article} style
specifies running title and others specify a title on a separate
page. The \Meta{abstract} environment is defined in all styles.
It is prepared on a separate page if a title is prepared on a
separate page.

The page style \Meta{headings} is set by default in all styles except
articles for which the \Meta{myheadings} style is used.

The default options for the \package{ncc} class are \Opt{10pt},
\Opt{a4paper}, \Opt{article}, \Opt{twoside}, \Opt{onecolumn},
\Opt{final}, \Opt{openany}.

The class sets \com{unitlength} to 1~mm (i.e. all coordinates in
the \Meta{picture} environment are calculated in millimeters).

\subsection{Page layout}

All standard paper size options are supported, namely
\Opt{a4paper}, \Opt{a5paper}, \Opt{b5paper},\linebreak
\Opt{letterpaper}, \Opt{legalpaper}, \Opt{executivepaper}, and
\Opt{landscape}. One more paper size option is introduced:
\Opt{a5a4paper}. It is useful for printing a5 papers on a4
printer having centered tray.

In contrast to standard classes, the width and height of the text
field isn't automatically expanded on the entire page. Text field
dimensions are defined depending on the base point size:

\begin{center}\renewcommand{\cboxstyle}{\small\bf}
\setlength\tabcolsep{20pt}
\begin{tabular}{|c|c|c|}\hline
\cbox{Point size} & \cbox{Text width} & \cbox{Text height}
\\\hline
\Strut/1/
 10 pt & 110 mm & 157 mm \\
 11 pt & \jhbox{111}[r]{126.5} mm & 199 mm \\
 12 pt & 145 mm & 233 mm \\
\bstrut
 14 pt & 160 mm & 240 mm \\\hline
\end{tabular}
\end{center}

If you want to fit the text field to the entire page in the same
manner as in standard classes, use the \Opt{fittopage} option.

The text field is centered on the page taking into account the
header field also, but the margin from the top is corrected
to be at most 1.5~inch. If you want to center the text field
taking into account the marginal notes, header, and footer, use
the command
\begin{verbatim}
     \ToCenter[hfm]{\textwidth}{\textheight}
\end{verbatim}
in the preamble of a document. The optional parameter of this
command enumerates fields counted while centering. Using this
command, you can change the width and height of the text field
and center the result on the page. Other way for changing the
width and height is using the \com{FromMargins} command. For
example, the following command
\begin{verbatim}
     \FromMargins[hf]{20mm}{10mm}{25mm}{15mm}
\end{verbatim}
calculates the text field dimensions and margins in such a way to
provide 20~mm distance from the left border of the page, 10~mm
distance from the right border, 25~mm distance from the top, and
15~mm distance from the bottom in assumption that header and
footer are in use. In two-side printing the left and right
distances are swapped for even pages.

\subsection{Base point size options}

Along with standard base point size options \Opt{10pt},
\Opt{11pt}, and \Opt{12pt}, the \Opt{14pt} size option is
introduced. In 14~pt, font sizes \com{huge} and \com{Huge} are
equal to \com{LARGE}.

Sometimes, the standard sizes of fonts used in section markup
commands are a bit larger than necessary. This case appears when
a page size is small enough or a base font size is too large. The
\Opt{small} option can be used in this cases to reduce font sizes
used in section markup commands. The \Opt{14pt} option applies it.

\subsection{Other options}

The following standard options can be used with the \package{ncc}
class: \Opt{oneside}, \Opt{twoside}, \Opt{draft}, \Opt{final},
\Opt{openright}, \Opt{openany}, \Opt{onecolumn}, \Opt{twocolumn},
\Opt{openbib}, \Opt{fleqn}, and \Opt{leqno}.

The \Opt{russian} option loads the \package{babel} package with
the \Meta{[russian]} optional parameter.

\subsection{Packages loaded by the ncc class}\label{s:load}

The \package{ncc} class loads many packages from
\bungle{ncclatex} and \bungle{ncctools} bungles. They are:
\begin{description}[\package{watermark}]
\item[\package{ncclatex}] is the kernel of NCC-\LaTeX;

\item[\package{nccltrus}] is loaded when the \Opt{russian} option
is used. It redefines titles of captions to russian ones;

\item[\package{nccold}] provides some obsolete commands from old
NCC-\LaTeX, namely \com{no}, \com{eref},\linebreak \com{Eq},
\com{Eqs}, \com{Eqalign}, \com{tbox}, \com{bbox}, \com{tbbox},
\com{emline}, and \com{emlinewidth};

\item[\package{dcounter}] provides dynamic counters;

\item[\package{desclist}] improves the \Meta{description}
environment, and provides the \Meta{desclist} environment with
better control of marker in descriptions;

\item[\package{extdash}] provides shortcut commands \com{-/}, \com{--},
\com{---}, \com{=/}, \com{==}, and \com{===} for better control
of hyphenation of compound words;

\item[\package{nccboxes}] provides more boxes;

\item[\package{nccfloats}] provides commands \com{minifig}, \com{fig},
\com{figs}, \com{minitabl}, \com{tabl}, and \com{tabls} covering
standard \LaTeX\ floats and preparing the floating material in
NCC-\LaTeX\ style (a text in NCC-\LaTeX\ floats is centered and
prepared in the \com{footnotesize}). New features, \com{sidefig}
and \com{sidetabl}, simplify creation of minifloats posed
on the outer side of page;

\item[\package{nccfoots}] provides commands \com{Footnote},
\com{Footnotemark}, and \com{Footnotetext} for manual management
of footnote markers.

\item[\package{nccmath}] extends the \package{amsmath} package
with NCC-\LaTeX\ commands for preparing display equations
(\com{eq}, \com{eqs}, \com{eqalign}), redefines the
\Meta{eqnarray} environment to work properly together with \AmS\
display equations, introduces the \Meta{darray}, \Meta{fleqn},
and \Meta{ceqn} environments;

\item[\package{nccpic}] is an envelop for the \package{graphicx}
package (provides extension lists for useful dvi-drivers,
introduces the \com{putimage} command for compatibility with old
NCC-\LaTeX, and defines the \com{ipic} command);

\item[\package{nccsect}] provides an improved section, caption,
and TOC-entries management;

\item[\package{nccthm}] theorems in NCC-\LaTeX\ style
(customizable layout, many new features);

\item[\package{tocenter}] provides the \com{ToCenter} and
\com{FromMargins} commands;

\item[\package{watermark}] provides watermarks.

\end{description}

The \package{ncc} class loads some standard \LaTeX\ packages.
They are \package{amsmath}, \package{graphicx}, and \package{makeidx}. The
\package{babel} package is also loaded if the \Opt{russian}
option is used.

\subsection{New commands of the ncc class}

We describe here new commands introduced in the \package{ncc}
class only. Other new commands are introduced in packages of
\bungle{ncclatex} and \bungle{ncctools} bungles (most of them are
common for the \package{ncc} class and \package{ncclatex}
package).

\begin{desclist}{}{}
\item[\com{partmark}\meta{text}] is used for control the header and
footer marks after a new part.

\item[\com{openrightorany}] produces the \com{clearpage} or
\com{cleardoublepage} command depending on open mode selected in
the class options. If an empty even page is created, its header
mark is set empty.

\item[\com{AuthorBeforeTitle} and \com{TitleBeforeAuthor}] determine
what item must go first in the title: author text or title text.
In article style the title text goes first and in other styles
the author goes first. These commands should be used in the
preamble.

\item[\com{noeqbreak} and \com{alloweqbreak}] manage the
possibility of page break between a text and display equation
following after. The first command forbids such page breaks and
the last command allows them. The default is \com{alloweqbreak}.

\item[\com{SetTOCStyle}\meta{style}] sets a style for table of
contents, list of tables, and list of figures. The default style
is empty. For example, the use of \verb+\SetTOCStyle{\small}+ in
the preamble of the document sets a small font for output in TOC.

\item[\com{setyear}\meta{year}, \com{theyear}:] the first command
sets a year and the second one prints an year set before. The
\verb+\setyear+ command doesn't change the \verb+\year+ counter.
The default value for the \verb+\theyear+ command is the current
value of the \verb+\year+ counter.

\item[\Meta{biblist}] is a new environment:

\com{begin}\meta{\upshape biblist}\opt{starting
No}\meta{prototype} \ldots \com{end}\meta{\upshape biblist}.

It prints a pure bibliography list without heading. The first
optional parameter sets an initial value for the bibliography
counter. The style of preparing the bibliography is controlled
with the \com{bibliststyle} command (its default value is
\verb+\small+). The \texttt{thebibliography} environment is
prepared on the base of the \texttt{biblist}.

\item[\Meta{theglossary}] environment is introduced. The
\com{printindex}, \com{see}, and \com{seealso} commands are
loaded by the \package{makeidx} package. The \com{printglossary}
command is introduced.

\end{desclist}

The \Meta{figure} and \Meta{table} counters are declared
dynamically. So, they are controlled with the \com{countstyle}
command. The default count style for article and preprint is
empty, and for book and report the \verb+\countstyle{chapter}+ is
used. The \Meta{equation} counter is also controlled with the
\com{countstyle} command.

\paragraph{Specific commands for the article style.}
Three new commands
\begin{center}
\com{setseries}\meta{text}, \com{setvolume}\meta{Volume No}, and
\com{setissue}\meta{Issue No}
\end{center}
are allowed in the article style. They produce the commands
\com{theseries}, \com{thevolume}, and \com{theissue} which can be
used in publishing. In the article style the \package{ncc} class
tries to load an \package{nccadd.sty} file. This style file is
useful in publishing to set common information for all articles
in a journal issue. The number of the last page is marked with the
\Meta{NCC@lastpage} label. Its \verb+\pageref+ value can be used
in publishing to automate the substitution of article last page
number. If the \Opt{openright} option is used,
\verb+\cleardoublepage+ action is applied at the end of article.

\paragraph{Specific commands for the preprint style.}
The \com{preprint}\meta{Preprint No} command is introduced. If a
preprint number is defined, the following text
\begin{center}\bf Preprint\\number\end{center}
is inserted below the title of preprint.

\paragraph{Specific commands for the book and report styles.}
The \com{frontmatter}, \com{mainmatter}, and \com{backmatter}
commands can be used. The \com{bookeditor}\meta{text} command
inserts the specified text below the title of book. A style of
chapter prefixing in running head and in the table of contents is
controlled with the \com{ChapterPrefixStyle}\meta{list} command.
The list can contain comma separated words \Meta{header} and
\Meta{toc}. Using them you set prefix style for header and/or toc
respectively. In prefix style the chapter number is preceded with
the \textbf{Chapter} or \textbf{Appendix} text.

\subsection{Using fancy headers with the ncc class}

The headers in \package{ncc} class are maintained a bit different
from standard classes. So, if you want to use fancy headers
together with the \package{ncc} class, type
\begin{quote}
\com{usepackage}\opt{list-of-page-styles}\verb+{ncchdr}+
\end{quote}
in the preamble of document. The
\Meta{\textit{list-of-page-styles}} parameter must contain a list
of page styles to be redefined, i.e., something from \Opt{empty},
\Opt{plain}, \Opt{headings}, and \Opt{myheadings}. The last style
in the list is set after using of this package.

Note: the \Opt{headings} and \Opt{myheadings} styles have a
common part in the \package{ncc} class which is redefined in this
package. So, redefining one of these page styles you automatically
redefine another style also. Additional fancy page style
\Opt{title} is provided with the \package{ncchdr} package. It
uses three title marks, namely \com{lefttitlemark},
\com{titlemark} (in center), and \com{righttitlemark}. To load
this style use the \Opt{title} option with the package.

The package is based on the \package{nccfancyhdr} package from the
\bungle{ncctools} bungle.

\section{The ncclatex package}

The most part of the \package{ncc} class is loaded in the
\package{ncclatex} package. To provide almost all functionality
of NCC-\LaTeX\ with standard \LaTeX\ classes, you can use this
package. The package loads many packages also. It is easy to say
what packages it does not load from the list specified in the
Section~\ref{s:load}. Only three of them are not loaded, namely
\package{nccold}, \package{tocenter}, and \package{watermark}.

If you want to pass additional options to a package loaded with
\package{ncclatex}, load it in the \com{usepackage} command before
loading the \package{ncclatex}.

The \package{ncclatex} package has two options: \Opt{small} and
\Opt{russian}. Using of the \Opt{small} option provides smaller
fonts in section markup commands. The \Opt{russian} option tries
to load the \package{babel} package with \Opt{[russian]} optional
parameter, redefines captions of mathematical statements in
Russian by loading the \package{nccltrus} package, and redefines
\com{alph} and \com{Alph} commands to produce russian alphanumeric
numbers. Original latin variants of alphanumeric numbering are
saved in \com{alphlatin} and \com{Alphlatin}.

The package sets \com{unitlength} to 1~mm (millimeters are
default units in NCC-\LaTeX).

\subsection{Sections, captions, and toc-entries in NCC-\LaTeX{}}

\subsubsection{Sections}

Section markup commands of level 0 and greater are redefined
using the \package{nccsect} package from \bungle{ncctoools} (the
level 0 command is \com{chapter} or \com{part} depending on class
used; the commands of greater levels are \com{section},
\com{subsection}, \ldots, \com{subparagraph}). All section markup
commands are divided into two categories: display sections (until
\com{subsubsection}) and run-in sections (\com{paragraph} and
\com{subparagraph}).

The package uses floating horizontal alignment for display sections
which is controlled with the
\begin{quote}
 \com{sectionstyle}\meta{style}
\end{quote}
command. The following styles are allowed:
\begin{description}[\Meta{hangindent*}]
\item[\Meta{hangindent}] is the standard \LaTeX\ style.
\item[\Meta{hangindent*}] is the same as \Meta{hangindent}, but ragged right.
\item[\Meta{parindent}] sections are indented on \com{parindent} without hanged number.
\item[\Meta{parindent*}] is the same as \Meta{parindent}, but ragged right.
\item[\Meta{center}] section headers are centered.
\end{description}
The \com{indentaftersection} and \com{noindentaftersection}
commands control indentation after sections.
The \package{nccsect} package sets style and indentation to standard \LaTeX\ defaults,
\verb+\sectionstyle{hangindent}+ and \com{noindentaftersection}. But the \package{ncclatex}
package uses \verb+\sectionstyle{hangindent*}+.

The \package{nccsect} package essentially improves the management
of section number tags, running heads, and writing to aux-file:
\begin{itemize}
\item If you want to suppress generation of running head in a
section markup command, type \com{norunninghead} before it.

\item If you want to replace the text of running head to another
one, type \com{runninghead}\meta{text} before a section.

\item If you want to suppress a number in a section or in a caption
of float, type \com{noheadingtag} before the section or caption
markup command. Note that the text of used markup command goes to
the running head and to the aux-file. This is the easier way to
produce a section without number which must appear in the table
of contents and in the header.

\item If you want to replace a number in a section or caption to
something else, type the \linebreak \com{headingtag}\meta{other
number} before the section or caption markup command. Note that
the replaced number goes to the running head and to the aux-file.
It must contain robust commands only. Fragile commands in it must
be protected with the \com{protect} command. The associated
counter is not incremented in this case.

\item If you want entirely replace a number in a section or
caption (including prefix and suffix automatically inserted by
section and caption markup commands) to something else, type
\com{headingtag*}\meta{other number} before the section or caption
markup command. In this case, the writing to running head and to
aux-file is suppressed.

\item If you want to suppress writing text of a section or
caption to aux-file, type the\linebreak \com{skipwritingtoaux}
command before the section or caption markup command.
\end{itemize}

\subsubsection{Captions}

The \com{caption} command useful in floats is also redefined in
the \package{nccsect} package. The caption creation method
internally differs from the standard method. You can use line
breaking commands in it, but be sure that line break in caption
does not go to the aux-file (use an optional parameter with
caption to define an argument going to the aux-file). The
\com{centering} command can be used in captions without worrying
(it is automatically suppressed while writing to aux-file). The
\com{caption*} command is allowed to produce a caption without
number tag (the words `Figure' or `Table' belong to the tag!). A
text of such a caption does not go to the aux-file.

The package defines \textit{different} caption commands for
tables and figures. A table caption usually goes above a table.
So, a vertical skip after table caption is necessary, but a skip
before table caption is unnecessary. A figure caption usually
goes below a figure. In this case vertical skips are different:
skip before is needed, but skip after is unnecessary. This is the
reason why table and figure captions are prepared differently.

\subsubsection{TOC-entries}

The management of toc-, lot- and lof-entries is also redefined in
the \package{nccsect} package. Every toc-entry is specified with
2 parameters: a left margin and a value of hang indentation. The
\package{nccsect} package calculates the left margin for a
toc-entry by summation of margin skips defined in toc-entries of
lower levels. For example, if a toc-entry of 2nd level is typed
out, its left margin will be a sum of margin skips defined in
toc-entries of 0th and 1st levels. This is much more flexible way
than the standard one in which the left margin was coded just in
the toc-command.

The margin skip and hang indent skip are determined using
prototyping technique. This method provides very easy way for
redeclaring toc-entries. For example, if your book contains not
more than 9 sections, and more than 9 subsections in some
sections, you can redeclare the subsection toc-entry as follows:
\begin{verbatim}
     \DeclareTOCEntry{2}{}{}{9.99}{}[9.99]
\end{verbatim}
This command contains the following parameters: the toc-entry
level, an action applied before toc-entry (you can insert a
vertical skip for example), a prefix before a toc-entry number (a
section sign for example), a number prototype for calculation of
hang indentation, and a style applied to the toc-entry. The 6th
optional parameter in square brackets is used for calculation of
margin skip for the next toc-level. If it is omitted,
the skip is equal to the hang indentation value of this toc-entry.

\subsubsection{Customization commands}

In conclusion, we show customization commands with their default
values for the \package{ncclatex} package:
\begin{description}
\item[\com{SectionTagSuffix}\meta{\upshape.\com{hskip} .6em}] is a suffix
inserted after a section number tag (excluding sections of 0th
level). Numbers in sections in NCC-\LaTeX\ are ended with the
decimal point.

\item[\com{CaptionTagSuffix}\meta{\upshape.\com{hskip} .6em plus .2em minus .1em}]
is a suffix inserted after a caption number tag.

\item[\com{NumberlineSuffix}\meta{\upshape.\com{hskip} .6em}\meta{\upshape.\com{hskip} .4em}]
describes 2 suffices: the first one is used in calculation of
hang indentation of toc-entries and the last one is inserted
after a number in toc-entries. The last suffix is usually
narrower that the first one. This allows to decrease a distance
between number and text if the width of number exceed the
prototype width just a little. Note: the \com{numberline} command
from standard \LaTeX\ is modified in the \package{nccsect}
package to prevent an overlapping of a text on a number if a
number is wider than hung indentation value.

\item[\com{PnumPrototype}\meta{\upshape99}] is a prototype of page number
used for calculation of right margin in toc. It is supposed that a
book contains not more than 99 pages by default. To change the
page number width to 3-digit pattern, use the
\com{PnumPrototype}\meta{\upshape999} command.

\end{description}

\subsection{Theorems in NCC-\LaTeX{}}

The \package{ncclatex} package defines a number of math
statements using the \package{nccthm} package from the
\bungle{ncctools} bungle. A brief introduction is needed to
explain the possibilities of the \package{nccthm} package. In
this section we call all math statements as \textit{theorems} for
simplicity.

\subsubsection{Overview}

In mathematical manuscripts, two modes of theorems numbering are
useful. In ordinary mode, a number goes after the theorem title
(e.g., \textbf{Theorem~1}, \textbf{Example~1},
\textbf{Theorem~2}, etc.). In this mode, theorems with different
titles are usually numbered independently. Another mode requires
a number going before a theorem title. We call this mode the
\textit{apar} mode. In apar mode, theorems with different titles
are numbered sequentially (e.g., \textbf{1~Theorem},
\textbf{2~Example}, \textbf{3~Theorem}, etc.). Both modes can be
mixed together in one manuscript.

Theorems with different titles can be shown differently. For
example, a Theorem statement is shown with bold header and italic
body (a comment after header is prepared with normal font). But
an Example statement can be shown with italic header and normal
body. We call a presentation of a theorem by the \textit{theorem
type}. The \package{nccthm} package provides two default theorem
types named \texttt{theorem} and \texttt{remark}. New theorem
types can be created and existing theorem types can be redefined.

The next parameter of theorems is the indentation style. A
theorem can open a new paragraph without indentation (default
behaviour) and with paragraph indentation. A theorem number in the
apar mode can be shown on margins. The indentation style is
controlled via options \Opt{indent}, \Opt{noindent},
\Opt{margin}, and \Opt{nomargin} of the \package{nccthm} package.

The last parameter of theorems is the break style. A line break
after theorem header (comment included) can be used. The break and
no break style can be coded in theorems while the definition of
them using switches \com{TheoremBreakStyle} and
\com{TheoremNoBreakStyle} before the definition or redefinition
of theorems (in contrast to standard \LaTeX, the
\com{renewtheorem} command is provided for redefinition of
theorems). The break style of an individual theorem can be changed
on the fly with the commands \com{breakafterheader} and
\com{nobreakafterheader} inserted before a theorem.

All described properties of theorems are provided with the
\package{nccthm} package. Moreover, the counters used in theorems
are declared as dynamic counters (see the \package{dcounter}
package from \bungle{ncctools}). A dynamic counter is created at
the first use. So, a space of \TeX\ count registers is not
occupied with useless counters (this is too important because a
number of counters is limited). Using dynamic counters a package
writer can prepare some predefined theorems without worry. Since
a dynamic counter is created at the first use, a user can control
the numbering style for it. This is provided with the
\com{countstyle}\meta{base-counter} command. The \Meta{\itshape
base-counter} is the name of counter a newly created dynamic
counter must be subordinated to. An empty parameter means no
subordination. So, the change of numbering style for all theorems
in a manuscript is executed with one command only! If some
counters must have a specific count style, you can create them
manually or using the \com{countstyle} command with an optional
parameter,
\begin{quote}
\com{countstyle}\opt{list-of-counters}\meta{base-counter}
\end{quote}
This command creates new counters from the comma separated list
and subordinates all counters in the list to the \Meta{\itshape
base-counter}. It can be used for existing counters also if you
want to \textit{change the subordination} of them to another
counter. For example, using
\begin{verbatim}
     \countstyle[section]{}
\end{verbatim}
in a book we reject the subordination of the \Meta{section}
counter to the \Meta{chapter} counter!

\subsubsection{Predefined theorems}

The \package{ncclatex} package defines 8 theorems in 3 forms each:
theorems with automatic numbering, theorems with manual
numbering, and theorems in the \textit{apar} mode. All the
theorems can be used in two ways: as environments and as
commands. In command style they must be concluded with another
theorem, or \com{qef}, or \com{qed} command. The \com{qef}
command finishes a paragraph, inserts a proper vertical space,
and returns the font shape to the normal font. The \com{qed}
command usually finishes the proof of theorem. It prints a qed
symbol (white square) adjusted to the right margin and calls the
\com{qef}. The \com{qed*} command prints the qed symbol only.

\subsubsection{Theorems with automatic numbering}

We show the using of these theorems in the environment style.
\begin{tabbing}
 \tt xxxxx\=\verb+\begin{proposition}+\opt{Comment}\quad \=\Meta{\itshape body}\quad\=\+\kill
 \verb+\begin{theorem}+\opt{Comment}     \>\Meta{\itshape body} \>\verb+\end{theorem}+\\
 \verb+\begin{lemma}+\opt{Comment}       \>\Meta{\itshape body} \>\verb+\end{lemma}+\\
 \verb+\begin{proposition}+\opt{Comment} \>\Meta{\itshape body} \>\verb+\end{proposition}+\\
 \verb+\begin{corollary}+\opt{Comment}   \>\Meta{\itshape body} \>\verb+\end{corollary}+\\
 \verb+\begin{definition}+\opt{Comment}  \>\Meta{\itshape body} \>\verb+\end{definition}+\\
 \verb+\begin{statement}+\opt{Comment}   \>\Meta{\itshape body} \>\verb+\end{statement}+\\
 \verb+\begin{example}+\opt{Comment}     \>\Meta{\itshape body} \>\verb+\end{example}+\\
 \verb+\begin{remark}+\opt{Comment}      \>\Meta{\itshape body} \>\verb+\end{remark}+
\end{tabbing}
In environment style, the end of theorem is equivalent to the
\com{qef} command. Counter names coincide with the names of
environments. First 4 environments are prepared using the
\Meta{theorem} type and last 4 environments are prepared using
the \Meta{remark} type.

\subsubsection{Theorems with manual numbering}

We show the using of these theorems in the environment style also.
\begin{tabbing}
 \tt xxxxx\=\verb+\begin{Proposition}+\meta{Number}\opt{Comment}\quad \=\Meta{\itshape body}\quad\=\+\kill
 \verb+\begin{Theorem}+\meta{Number}\opt{Comment}\quad \>\Meta{\itshape body} \>\verb+\end{Theorem}+\\
 \verb+\begin{Lemma}+\meta{Number}\opt{Comment}\quad \>\Meta{\itshape body} \>\verb+\end{Lemma}+\\
 \verb+\begin{Proposition}+\meta{Number}\opt{Comment}\quad \>\Meta{\itshape body} \>\verb+\end{Proposition}+\\
 \verb+\begin{Corollary}+\meta{Number}\opt{Comment}\quad \>\Meta{\itshape body} \>\verb+\end{Corollary}+\\
 \verb+\begin{Definition}+\meta{Number}\opt{Comment}\quad \>\Meta{\itshape body} \>\verb+\end{Definition}+\\
 \verb+\begin{Statement}+\meta{Number}\opt{Comment}\quad \>\Meta{\itshape body} \>\verb+\end{Statement}+\\
 \verb+\begin{Example}+\meta{Number}\opt{Comment}\quad \>\Meta{\itshape body} \>\verb+\end{Example}+\\
 \verb+\begin{Remark}+\meta{Number}\opt{Comment}\quad \>\Meta{\itshape body} \>\verb+\end{Remark}+
\end{tabbing}
If the \Meta{\itshape Number} parameter is empty, a theorem
without number is prepared. These commands do not use counters at
all. The presentation types for these theorems are the same as
for corresponding theorems with automatic numbering.

Every theorem type has the corresponding \com{like}\Meta{\itshape
type} command used for preparing theorems of this type. For
example, to prepare a math statement in the \Meta{theorem} type,
write down the following:
\begin{quote}
\com{liketheorem}\meta{Title}\meta{Number}\opt{Comment}\quad
\Meta{\itshape body}\quad \com{qef}
\end{quote}
To prepare a math statement in the \Meta{remark} type, typeset
\begin{quote}
\com{likeremark}\meta{Title}\meta{Number}\opt{Comment}\quad
\Meta{\itshape body}\quad \com{qef}
\end{quote}

\subsubsection{Theorems in apar mode}

We show the using of these theorems in the command style.
\begin{tabbing}
 \tt xxxxx\=\com{aproposition}\opt{Comment}\quad\=\Meta{\itshape body}\quad\=\+\kill
 \com{atheorem}\opt{Comment}\quad \>\Meta{\itshape body} \>\com{qef}\\
 \com{alemma}\opt{Comment}\quad \>\Meta{\itshape body} \>\com{qef}\\
 \com{aproposition}\opt{Comment}\quad \>\Meta{\itshape body} \>\com{qef}\\
 \com{acorollary}\opt{Comment}\quad \>\Meta{\itshape body} \>\com{qef}\\
 \com{adefinition}\opt{Comment}\quad \>\Meta{\itshape body} \>\com{qef}\\
 \com{astatement}\opt{Comment}\quad \>\Meta{\itshape body} \>\com{qef}\\
 \com{anexample}\opt{Comment}\quad \>\Meta{\itshape body} \>\com{qef}\\
 \com{aremark}\opt{Comment}\quad \>\Meta{\itshape body} \>\com{qef}
\end{tabbing}
These theorems are number with the \Meta{apar} counter. The
presentation types for these theorems are the same as for
corresponding theorems with automatic numbering. The star-forms
of \com{liketheorem} and \com{likeremark} commands are used for
preparing apar variants of math statements. They have no number
parameter:
\begin{tabbing}
 \tt xxxxx\=\com{liketheorem*}\meta{Title}\opt{Comment}\quad\=\Meta{\itshape body}\quad\=\+\kill
 \com{liketheorem*}\meta{Title}\opt{Comment} \>\Meta{\itshape body} \>\com{qef}\\
 \com{likeremark*}\meta{Title}\opt{Comment} \>\Meta{\itshape body} \>\com{qef}
\end{tabbing}

One additional command, the \com{apar}, can be used in the apar
mode. Its syntax is the following:
\begin{quote}
\com{apar}\opt{Header}
\end{quote}
It starts a new paragraph numbered with subsequent value of the
\Meta{apar} counter. The header is prepared in bold font.

\subsubsection{Proof command and support of different qed
symbols}

The \com{proof}\opt{Comment} opens the proof of a math statement.
For example,
\begin{verbatim}
     \proof[of Theorem 1] Some text \qed
\end{verbatim}
looks as follows:

\proof[of Theorem 1] Some text \qed

Along with the \com{qed}, the \com{qedsymbol} command can be used
in the case when a proof finishes with the display formula. It is
typed with the \AmS\ \verb+\tag*{\qedsymbol}+ command within a
display formula.

The \package{nccthm} package provides now two variants of the qed
symbol, white and black. They are requested through package options
\Opt{whiteqed} and \Opt{blackqed} respectively. When an option is
used, two more commands are created for it: \com{\itshape option}
and \com{{\itshape option}symbol}. For example,  the
\Opt{whiteqed} option generates the \com{whiteqed} and
\com{whiteqedsymbol} commands, and the \Opt{blackqed} option
generates the \com{blackqed} and \com{blackqedsymbol} commands.
The later option in the list of options describes the default qed
symbol. If no options used, only \com{qed} and \com{qedsymbol}
commands are generated.

Other qed symbols are welcome!

\subsubsection{Customization commands}

In conclusion, we show customization commands with their default
values for the \package{ncclatex} package:
\begin{description}
\item[\com{TheoremCommentDelimiters}\meta{}\meta{}] describes
delimiters inserted before and after a theorem\linebreak comment.
In the \package{nccthm} package the parenthesis are used, but in
the \package{ncclatex} package the delimiters are empty.

\item[\com{AfterTheoremHeaderChar}\meta{.}] describes the
character inserted at the end of header of theorem and proof.

\item[\com{AfterTheoremHeaderSkip}\meta{\upshape\com{hskip} .7em plus .2em minus
.1em}] describes a horizontal skip inserted after a header of
theorem and proof.

\item[\com{AparStyleParameters}\meta{\com{bfseries}}\meta{\com{bfseries}}\meta{.\com{enskip}}]
describes style parameters for\linebreak preparing apar theorems:
the first parameter is a style used in the \com{apar} command, the
second and third parameters describe the prefix and suffix
inserted before and after \com{theapar} command in typeout.

\item[\com{ProofStyleParameters}\meta{\com{bfseries}}\meta{\com{proofname}}]
describes style parameters used in the\linebreak \com{proof}
command: the first is a font style and the last is a proof title
(it is coded here in the \com{proofname} command with the default
definition \verb+\newcommand\proofname{Proof}+).

\end{description}

\subsection{Math extension}

In old NCC-\LaTeX, the standard \LaTeX\ environments were used
for preparing display formulas and some extension commands were
developed to support manual numbering. In the new release of
NCC-\LaTeX, it was decided to use an excellent math extension
provided with the \package{amsmath} package and enlarge it a bit.
The enlargement of \AmS\ package is provided with the
\package{nccmath} package. The \package{nccmath} package passes
all options to the \package{amsmath}.

Two major enlargements were done:
\begin{itemize}
\item In \package{amsmath}, the \Meta{eqnarray} environment leaves
unchanged because alternative \AmS\ environments exist. We
redefine the \Meta{eqnarray} to work in the \AmS\ style. The
following improvements were done in it: an equation tag is
prepared by the same manner as in \AmS\ display formulas
(\com{tag} and \com{tag*} are allowed); the \com{displaybreak}
command is allowed; the intercolumn distance is reduced to the
distance between ordinary and relational math symbols; and the
center field is prepared in the \com{displaystyle}.

\item In old NCC-\LaTeX, a display equivalent for the \Meta{array}
environment, namely \Meta{darray}, was implemented. In the new
release, it is implemented also but in a bit different way to
avoid conflicts with packages that redefine the \Meta{array}
environment. The use of column specifications in the
\Meta{darray} environment is restricted to \Meta{l}, \Meta{c},
\Meta{r}, \Meta{@}, and \Meta{*} commands. The intercolumn
distance is just the same as for \Meta{eqnarray} environment and
no space is inserted before the first and after the last column.

\end{itemize}

\subsubsection{NCC-\LaTeX\ equivalents to display formulas}

The following NCC-\LaTeX\ equivalents are provided with
\package{nccmath}:
\begin{desclist}{}{\hfill\enskip=}[\com{eqalign*}\meta{formulas}]
\raggedright
\item[\com{eq}\meta{formula}]
\verb+\begin{equation}+ \Meta{\itshape formula}
\verb+\end{equation}+.

\item[\com{eq*}\meta{formula}]
\verb+\begin{equation*}+ \Meta{\itshape formula}
\verb+\end{equation*}+.

\item[\com{eqs}\meta{formulas}]
\verb+\begin{eqnarray}+ \Meta{\itshape formulas}
\verb+\end{eqnarray}+.

\item[\com{eqs*}\meta{formulas}]
\verb+\begin{eqnarray*}+ \Meta{\itshape formulas}
\verb+\end{eqnarray*}+.

\item[\com{eqalign}\meta{formulas}]
\verb+\begin{equation} \begin{darray}{rcl}+ \Meta{\itshape
formulas} \verb+\end{darray} \end{equation}+.

\item[\com{eqalign*}\meta{formulas}]
\verb+\begin{equation*} \begin{darray}{rcl}+ \Meta{\itshape
formulas} \verb+\end{darray} \end{equation*}+.

\end{desclist}

The \com{eqs} and \com{eqs*} commands have an optional parameter
describing a distance between columns. For example,
\begin{verbatim}
     \eqs[0mm]{&& -\Delta u = f, \\ && u|_\Gamma = 0,}
\end{verbatim}
removes the intercolumn distance because the 3rd column is only
used here. The \Meta{eqnarray} environment has no optional
parameter.

The \com{eqalign} and \com{eqalign*} commands have an optional
parameter also. Its meaning is the column specification
parameter: \com{eqalign}\meta{formulas} =
\verb+\eqalign[rcl]+\meta{formulas}.

\subsubsection{Remarks on display equations}

The alignment style in display equations (except \TeX's
low level \verb|$$|) can be changed using the following
environments:
\begin{quote}
\com{begin}\meta{fleqn}\opt{margin} \Meta{\itshape body} \com{end}\meta{fleqn}\\
\com{begin}\meta{ceqn} \Meta{\itshape body} \com{end}\meta{ceqn}
\end{quote}
The \Meta{fleqn} environment sets the flush left alignment
with the left margin specified by the optional parameter
(default margin is \Meta{0pt}). The \Meta{ceqn} environment
sets the centered alignment.

The \com{intertext} command from \package{amsmath} now has an
optional parameter,
\begin{quote}
\com{intertext}\opt{skip}\meta{text between formulas}
\end{quote}
The \Meta{\itshape skip} is a vertical skip value inserted before
and after the text. If it is omitted, the standard spaces are
inserted.

In \LaTeX, it is not recommended to start a display formula from a
new paragraph (in vertical mode in other words). This is because
the \TeX's algorithm inserts an empty paragraph before such a
formula. To avoid insertion of an empty paragraph, Donald Knuth
recommended to use \com{noindent} command before a display
formula starting in the vertical mode. This trick is used in the
\package{nccmath} package. All display environments are slightly
corrected with insertion of \com{NCC@ignorepar} command at their
beginning. This command does a little more than simply applies
this trick. It provides suppressing of the vertical space before
a display formula if it opens a minipage. It also supports the
use of short skip above a display environment by user's request.

In \TeX, two types of skips above display formulas are used: the
normal skip defined in the \com{abovedisplayskip} register and the
short skip defined in the \com{abovedisplayshortskip} register.
When a display formula is typed out, \TeX\ decides what skip to
insert depending on width of the formula, its style (centered or
flushed left, numbered left or right), and the width of the rest
of text in the last line of the previous paragraph. But this
algorithm works for ordinary formulas only. It does not work in
multiline formulas prepared with \com{halign} command. So, a
manual replacement of normal skip to short skip is required in
some cases. To provides this, the \com{useshortskip} command is
introduced in the \package{nccmath} package. It forces the use of
short skip in a display formula going after it.

\subsubsection{Other math commands}

The following commands were ported from the old NCC-\LaTeX:
\begin{description}[\com{nr}]
\item[\com{nr}] has just the same syntax as the \verb+\\+
but inserts an extra vertical space of \Meta{0.5ex}. It is quite
useful in display formulas to separate some rows a bit more.

\item[\com{mrel}\meta{rows}] prepares a new math relation
symbol from one-column table of math formulas. For example, the
command
\verb+$\mrel{<\\[-.7ex]>}$+ produces
$\mrel{<\\[-.7ex]>}$.

\item[\com{underrel}\meta{base}\meta{bottom}] is a twin to
\com{overrel}. For example,\\
 \verb+$A\underrel{\longrightarrow}{x\to 0}B$+
produces $A\underrel{\longrightarrow}{x\to 0}B$.

\end{description}

\subsection{Figures and tables in NCC-\LaTeX{}}

The standard \LaTeX\ floating environments, namely \Meta{figure}
and \Meta{table}, allow user to place floating material in a
document. But they do not introduce a style in which this
material must be prepared. In NCC-\LaTeX, envelop commands are
developed which join a style with a float and introduce more
features. These commands are implemented in the
\package{nccfloats} package from the \bungle{ncctools} bungle.

\subsubsection{Basic commands}

The \com{FloatingStyle}\meta{style} command sets a style of
floats in the document. It affects on the material prepared with
commands described below. The default style is
\begin{verbatim}
     \FloatingStyle{\footnotesize\centering}
\end{verbatim}

We start with the basic commands, namely \com{minifig} and
\com{minitabl}. They prepare a material in a minipage and allow
using the \com{caption} command in the body. Their syntax is
similar to the \com{parbox} command:
\begin{quote}
\com{minifig}\opt{pos}\opt{height}\opt{inner-pos}\meta{width}\meta{body}\\
\com{minitabl}\opt{pos}\opt{height}\opt{inner-pos}\meta{width}\meta{body}
\end{quote}
The \Meta{\itshape pos} is a vertical alignment parameter for
minipage (\Meta{t}, \Meta{b}, or \Meta{c}) with respect to
surrounding text; the \Meta{\itshape height} is a minipage height
required; the \Meta{\itshape inner-pos} is a vertical alignment
of text inside the minipage (\Meta{t}, \Meta{b}, \Meta{c}, or
\Meta{s}); and the \Meta{\itshape width} is the minipage width.
The \Meta{\itshape body} is prepared in the specified style and
can contain a \com{caption} command.

All other NCC-\LaTeX\ floating extension commands are based on
\com{minifig} and \com{minitabl}.

\subsubsection{Side figure or table}

For small figures and tables, it is preferable to insert them
inside a text instead of using floating mechanism. The
typographic rules usually require an illustrative material to
occupy an outer side of paper. In two side printing, this means
figure and tables should be on the right side if a page number is
odd and on the left side if page number is even. In one side
printing, figures and tables must occupy the right side of paper.

The following commands support such a placement:
\begin{quote}
\com{sidefig}\opt{pos}\Meta{($w_1$)}\Meta{($w_2$)}\meta{figure body}\meta{text body}\\
\com{sidefig*}\opt{pos}\Meta{($w_1$)}\Meta{($w_2$)}\meta{figure body}\meta{text body}\\
\com{sidetabl}\opt{pos}\Meta{($w_1$)}\Meta{($w_2$)}\meta{table body}\meta{text body}\\
\com{sidetabl*}\opt{pos}\Meta{($w_1$)}\Meta{($w_2$)}\meta{table body}\meta{text body}
\end{quote}
For simplicity, we further use the term \textit{minifloat} for the
small illustrating material (figure or table), however
understanding that it is not a float at all. It is inserted in
the main flow next to a paragraph box specified in the last
parameter of above described commands.

The no-star forms of above described commands place a minifloat
next to the specified text on the outer side of page (to the
right for odd page and to the left for even page). In two column
or one side mode, minifloat is always posed to the right. The
star forms provide the reverse placement. By default, minifloat
is vertically centered with respect to the text and the
\com{strut} command is inserted at the beginning and at the end
of the \Meta{\itshape text body} to provide normal baseline
distances of the first and last lines of the text from
surrounding text lines.

All parameters in square and round brackets are optional and mean
the following:
\begin{desclist}{}{}[\Meta{\itshape pos}]
\item[\Meta{\itshape pos}] specifies minifloat alignment (\Meta{t},
\Meta{b}, or \Meta{c}; default is \Meta{c}) with respect to text
box and can contain additional chars controlling the text body
preparation: \Meta{j} means the last line of the text to be
justified to the right and \Meta{n} means suppressing of struts
insertion (they should be inserted manually if necessary);

\item[$w_1$] is the width of minifloat (if units are omitted, the
\com{unitlength} is supposed); and

\item[$w_2$] is the width of the text box (if units are omitted, the
\com{unitlength} is supposed).
\end{desclist}
If both width parameters are absent, the widths are calculated as
\verb+(\linewidth-1.5em)/2+. If $w_2$ is absent, the text body
width is calculated as \verb+\linewidth-+$w_1$\verb+-1.5em+.

While preparing a side minifloat, it is sometimes necessary to
provide conditional placement depending on the side a minifloat
is posed. The command
\begin{quote}
\com{ifleftsidefloat}\meta{left-clause}\meta{right-clause}
\end{quote}
provides this. It is useful in parameters of \com{sidefig} or
\com{sidetabl} and processes \Meta{\itshape left-clause} if the
minifloat is posed to the left or \Meta{\itshape right-clause}
otherwise.

\subsubsection{Floating figure or table}

\begin{quote}
\com{fig}\opt{placement}\Meta{($w$)}\meta{body}\\
\com{fig*}\opt{placement}\Meta{($w$)}\meta{body}\\
\com{tabl}\opt{placement}\Meta{($w$)}\meta{body}\\
\com{tabl*}\opt{placement}\Meta{($w$)}\meta{body}
\end{quote}
The \Meta{\itshape placement} is a float placement parameter
describing places where a float can appear. The default value is
\Meta{htp} (here, or at the top of the next page, or on the page
with floats only). The optional \Meta{($w$)} parameter defines a
width of box occupied by the float (the width of nested
\com{minifig} or \com{minitabl}). If it
is omitted, the float has the maximum width equal to
\com{linewidth}.

The \com{fig} and \com{tabl} commands envelop the \Meta{figure}
and \Meta{table} environments respectively. Their star-forms
envelop corresponding starred environments.

\subsubsection{Two floating figures or tables side by side}

\begin{quote}
\com{figs}\opt{placement}\Meta{($w_1$)}\Meta{($w_2$)}\meta{body1}\meta{body2}\\
\com{figs*}\opt{placement}\Meta{($w_1$)}\Meta{($w_2$)}\meta{body1}\meta{body2}\\
\com{tabls}\opt{placement}\Meta{($w_1$)}\Meta{($w_2$)}\meta{body1}\meta{body2}\\
\com{tabls*}\opt{placement}\Meta{($w_1$)}\Meta{($w_2$)}\meta{body1}\meta{body2}
\end{quote}
These commands place two figures or tables side by side. The
\Meta{\itshape body1} is a body of the left figure or table and
the \Meta{\itshape body2} is a body of the right figure or table.
Other parameters are optional. The meaning and default value of
the \Meta{\itshape placement} parameter is the same as described
above. The \Meta{($w_1$)} and \Meta{($w_2$)} parameters are
widths of left and right boxes. If
they both are omitted, the left and right boxes will have the
width equal to \Meta{(\com{linewidth}-1em)/2}. If \Meta{($w_2$)}
is omitted, the right box will occupy the rest of horizontal space
minus \Meta{1em}. If both parameters are specified, the rest
space is inserted between boxes. If the total width of left and
right floats exceeds the \com{linewidth}, the floats will overlap
at the middle of line (a negative horizontal space is inserted
between them).

In \com{tabls} command, boxes of the left and right bodies are
top-aligned, but in \com{figs} command, the bottom alignment is
used.

\subsection{Graphics in NCC-\LaTeX{}}

The \package{nccpic} package from the \bungle{ncctools} bungle
envelops the standard \package{graphicx} package. The package
passes all options to the underground package.

The main aim of the \package{nccpic} package is the preparing of
graphics extensions list depending on a dvi-driver used with the
\package{graphicx} package. This allows omit an extension of a
graphics file in the \com{includegraphics} command. When a file
without extension is searched, this command sequentially tries
extensions from the list until an appropriate file will be found.

Using this feature you can support multiple output from \LaTeX\
with minimum changes in \Meta{.tex} sources. The only required
thing is to prepare a number of versions for all graphics files
called in a document. For example, the dvips program likes
\Meta{.eps} files, the Yap previewer likes \Meta{.bmp} or
\Meta{.eps} files, the pdflatex likes \Meta{.png} files. To
satisfy their needs, you can prepare \Meta{.eps}, \Meta{.bmp},
and \Meta{.png} versions for all pictures and pass a required
option to the \package{nccpic} package.

The graphics extensions list is customized now for most popular
drivers, namely \Opt{dvips}, \Opt{dvipdf}, and \Opt{dvipdfm}, and
for use with \Opt{pdftex} also. More customization is welcome!

The next aim of the \package{nccpic} package is the regulation of
placement of graphics files in the file system. It is too
inconvenient when pictures are stored together with \Meta{.tex}
source files. We propose to store graphics files in the
\Meta{graphics} subdirectory of the source directory. To support
the search in this storage, the graphics path is customized in the
\package{nccpic} package.

The following commands are introduced in the \package{nccpic}
package:
\begin{desclist}{}{}
\item[\com{ipic}\meta{filename}] command loads a file having the
name \Meta{{\itshape filename}.pic} searching it in the graphics
path. It allow to take actual graphics inclusion commands out of
source files for automation purposes.

\item[\com{putimage}\Meta{($x,y$)[$x_r,y_r$]($x_s,y_s$)}\meta{filename}]
command emulates a graphics inclusion technique used in the old
NCC-\LaTeX. Look in the \package{nccpic} package file for more
detail description.

\item[\com{draftgraphics} and \com{finalgraphics}] are toggles
between final and draft modes for preparation of graphics. In
draft mode, a graphics object is shown as a framebox of the
required dimensions with an object name in it. Using these
commands, you can toggle graphics preparation mode on the fly. In
draft mode, the \com{putimage} command does not test an existence
of required graphics file.
\end{desclist}

\subsection{Additional boxes}

The \package{nccboxes} package from the \bungle{ncctools} bungle
provides additional boxes:
\begin{description}
\item[\com{jhbox}\meta{prototype}\opt{align}\meta{body}]
horizontally aligns the body in the text box which width is
defined by the \Meta{\itshape prototype} parameter. The optional
\Meta{\itshape align} parameter defines a position of alignment
(\Meta{l}, \Meta{c}, \Meta{r}, or \Meta{s}; default is \Meta{c}).

\item[\com{jvbox}\meta{prototype}\opt{align}\meta{body}]
vertically aligns the body with respect to the strut defined by
the \Meta{\itshape prototype} parameter. The optional
\Meta{\itshape align} parameter defines a position of alignment
(\Meta{t}, \Meta{c}, or \Meta{b}; default is \Meta{c}). If
\Meta{t} is used, the body is raised in such a way that its
height will be equal to the height of the prototype's strut. For
\Meta{b} case, the depths will be equal and, for \Meta{c} case,
the body is vertically centered with respect to prototype's strut.

\item[\com{jparbox}\meta{prototype}\opt{align}\meta{width}\meta{body}]
prepares a paragraph box of required \Meta{\itshape width} and
vertically aligns it with respect to the \Meta{\itshape
prototype} by the same manner as \com{jvbox}.

\item[\com{pbox}\opt{align}\meta{body}] is a simple one-column
table. The \Meta{\itshape align} parameter may consist of two
letters defining a relative alignment in the column (\Meta{l},
\Meta{c}, or \Meta{r}) and the vertical alignment of the table
with respect to surrounding text (\Meta{t}, \Meta{c}, or
\Meta{b}). Centering is the default alignment. The distance
between the table rows is independent on the \com{arraystretch}
value.

\item[\com{addbox}\meta{above}\meta{below}\meta{body}] prepares
an hbox containing the \Meta{\itshape body} which height is
adjusted to the value of the \Meta{\itshape above} length
parameter and depth is adjusted to the value of the
\Meta{\itshape below} length parameter. For example,
\verb+\addbox{.5ex}{.5ex}{text}+ increases the height and depth of
produced hbox on \Meta{0.5ex}.

\item[\com{picbox}\meta{body}] = \verb+\begin{picture}(0,0)(0,0)+
\Meta{\itshape body} \verb+\end{picture}+.

\end{description}

To prepare a fancy table, the following commands can be used:
\begin{desclist}{}{}
\item[\com{Strut}\Meta{/{\itshape value}/}] is a strut which
height and depth are calculated from the strut prototype (letter
\Meta{A} by default) as follows: if \Meta{{\itshape value}>0},
the full height of the current \com{strutbox} multiplied by the
\Meta{\itshape value} is added to the height of prototype strut,
otherwise the depth of prototype strut is increased with the
modulus of \Meta{\itshape value} multiplied by the full height of
\com{strutbox}. For example, \verb+\Strut/1/+ inserts a strut
which height exceeds the height of the letter \Meta{A} from the
current font on the interline distance. The \com{Strut} without
parameter is equal to \verb+\Strut/0/+.

\item[\com{tstrut}, \com{bstrut}, and \com{tbstrut}] insert
struts exceeding the height, depth, and height and depth of the
strut prototype by a special small amount. This amount is
calculated in such a way that the full height of \com{tbstrut}
will be equal to 1.5 of full height of the current \com{strutbox}.

\item[\com{cbox}\Meta{/{\itshape value}/}\opt{align}\meta{body}]
prepares a box whose body is a one-column table. Its height and
depth are enlarged using \com{tstrut} at the beginning and
\com{bstrut} at the end of body. The horizontal alignment
(\Meta{l}, \Meta{c}, or \Meta{r}) in the column and the vertical
alignment (\Meta{t}, \Meta{c}, or \Meta{b}) are defined in the
\Meta{\itshape align} parameter. Centered alignment is used by
default. The resulting box is vertically aligned with respect to
the \com{Strut}\Meta{/{\itshape value}/} using the \com{jvbox}
command. The \com{cbox*} command does the same but vanishes the
height and depth of the resulting box.

\end{desclist}

The \com{cbox} command is used in the headers of tables. Its star
form is useful in cells having vertical spans. The style for
typing its body is managed with the \com{cboxstyle} command. Its
default value is empty but in NCC-\LaTeX\ this command is
redefined as follows:
\begin{verbatim}
     \renewcommand\cboxstyle{\scriptsize}
\end{verbatim}

We demonstrate the use of struts and \com{cbox} on the example
\begin{center}
\renewcommand\cboxstyle{\small\bf}
\setlength{\tabcolsep}{10pt}
\begin{tabular}{|l|c|c|c|}\hline
  \cbox*/-1.5/{Vertically\\spanned head} & \cbox{Simple head}
  &\multicolumn2{c|}{\cbox{Very long head\\of two lines}}\\\cline{2-4}
  &\cbox{subhead} &\cbox{subhead} &\cbox{subhead}\\\hline
  \Strut/1/ Text & field & field & field \\
            Text & field & field & field \\
  \bstrut   Text & field & field & field \\\hline
\end{tabular}
\end{center}
produced by the following code:
\begin{verbatim}
     \begin{center}
     \renewcommand\cboxstyle{\small\bf}
     \setlength{\tabcolsep}{10pt}
     \begin{tabular}{|l|c|c|c|}\hline
       \cbox*/-1.5/{Vertically\\spanned head} & \cbox{Simple head}
       &\multicolumn2{c|}{\cbox{Very long head\\of two lines}}\\\cline{2-4}
       &\cbox{subhead} &\cbox{subhead} &\cbox{subhead}\\\hline
       \Strut/1/ Text & field & field & field \\
                 Text & field & field & field \\
       \bstrut   Text & field & field & field \\\hline
     \end{tabular}
     \end{center}
\end{verbatim}

\subsection{Miscellaneous commands}

We describe here commands provided by the \package{ncclatex}
package itself.
\begin{desclist}{}{}
\item[\com{acknow}] starts a new paragraph with the
\textit{Acknowledgements} title.

\item[\com{cref}\meta{citelabel}] produces a citation without brackets to the
specified \Meta{\itshape citelabel}. It is used in the case of
citations containing ranges, e.g.\ [2--4, 7].

\item[\com{mop}\meta{name}] is used for coding new math operations
like $\sin$. For example, \verb+$k=\mop{sgn}x$+ produces
$k=\mop{sgn}x$ with proper font and spaces. This command is
equivalent to \AmS\ \com{operatorname} command.

\item[\com{tg}, \com{ctg}, \com{arctg}, and \com{arcctg}] produce
math operations for tangent, cotangent, and for their inverse
functions in Russian typesetting tradition.

\item[\com{No}] produces the numero symbol. If the \Opt{russian}
option is not used, this command emulates the numero symbol with
the text ``\No''.

\item[\com{tc}\meta{body}] adjust the body to the center
using \verb+\hspace*{\fill}+ glues. This
command is useful in tables when centered alignment of a
particular cell is required but another alignment is
specified for the column the cell belongs to.

\end{desclist}

The titles of proof, predefined theorems, and acknowledgements
are declared with commands having the \Meta{name} suffix. For
example, the proof title is coded in the \com{proofname}, the
title of lemmas is defined in the \com{lemmaname}, and the
acknowledgements title is coded in the \com{acknowname} command.
They all can be redefined to provide internationalization (the
\Opt{russian} option redefines these titles in Russian).

\section{The sibjnm class}

This class describes a style used in the \textit{Siberian Journal
of Numerical Mathematics} (SibJNM),
\texttt{http://www.sscc.ru/SibJNM/}, email:
\texttt{sibjnm@oapmg.sscc.ru}. We recommend to use this class for
submitting an article to this journal.

The \package{sibjnm} class is based on the \package{ncc} class.
It sets the following options of \package{ncc} class:
\Opt{a4paper}, \Opt{11pt}, \Opt{article}, \Opt{twoside}, and
\Opt{onecolumn}. A user can manage the following options:
\Opt{draft}, \Opt{final}, \Opt{openany}, \Opt{openright}, and
\Opt{russian}. Other options are forbidden.

The SibJNM is a bilingual journal. An article can be prepared in
English or in Russian. An abstract is prepared in both languages.
Before abstracts, one of subject classification commands must be
used: \com{UDC}\meta{indices} or
\com{AmSclassification}\meta{indices}. The first command sets UDC
classification indices and the last command sets \AmS\
classification indices of the article subject.

The russian abstract must go right after the \com{maketitle}
command. Its syntax:
\begin{quote}
\verb+\begin{Rabstract}+\meta{Authors}\meta{Title} \Meta{\itshape
body} \verb+\end{Rabstract}+
\end{quote}
The english abstract must go after the russian one. Its syntax is
similar:
\begin{quote}
\verb+\begin{Eabstract}+\meta{Authors}\meta{Title} \Meta{\itshape
body} \verb+\end{Eabstract}+
\end{quote}
The text field of SibJNM article is 155$\times$225 mm.

\end{document}