summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/eledform/eledform.sty
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2012-10-08 09:33:26 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2012-10-08 09:33:26 +0000
commitf69c8d8dfd2e817ad0b0362281142de38fa7ce1f (patch)
treef1204c92f55cbbfb9920d28792dafaef59ca4900 /Master/texmf-dist/tex/latex/eledform/eledform.sty
parentc46b4f889a135737e16f618372d51338c82c6910 (diff)
new latex package: eledform
git-svn-id: svn://tug.org/texlive/trunk@27922 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/eledform/eledform.sty')
-rw-r--r--Master/texmf-dist/tex/latex/eledform/eledform.sty79
1 files changed, 79 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/eledform/eledform.sty b/Master/texmf-dist/tex/latex/eledform/eledform.sty
new file mode 100644
index 00000000000..1af987ca997
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/eledform/eledform.sty
@@ -0,0 +1,79 @@
+%%
+%% This is file `eledform.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% eledform.dtx (with options: `package')
+%% Copyright (C) 2012 by Maïeul Rouquette
+%%
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 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.3 or later is part of all distributions of
+%% LaTeX version 2003/06/01 or later.
+%%
+%% This work has the LPPL maintenance status "maintained".
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{eledform}[2012/10/01 v1.0 formalism for eledmac]
+\RequirePackage{eledmac}
+\def\manuscripts@{}
+\newcommand{\manuscript}[1]{%
+ \renewcommand{\do}[1]{\listgadd{\manuscripts@}{##1}}%
+ \docsvlist{#1}%
+}
+\newcommandx*{\var}[5][1,5,usedefault]{%
+ \edtext{#2}{%
+ \ifstrempty{#1}{}{\lemma{#1}}%
+ \varnote@{%
+ \ifstrempty{#3}{}%
+ {\del@{#3}%
+ \ifstrempty{#4}%
+ {}%
+ {\varseparator@}%
+ }%
+ \var@{#4}%
+ }%
+ #5%
+ }%
+}
+\newcommand{\print@manuscript}[1]{%
+ \ifinlist{#1}{\manuscripts@}%
+ {#1}%
+ {\eledmac@warning{Unknew man. #1, p.\the\page@num ; l.\the\line@num}\underline{unknew man. #1}}%
+ }
+\newcommand{\del@}[1]{%
+ \renewcommand{\do}[1]{%
+ \print@manuscript{##1}%
+ }%
+ \docsvlist{#1}\manvarseparator@\omittext@%
+}
+\newcommand{\var@}[1]{%
+ \newif\iffirst%
+ \firsttrue%
+ \renewcommand{\do}[1]{\iffirst\firstfalse\else\varseparator@\fi{\var@@##1}}%
+ \docsvlist{#1}%
+ }
+\newcommand{\var@@}[2]{%
+ \renewcommand{\do}[1]{%
+ \print@manuscript{##1}%
+ }%
+ \docsvlist{#1}\manvarseparator@#2%
+ }
+\let\varnote@\Afootnote
+\newcommand{\varseries}[1]{\letcs{\varnote@}{#1footnote}}
+\newcommand{\new@eledform@custom}[2]{%
+ \csgdef{#1@}{#2}%
+ \expandafter\newcommand\csname#1\endcsname[1]{\csgdef{#1@}{##1}}%
+}
+\new@eledform@custom{omittext}{\emph{omit}}
+\new@eledform@custom{manvarseparator}{~}
+\new@eledform@custom{varseparator}{\space}
+\endinput
+%%
+%% End of file `eledform.sty'.