summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/technica/txntitle.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/technica/txntitle.sty')
-rw-r--r--macros/latex/contrib/technica/txntitle.sty61
1 files changed, 61 insertions, 0 deletions
diff --git a/macros/latex/contrib/technica/txntitle.sty b/macros/latex/contrib/technica/txntitle.sty
new file mode 100644
index 0000000000..c5bb719e84
--- /dev/null
+++ b/macros/latex/contrib/technica/txntitle.sty
@@ -0,0 +1,61 @@
+\NeedsTeXFormat{LaTeX2e}[1994/11/04]
+\ProvidesPackage{txntitle} [2006/10/15 Technica]
+%
+% The code in this package comes from parts of version 2.X of the
+% package "titlesec" by Javier Bezos. The current version of "titlesec"
+% is available on CTAN at tex-archive/macros/latex/contrib/titlesec
+%
+% The package is NOT a replacement for "titlesec".
+%
+% Copyright Gianfranco Boggio-Togna 2006
+%
+% This program may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version~1.2
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.2 or later is part of all distributions of LaTeX
+% version 1999/12/01 or later.
+%
+% This program consists of the file txntitle.sty
+%
+% This macro is a straight copy of |\ttl@setmarks| in \texttt{ttlps.def}
+% with just one difference:\\
+% |\protect\@namedef{#2title}{\@nameuse{#2title}}|\\
+% replaces\\
+% |\protect\@namedef{#2title}{}|
+\def \TXNt@ttl@setmarks #1#2{%
+ \expandafter\def\csname#1mark\endcsname##1{%
+ \expandafter\gdef\csname#1title\endcsname{##1}%
+ \ttl@setifthe{#1}%
+ \def\ttl@marks{%
+ \protect\@namedef{#1title}{##1}%
+ \protect\@namedef{#2title}{\@nameuse{#2title}}%
+ \protect\@namedef{the#1}{\@nameuse{the#1}}%
+ \protect\@namedef{the#2}{}%
+ \protect\@namedef{ifthe#1}{\@nameuse{ifthe#1}}%
+ \protect\@namedef{ifthe#2}{\protect\@secondoftwo}%
+ \ttl@moremarks}%
+ \ttl@markboth{#1}}%
+ \expandafter\def\csname#2mark\endcsname##1{%
+ \expandafter\gdef\csname#2title\endcsname{##1}%
+ \ttl@setifthe{#2}%
+ \def\ttl@marks{%
+ \protect\@namedef{#1title}{\@nameuse{#1title}}%
+ \protect\@namedef{#2title}{##1}%
+ \protect\@namedef{the#1}{\@nameuse{the#1}}%
+ \protect\@namedef{the#2}{\@nameuse{the#2}}%
+ \protect\@namedef{ifthe#1}{\@nameuse{ifthe#1}}%
+ \protect\@namedef{ifthe#2}{\@nameuse{ifthe#2}}%
+ \ttl@moremarks}%
+ \ttl@markboth{#1}}%
+}
+\def \TXNt@set@numerus@marks {%
+ \protected@xdef\ttl@prevmarks{\ttl@marks}%
+ \csname \TXN@section@name mark\expandafter\endcsname
+ \expandafter {\TXN@section@headline}%
+ \gdef\ttl@prevmarks{\ttl@marks}%
+ \csname \TXN@section@name mark\expandafter\endcsname
+ \expandafter {\TXN@section@headline}%
+}
+