summaryrefslogtreecommitdiff
path: root/info/lshort/slovak/slshorte.sty
blob: 50ab6782d2616d47b6e16ed53928cd3ff610e5e6 (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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Contents: Special Commands for the LShort2e Introduction
% $Id: lshort2e.sty,v 1.5 1998/09/29 08:05:50 oetiker Exp oetiker $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% By Tobias Oetiker
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\errorcontextlines=10

%save pageref an label
\let\lsspageref\pageref
\ProvidesPackage{slshorte}
\RequirePackage{verbatim}
\RequirePackage{fancyhea}
\RequirePackage{calc}
\RequirePackage{amsmath}
% 
% Lets have some nice headings
%
\pagestyle{fancyplain}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection{} #1}}
\lhead[\fancyplain{}{\bfseries\thepage}]
    {\fancyplain{}{\bfseries\rightmark}}
\rhead[\fancyplain{}{\bfseries\leftmark}]
    {\fancyplain{}{\bfseries\thepage}}
\cfoot[]{}
\addtolength{\headheight}{1.6pt}
%
%
% Earlier paragraphs were separated by some space
%
%\setlength{\parindent}{0pt}
%\setlength{\parskip}{1.5ex plus 0.7ex minus 0.6ex}

\newcommand{\manual}{\emph{\LaTeX{} Manual}~\cite{manual}} 
\newcommand{\companion}{\emph{The \LaTeX{} Companion}~\cite{companion}} 
\newcommand{\guide}{\emph{Local Guide}~\cite{local}}
\newcommand{\contrib}[3]{#1\quad\texttt{<#2>}{\small\\\quad\textit{#3}}\\[1ex]}
%
% Some commands for helping with INDEX creation
%
\newcommand{\bs}{\symbol{'134}}%Print backslash
%\newcommand{\bs}{\ensuremath{\mathtt{\backslash}}}%Print backslash
% Index entry for a command (\cih for hidden command index
\newcommand{\cih}[1]{%
\index{príkazy!#1@\texttt{\bs#1}}% commands
\index{#1@\texttt{\hspace*{-1.2ex}\bs #1}}}
\newcommand{\ci}[1]{\cih{#1}\texttt{\bs#1}}
%Package
\newcommand{\pai}[1]{%
\index{balíky!#1@\textsf{#1}}% packages
\index{#1@\textsf{#1}}%
\textsf{#1}}
% Index entry for an environment
\newcommand{\ei}[1]{%
\index{prostredia!\texttt{#1}}% enviroments
\index{#1@\texttt{#1}}%
\texttt{#1}}
% Indexentry for a word (Word inserted into the text)
\newcommand{\wi}[1]{\index{#1}#1}
%Matematicky rezim - nove, vlozene prekladatelom
\newcommand{\mind}[1]{%
\index{matematika!#1@\textsf{#1}}
\index{#1@\textsf{#1}}%
#1}
\newcommand{\mindh}[1]{% len v indexe
\index{matematika!#1}%@\textsf{#1}}
\index{#1}%@\textsf{#1}}%
}

%
% Typesetting Commands
%
\newenvironment{lscommand}%
    {\nopagebreak\par\small\addvspace{3.2ex plus 0.8ex minus 0.2ex}%
     \vskip -\parskip
     \noindent%
     \begin{tabular}{|l|}\hline\rule{0pt}{1em}\ignorespaces}%
    {\\\hline\end{tabular}\par\nopagebreak\addvspace{3.2ex plus 0.8ex
        minus 0.2ex}%
     \vskip -\parskip}
%
% Type setting Code Fragments
%
\newenvironment{code}{\begin{quote}}{\end{quote}}
%
% Intro Environment
\newenvironment{intro}{\sffamily}{\vspace*{2ex minus 1.5ex}}

%
%
% Symbol Entry for Math Symbol Tables
%
\newcommand{\X}[1]{$#1$&\texttt{\string#1}\hspace*{1ex}}
% normal text .... 
\newcommand{\SC}[1]{#1&\texttt{\string#1}\hspace*{1ex}}
% for accents in text mode
\newcommand{\A}[1]{#1&\texttt{\string#1}\hspace*{1ex}}
\newcommand{\B}[2]{#1#2&\texttt{\string#1{} #2}\hspace*{1ex}}

\newcommand{\W}[2]{$#1{#2}$&
  \texttt{\string#1}\texttt{\string{\string#2\string}}\hspace*{1ex}}
\newcommand{\Y}[1]{$\big#1$ &\texttt{\string#1}}  %
% Mathsymbol Table
\newsavebox{\symbbox}
\newenvironment{symbols}[1]%
{\par\vspace*{2ex}
\renewcommand{\arraystretch}{1.1}
\begin{lrbox}{\symbbox}
\hspace*{0ex}\begin{tabular}{@{}#1@{}}}%
{\end{tabular}\end{lrbox}\makebox[\textwidth]{\usebox{\symbbox}}\par\medskip}
%
% Special Prep for AMS Symbols Printout
% Should work if AMS is not available
%

% we have no PS versions of the rsfs fonts ... so this is a nogo for pdf
\ifx\pdfoutput\undefined % We're not running pdftex
\IfFileExists{mathrsfs.sty}
  {\RequirePackage{mathrsfs}\let\MathRSFS\mathscr\let\mathscr\relax}{}
\fi
\IfFileExists{amssymb.sty}
  {\let\noAMS\relax \RequirePackage{amssymb}}
  {\def\noAMS{\endinput}\RequirePackage{latexsym}}
\IfFileExists{eucal.sty}
  {\RequirePackage[mathscr]{eucal}}
  {\IfFileExists{euscript.sty}
  {\RequirePackage{euscript}}{}}
%\IfFileExists{eufrak.sty}
%  {\RequirePackage{eufrak}}{}
\IfFileExists{amsbsy.sty}
  {\RequirePackage{amsbsy}}{}


%
% Print |--| to show a distance
%
\newcommand{\demowidth}[1]{\rule{0.3pt}{1.3ex}\rule{#1}{0.3pt}\rule{0.3pt}{1.3ex}}
%
%
% --- example ----
% This is an environment to set LaTeX examples.
% On the left side the source text and on the
% right side the typeset text.
%
% \begin{example}
% \Large This is Large
% \end{example}
%
% This Part is stolen from the verbaim.sty by FMi
% 
\newwrite\example@out
\newcounter{exacnt}
\setcounter{exacnt}{1}
\newlength{\savefboxrule}
\newlength{\savefboxsep}
\newlength{\outdent}
\setlength{\outdent}{2cm}
\addtolength{\headwidth}{\outdent}
\newenvironment{example}%
{\begingroup% Lets Keep the Changes Local
  \@bsphack
  \immediate\openout \example@out \jobname.exa
  \let\do\@makeother\dospecials\catcode`\^^M\active
  \def\verbatim@processline{%
    \immediate\write\example@out{\the\verbatim@line}}%
  \verbatim@start}%
{\immediate\closeout\example@out\@esphack\endgroup%
                                %
                                % And here comes my part. :-
                                %   
  \stepcounter{exacnt}%
  \setlength{\parindent}{0pt}%
  \par\addvspace{3.0ex plus 0.8ex minus 0.5ex}\vskip -\parskip
%  Page \lsspageref{exa:\theexacnt}
\expandafter\ifx\csname r@exa\theexacnt\endcsname\relax\else
\ifx\pdfoutput\undefined % We're not running pdftex
  \ifodd\lsspageref{exa\theexacnt}\hspace*{0pt}\else\hspace*{-\outdent}\fi%
\else
% HyPsd@pageref internal hyperref command v6.69c
  \ifodd\HyPsd@pageref{exa\theexacnt}\hspace*{0pt}\else\hspace*{-\outdent}\fi%
\fi
\fi
\makebox[\textwidth][l]{%
%\raisebox{-\height}[0pt][\totalheight]{%
  \begin{minipage}[c]{0.5\outdent+0.46\textwidth-3mm}%
    \small\verbatiminput{\jobname.exa}
  \end{minipage}%
                                %}%
  \hspace{5mm}%
  \setlength{\savefboxrule}{\fboxrule}%
  \setlength{\fboxrule}{0.1pt}%
  \setlength{\savefboxsep}{\fboxsep}%
  \setlength{\fboxsep}{3mm}%
                                %  \raisebox{-\height}[0pt][\totalheight]{%
  \fbox{%
    \begin{minipage}{0.5\outdent+0.54\textwidth-3.5mm-2\fboxrule-2\fboxsep}%
      \setlength{\fboxrule}{\savefboxrule}%
      \setlength{\fboxsep}{\savefboxsep}%
      \setlength{\fboxrule}{0.5pt}%
      \setlength{\parskip}{1ex plus 0.4ex minus 0.2ex}%
      \begin{trivlist}\item\small\input{\jobname.exa}
      \end{trivlist}
    \end{minipage}
    }%
%  }%
}\label{exa\theexacnt}%
\par\addvspace{3ex plus 0.8ex minus 0.5ex}\vskip -\parskip
}

\newenvironment{lined}[1]%
 {\begin{center}\begin{minipage}{#1}\hrule\medskip}
 {\vspace{-1ex}\hrule \end{minipage}\end{center}}
% I want no headers on pages created by clearpage

\renewcommand{\cleardoublepage}
    {\clearpage\if@twoside \ifodd\c@page\else
    \hbox{}\thispagestyle{empty}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}