summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/texilikechaps
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-01-16 23:51:46 +0000
committerKarl Berry <karl@freefriends.org>2010-01-16 23:51:46 +0000
commit23dac0f71abad2e72aa043ea3b59dc92a29cb749 (patch)
tree2c8756c058d4ae91d4a65c255045dd97aee4982d /Master/texmf-dist/tex/latex/texilikechaps
parent62afbf2498783f9ca3f415e2b8f9df2e22b1be43 (diff)
new latex package texilikechaps (16jan10)
git-svn-id: svn://tug.org/texlive/trunk@16752 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/texilikechaps')
-rw-r--r--Master/texmf-dist/tex/latex/texilikechaps/texilikechaps.sty133
1 files changed, 133 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/texilikechaps/texilikechaps.sty b/Master/texmf-dist/tex/latex/texilikechaps/texilikechaps.sty
new file mode 100644
index 00000000000..8449c2bd339
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/texilikechaps/texilikechaps.sty
@@ -0,0 +1,133 @@
+%%%%%%%%%%%%%%%%%%%
+% texilikechaps.sty
+%%%%%%%%%%%%%%%%%%%
+% texilikechaps.sty, June 13, 2008
+%
+% Released under LaTeX Project Public License v3.1 or above.
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is
+% Jose-Luis Rivera N.
+% jlrn77 at gmail punto com
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%
+% based on
+% jeep.sty, April 29, 1991
+% G. W. Stewart
+% Department of Computer Science
+% University of Maryland
+% College Park, MD 20784
+%
+% stewart at thales.umd.edu
+%
+% with ideas borrowed from secdot.sty, by Robin Fairbairns.
+%
+% Define the command \txichapter{<format>}. <format>
+% is the format to put in the chapter head.
+%
+% The command \txisection{<seclevel>}{<format>}
+% defines the <format> for the <seclevel>.
+%
+% The command \txichapterdelim{<code>} sets the
+% <code> as the delimiter between chapter number and
+% chapter/section name.
+% You may change the default \squad for .\space saying
+% \txichapterdelim{.\space}
+%
+% The rest should be self explanatory.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% This is experimental code. Bypass it.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%\def\@chapapp{Chapter}
+%\def\chapapp{\@chapapp}
+
+%\def\txichapter#1#2{
+% \def\@chaphead##1{#1}
+% \def\@schaphead##1{#2}
+%}
+
+%\def\@makechapterhead#1{ \vspace*{\chaptopsep} { \parindent 0pt \raggedright
+% \ifnum \c@secnumdepth >\m@ne \@chaphead{#1} \else \@schaphead{#1} \fi
+% \par \nobreak \vskip \chapaftersep } }
+
+%\def\@makeschapterhead#1{ \vspace*{\chaptopsep} { \parindent 0pt \raggedright
+% \@schaphead{#1}\par
+% \nobreak \vskip \chapaftersep } }
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Here comes the real stuff.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ProvidesPackage{texilikechaps}[2008/06/14 v1.0 Texinfo-like chapters and sections]
+
+\newcommand{\txisct@chapapp}{}
+
+\@ifundefined{@makechapterhead}{}{
+ \let\txisct@old@makechapterhead\@makechapterhead
+ \renewcommand{\@makechapterhead}[1]{%
+ \vspace*{\txisct@chaptopsep}%
+ {\parindent \z@ \raggedright
+ \normalfont
+ \interlinepenalty\@M
+ \txichapter \txisct@chapapp\space\thechapter\txichapterdelim\space #1
+ \par\nobreak
+ \vskip\txisct@chapaftersep
+ }}
+}
+\@ifundefined{@makeschapterhead}{}{
+ \let\txisct@old@makeschapterhead\@makeschapterhead
+ \renewcommand{\@makeschapterhead}[1]{%
+ \vspace*{\txisct@chaptopsep}%
+ {\parindent \z@ \raggedright
+ \normalfont
+ \interlinepenalty\@M
+ \txichapter #1
+ \par\nobreak
+ \vskip\txisct@chapaftersep
+ }}
+}
+\newcommand{\txichapter}[1][\normalfont\LARGE\bfseries]{#1}
+\newcommand{\txichapterdelim}[1][\quad]{#1}
+\newcommand{\restorechapapp}{\let\txisct@chapapp\@chapapp}
+
+% \chaptopsep is the space between the top of the text page and the
+% chapter head. \chapaftersep is the space between the chapter
+% head and the text.
+
+\newlength{\txisct@chaptopsep}
+\setlength{\txisct@chaptopsep}{.5in}
+\newlength{\txisct@chapaftersep}
+\setlength{\txisct@chapaftersep}{.3in}
+
+% Default chapter format.
+
+\newcommand{\chapterheadfmt}[1][\LARGE\bfseries]{#1}
+
+% The following code has been rendered obsolete by the sectsty package
+% Here it goes, anyway.
+% As \section and \subsection commands typeset the titles rather large
+% in standard classes, we make them smaller.
+% We reduce the above and under spaces as well.
+
+\newcommand{\txisection}[2]{%
+ \expandafter\renewcommand\csname #1\endcsname{\@startsection{#1}{1}{\z@}%
+ {-1.5ex\@plus -.2ex \@minus -.2ex}%
+ {1.5ex \@plus .2ex}%
+ {#2}}
+}
+
+\txisection{section}{\normalfont\large\bfseries}
+\txisection{subsection}{\normalfont\normalsize\bfseries}
+\txisection{subsubsection}{\normalfont\normalsize\bfseries}
+
+% And that's all, folks!
+
+\endinput