summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/cstex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-08-16 21:43:28 +0000
committerKarl Berry <karl@freefriends.org>2014-08-16 21:43:28 +0000
commit9caacf53d7d2a1620a603aa644617293a60183e2 (patch)
tree231eaf764696a85098e37d8ec19045fbb72c0a77 /Master/texmf-dist/doc/cstex
parent48523b6ca61cfc84ac2bbe578b12fed09cbd70eb (diff)
cstex (16aug14)
git-svn-id: svn://tug.org/texlive/trunk@34952 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/cstex')
-rw-r--r--Master/texmf-dist/doc/cstex/opmac-d.tex61
-rw-r--r--Master/texmf-dist/doc/cstex/opmac-u-en.pdfbin227290 -> 227867 bytes
-rw-r--r--Master/texmf-dist/doc/cstex/opmac-u-en.tex69
-rw-r--r--Master/texmf-dist/doc/cstex/opmac-u.pdfbin262768 -> 262553 bytes
-rw-r--r--Master/texmf-dist/doc/cstex/opmac-u.tex18
5 files changed, 96 insertions, 52 deletions
diff --git a/Master/texmf-dist/doc/cstex/opmac-d.tex b/Master/texmf-dist/doc/cstex/opmac-d.tex
index ab78fec6146..7fd3da08a92 100644
--- a/Master/texmf-dist/doc/cstex/opmac-d.tex
+++ b/Master/texmf-dist/doc/cstex/opmac-d.tex
@@ -7,7 +7,8 @@
% This file is encoded in ISO-8859-2 because
% UTF-8 encTeX has a conflict with DocByTeX
-\def\projectversion{May 2014}
+\chyph
+\def\projectversion{Jul 2014}
\def\headtitle{OPmac}
\widowpenalty=10000
@@ -20,7 +21,6 @@
\def\csplain{\CS plain}
\def\CS{CS}
-\chyph
\input docby.tex
@@ -1027,8 +1027,17 @@ chceme navíc takový seznam nahradit zápisem 13--16. Makro
\inext{Xindex}{\empty}{+-}
-Činnost makra "\Xindex" si vysvětlíme za chvíli podrobněji. Nejprve ovšem
-definujeme pomocné makro \db firstdata "\,<heslo>"~"\<cs>", které expanduje na
+Činnost makra "\Xindex" si vysvětlíme za chvíli podrobněji. Nyní jen
+uvedeme, že "\Xindex" je jen speciální variantou obecného makra
+\db Xindexg při "#1=,". Takže pracuje s kontrolními sekvencemi typu
+"\,<heslo>". Následující text popisuje jen tento případ. Makro "\Xindexg"
+je možné použít pro pralelní vytváření dalších seznamů stránek
+stejných hesel (např. seznam vyznačený kurzívou, tučně atd.). Jak to udělat
+je popsáno v OPmac triku 0072.
+
+Údaje o stranách spojených s rejstříkovým heslem jsou ukládány do makra
+"\,<heslo>" a jsou rozděleny do dvou částí ve tvaru "{prvni}{druhy}".
+Definujeme pomocné makro \db firstdata "\,<heslo>"~"\<cs>", které expanduje na
"\<cs>"~"<první-datový-údaj-hesla>&". Je-li třeba "\,aa" definováno jako
"{prvni}{druhy}", pak "\firstdata"~"\,aa"~"\cosi" expanduje na "\cosi"~"prvni&".
Tím máme možnost vyzískat data z makra. Podobně makro
@@ -1073,7 +1082,7 @@ if (první výskyt \,<heslo>) {
<seznam-stran> = "<strana>"; <stav> = +; <posledni-strana> = <strana>;
return;
}
-if (<strana> == <posledni-strana>) return;
+if (<strana> == <empty> || <strana> == <posledni-strana>) return;
if (<stav> == +) {
if (<strana> == <posledni-strana>+1) {
<seznam-stran> += "--";
@@ -1093,6 +1102,15 @@ else {
<poslední-strana> = <strana>;
\endtt
+V makru "\Xindex" pracujeme ještě se dvěma pomocnými makry
+\db pgfolioA a \db pgfolioB. Pro kladné stránky se tato makra chovají
+stejně, jako kdyby tam vůbec nebyla. Ovšem v plain\TeX{}u
+(viz maro "\folio") se mohou stránkové číslice vyskytnout
+na začátku dokumentu záporné, v takovém případě se mají tisknout
+římskými číslicemi. Proto jsou uvedená makra definována poněkud chytřeji.
+
+\inext{pgfolioA}{\empty}{+-}
+
\def\begtthook{}
Makro \db makeindex nejprve definuje přechodný význam rekurzivního
"\act" tak, aby byly uzavřeny seznamy stránek (tj. aby seznam nekončil
@@ -1776,12 +1794,15 @@ expandujeme "\tmpb" pomocí pěti "\expandafter" a poté ho pronulujeme,
takže to pracuje jako
"\def\tmbb{}\tmp<původní obsah tmpb>\/<string1>\relax".
-\inext{replacestring}{\empty}{+-}
+V makru pracujeme s tokeny "!" a "?" kategorie 3, které slouží jako
+separátory. Předpokládáme, že takové tokeny se ve zpracovávaném textu nikdy neobjeví.
+
+\inext{bgroup}{\empty}{+-}
-Na konci "<textu>" je vložena sekvence "\/", která jej odděluje od přidaného
-"<string1>". Kdybychom ji tam nedali, pak při "<string1>=//" a při lomítku
+Na konci "<textu>" je vložen "?", který jej odděluje od přidaného
+"<string1>". Kdybychom jej tam nedali, pak při "<string1>=//" a při lomítku
na konci "<textu>" bychom měli "...///" a to způsobí potíže.
-V závěru makra "\replacestring" je přidaná sekvence "\/" zase odstraněna.
+V závěru makra "\replacestring" je přidaný otazník zase odstraněn.
\subsec Outlines -- obsah v záložce PDF dokumentu
@@ -2026,10 +2047,10 @@ raději i mezery za položkou uděláme nepodstatné.
Příklad: po deklaraci: "{|cr||cl|}" makro "\scantabdata" vytvoří:
\begtt
-tabdata: \vrule\tabiteml\hfil#\unsskip\hfil\tabitemr
- &\tabiteml\hfil#\unsskip\tabitemr \vrule\kern\vvkern\vrule
- &\tabiteml\hfil#\unsskip\hfil\tabitemr
- &\tabiteml#\unsskip\hfil\tabitemr\vrule
+tabdata: \vrule\tabiteml\hfil#\unsskip\hfil\tabitemr\tabstrutA
+ &\tabiteml\hfil#\unsskip\tabitemr \vrule\kern\vvkern\vrule\tabstrutA
+ &\tabiteml\hfil#\unsskip\hfil\tabitemr\tabstrutA
+ &\tabiteml#\unsskip\hfil\tabitemr\vrule\tabstrutA
ddlinedata: &\dditem &\dditem\vvitem &\dditem &\dditem
\endtt
@@ -2270,10 +2291,22 @@ zásobník barev, který je pomocí \db mnoteD vrácen do stavu, v jakém byl před
zahájemním zpracování "\mnote". Uživatel může v prametru "\mnote" používat
"{\localcolor\Green X{\localcolor\Blue Y}Z}" s~očekávaným výsledkem.
Barvy neoznačené "\localcolor" končí svou platnost na konci poznámky
-"\mnote".
+"\mnote".
\inext{mnoteC}{^^B\cbrace}{++}
+Základová barva lokálního zásobníku barev je převzata jako
+aktuální barva v době zpracování "\mnote", ale je pozměněna prefixem "\long",
+aby explicitní nastavení barvy vždy založilo barvu. Obecně
+totiž "\setcmykcolor" zakládá barvu jen tehdy, když je rozdílná od
+aktuální. Zde je rozdílnost zajištěna prefixem "\long".
+Tento trik zabere, pokud se uvnitř "\mnote" pomocí "A{\localcolor\Red BC}DE"
+má přejít k původní barvě pro písmena "DE". Ovšem ne vždy bude barva "A"
+shodná s barvou "DE", protože barva "A" odpovídá barvě na koci aktuálního
+řádku odstavce, zatímco "DE" odpovídá barvě v době činnosti makra "\mnote".
+Pokud toto bude uživateli vadit, musí si pomocí "\mnotehook" nastavit
+explicitní barvu poznámky.
+
Makro \db Xmnote pracuje během čtení REF souboru a využívá toho, že makro
"\Xpage" nastavuje číslo právě procesované strany do registru "\lastpge".
Takže stačí použít "\sxdef" následujícím způsobem:
diff --git a/Master/texmf-dist/doc/cstex/opmac-u-en.pdf b/Master/texmf-dist/doc/cstex/opmac-u-en.pdf
index 731fca0656b..37f865a8ba6 100644
--- a/Master/texmf-dist/doc/cstex/opmac-u-en.pdf
+++ b/Master/texmf-dist/doc/cstex/opmac-u-en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/cstex/opmac-u-en.tex b/Master/texmf-dist/doc/cstex/opmac-u-en.tex
index 95408df9a3e..82c65e45165 100644
--- a/Master/texmf-dist/doc/cstex/opmac-u-en.tex
+++ b/Master/texmf-dist/doc/cstex/opmac-u-en.tex
@@ -32,24 +32,25 @@
\nonum \sec Introduction
%%%%%%%%%%%%
-The OPmac package is simple additional macros to plain\TeX{}. It enables
-users to take advantage of basic \LaTeX{} functionality: the font size
-selection, automatic creation of table of contents and index, working with
-bibliography databases, tables, references including hyperlinks option,
-margins settings, etc.
-
-I have decided to publish my macros together with the new version of
-\csplain{}. I am using these macros long time for various purposes only in
-my own computer. Now, I have made them more clean and added the user and
-technical documentation and released them.
-
-The main reason is to give a set of macros which solves the common tasks to
-the plain\TeX{} users. The side effect is that the macros demonstrate
-that it is possible to do \TeX{} code simple and effective. Most of
-\LaTeX{} macro packages don't have this feature. All macros are in the single
-documented file "opmac.tex" with only 1700 lines. On the other hand the
-\LaTeX{} code which solves comparable tasks is placed in kernel and tens
-of \LaTeX{} packages with many tens of thousands lines in total.
+The OPmac package is a set of simple additional macros to plain\TeX{}. It
+enables users to take advantage of basic \LaTeX{} functionality: font size
+selection, the automatic creation of a table of contents and an index, working
+with bibliography databases, tables, references with optional hyperlinks, margin
+settings, etc.
+
+I had been using these macros personally for a long time, but now, after
+cleaning up the code a bit and providing both user and technical documentation,
+I'm releasing them to the general public along with the new version of
+\csplain{}.
+
+My main motivation in publishing OPmac is to provide a set of macros with
+solutions to common tasks for plain\TeX{} users. Additionally, I wanted to
+demonstrate that it is possible to write \TeX{} code in a simple and effective
+style, something that most \LaTeX{} macro packages lack. All of OPmac's macros
+are contained within the single file "opmac.tex" in only 1,700
+lines. By comparison, the \LaTeX{} code which solves comparable tasks is placed
+inside its ``kernel'' along with many \LaTeX{} packages all of which contain
+tens of thousands of lines.
The main principles which I followed when creating this macro package, are:
@@ -95,7 +96,7 @@ Here is a text.
\bye
\endtt
-You can use \TeX, pdf\TeX, Xe\TeX{} or lua\TeX{} with eplain or \csplain{}
+You can use \TeX, pdf\TeX, Xe\TeX{} or lua\TeX{} with "etex.src" or \csplain{}
preloaded. The \csplain{} is recommended but it is not explicitly requested if you
don't need to use Czech/Slovak specific features\fnote
{Warnings: ``falling back to ASCII sorting''
@@ -134,10 +135,26 @@ i.e. the value stays unchanged. Examples:
\typoscale[\magstep2/] % fonts bigger 1,44times
\endtt
-The sizes declared by these macros (for example in titles) are relative to
-the basic size selected for the font (this may be arbitrary size, not only
+The sizes declared by these macros (for example in titles) are relative to the
+basic size selected for the current font (this may be arbitrary size, not only
10pt).
+There are times however, when one would like to make a font change relative to
+the documents ``base'' font size instead of the current font (e.g. when
+typesetting footnotes). The macro "\typobase" provides an easy way to perform
+such changes. The ``base'' font size is set with the first use of either
+"\typosize" or "\typoscale" and this size is restored by "\typobase". Example:
+
+\begtt
+\typosize[12/14] % if first use of \typosize, then this sets the "base"
+...
+{\typoscale[16/18] % bigger size (for example title font)
+ ...
+ \typobase\typoscale[750/750] % reduced to 75% of [12/14] (i.e. [9/10.5])
+ ... % this is caculated from "base", no from actual title font
+}
+\endtt
+
The size of the current font can be changed by the command
"\thefontsize[<font-size>]" or can be rescaled by
"\thefontscale[<factor>]". These macros don't change math fonts sizes nor
@@ -290,6 +307,10 @@ If there are forward referenced objects then user have to run \TeX{} twice.
During each pass, the working "*.ref" file (with refereces data) is created
and this file is used (if it exists) at the begin of the document.
+You can create a reference to whatever else by commands
+"\label[<label>]\wlabel{<text>}". The connection between "<label>" and
+"<text>" is established. The "\ref[<label>]" will print "<text>".
+
\sec Lists
%%%%%%%%%%
@@ -501,7 +522,7 @@ instead "\localcolor". Example:
\begtt
\Red The text is red
-\hbox{\loacalcolor \Blue here is blue {\localcolor \Green and green}
+\hbox{\localcolor \Blue here is blue {\localcolor \Green and green}
restored blue \Brown and brown}
now the text is red.
\endtt
@@ -1023,7 +1044,7 @@ spaces and without extension) and the "<style>" is the part of the filename
"opmac-bib-<style>.tex" where the formatting of the references list is
defined. Possible styles are "simple" or "iso690". The behavior of
"opmac-bib.tex" and "opmac-bib-iso690.tex" is full documented in these files
-(after "\endpinput" command).
+(after "\endinput" command).
\medskip\noindent
{\bf Formatting of the references list} is controlled by the "\printb" macro.
@@ -1104,7 +1125,7 @@ You can change this behavior by following commands:
\begtt
\itvariables % variables typeset by text italics.
-\mitvariables % mariables typeset by math italics.
+\mitvariables % variables typeset by math italics.
\endtt
diff --git a/Master/texmf-dist/doc/cstex/opmac-u.pdf b/Master/texmf-dist/doc/cstex/opmac-u.pdf
index df1709d7c10..b1fb80155bd 100644
--- a/Master/texmf-dist/doc/cstex/opmac-u.pdf
+++ b/Master/texmf-dist/doc/cstex/opmac-u.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/cstex/opmac-u.tex b/Master/texmf-dist/doc/cstex/opmac-u.tex
index d005632afdd..87eb21a924f 100644
--- a/Master/texmf-dist/doc/cstex/opmac-u.tex
+++ b/Master/texmf-dist/doc/cstex/opmac-u.tex
@@ -152,19 +152,7 @@ Na místo "\typosize" a "\typoscale" je moŞno pouŞít
makra na změnu velikosti jen textových fontů
"\textfontsize[<velikost-fontu>]" a "\textfontscale[<faktor>]".
Tato makra nemění matematické fonty ani řádkování.
-
-Makra "\thefontsize[<velikost-fontu>]" nebo "\thefontscale[<faktor>]"
-změní velikost jen aktuálního fontu, nemění
-žádné jiné fonty a nemění řádkování.
-Tato makra používají interní fontový přepínač "\thefont". Je možné si jej
-\uv{vypůjčit} příkazem "\let" pro pozdější použití:
-
-\begtt
-\tenrm \thefontscale[700]\let\sevenrm=\thefont \tenrm
-\endtt
-%
-Díky přepínači "\tenrm" na konci ukázky sazba dále pokračuje neškálovaným
-fontem, ovšem škálovaný font máme uložen v přepínači "\sevenrm".
+Změní jen velikost jen aktuálního fontu, ostatní fonty zůstávají beze změny.
Všechna zde uvedená makra na změnu velikosti fontů jsou vybavena
inteligencĂ­: hledajĂ­ metriku, kterĂĄ mĂĄ svou designovanou velikost nejblĂ­Ĺže
@@ -336,7 +324,6 @@ pomocí plain\TeX{}ového makra "\topinsert" resp. "\midinsert". Například:
\hfil\table{rl}{...} % vytvoření tabulky
\medskip
\caption/t Závislost závislosti na počítačích na věku.
- \par
\endinsert
\endtt
@@ -372,6 +359,9 @@ Jestliže se v textu vyskytují dopředné reference (tj. odkazujeme na objekt,
který ještě není vytištěn) nebo text odkazuje na stránky ("\pgref"), je nutné
\TeX{}ovat dokument dvakrĂĄt.
+Pomocí "\label[<lejblík>]\wlabel[<text>]" se dá vytvořit kdekoli
+obecnĂ˝ cĂ­l <text>, na kterĂ˝ je moĹžnĂŠ odkazovat makry
+"\ref[<lejblĂ­k>]" nebo "\pgref[<lejblĂ­k>]".
\sec OdrĂĄĹžky
%%%%%%%%%%%%