From e7d5374b0465db02909b5cad6d5205808eb7cae1 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 11 Sep 2015 22:47:24 +0000 Subject: nevelok (11sep15) git-svn-id: svn://tug.org/texlive/trunk@38353 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/nevelok/README.md | 9 + Master/texmf-dist/doc/latex/nevelok/nevelok.pdf | Bin 0 -> 188123 bytes Master/texmf-dist/source/latex/nevelok/nevelok.dtx | 273 +++++++++++++++++++++ Master/texmf-dist/source/latex/nevelok/nevelok.ins | 54 ++++ Master/texmf-dist/tex/latex/nevelok/nevelok.sty | 126 ++++++++++ Master/tlpkg/bin/tlpkg-ctan-check | 2 +- Master/tlpkg/tlpsrc/collection-langeuropean.tlpsrc | 1 + Master/tlpkg/tlpsrc/nevelok.tlpsrc | 0 8 files changed, 464 insertions(+), 1 deletion(-) create mode 100644 Master/texmf-dist/doc/latex/nevelok/README.md create mode 100644 Master/texmf-dist/doc/latex/nevelok/nevelok.pdf create mode 100644 Master/texmf-dist/source/latex/nevelok/nevelok.dtx create mode 100644 Master/texmf-dist/source/latex/nevelok/nevelok.ins create mode 100644 Master/texmf-dist/tex/latex/nevelok/nevelok.sty create mode 100644 Master/tlpkg/tlpsrc/nevelok.tlpsrc diff --git a/Master/texmf-dist/doc/latex/nevelok/README.md b/Master/texmf-dist/doc/latex/nevelok/README.md new file mode 100644 index 00000000000..47eef52fee8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/nevelok/README.md @@ -0,0 +1,9 @@ +---------------------------------------------------------------- +nevelok --- LaTeX package for automatic definite articles for Hungarian +Author: Zalan Bodo +E-mail: zbodo@cs.ubbcluj.ro +License: Released under the LaTeX Project Public License v1.3c or later +See: http://www.latex-project.org/lppl.txt +---------------------------------------------------------------- + +LaTeX package for automatic definite articles for Hungarian diff --git a/Master/texmf-dist/doc/latex/nevelok/nevelok.pdf b/Master/texmf-dist/doc/latex/nevelok/nevelok.pdf new file mode 100644 index 00000000000..554b5da89ad Binary files /dev/null and b/Master/texmf-dist/doc/latex/nevelok/nevelok.pdf differ diff --git a/Master/texmf-dist/source/latex/nevelok/nevelok.dtx b/Master/texmf-dist/source/latex/nevelok/nevelok.dtx new file mode 100644 index 00000000000..5f496af8af5 --- /dev/null +++ b/Master/texmf-dist/source/latex/nevelok/nevelok.dtx @@ -0,0 +1,273 @@ +% \iffalse meta-comment +%<*internal> +\iffalse +% +%<*readme> +---------------------------------------------------------------- +nevelok --- LaTeX package for automatic definite articles for Hungarian +Author: Zalan Bodo +E-mail: zbodo@cs.ubbcluj.ro +License: Released under the LaTeX Project Public License v1.3c or later +See: http://www.latex-project.org/lppl.txt +---------------------------------------------------------------- + +LaTeX package for automatic definite articles for Hungarian +% +%<*internal> +\fi +\def\nameofplainTeX{plain} +\ifx\fmtname\nameofplainTeX\else + \expandafter\begingroup +\fi +% +%<*install> +\input docstrip.tex +\keepsilent +\askforoverwritefalse +\preamble +---------------------------------------------------------------- +nevelok --- LaTeX package for automatic definite articles for Hungarian +Author: Zalan Bodo +E-mail: zbodo@cs.ubbcluj.ro +License: Released under the LaTeX Project Public License v1.3c or later +See: http://www.latex-project.org/lppl.txt +---------------------------------------------------------------- + +\endpreamble +\postamble + +Copyright (C) 2015 by Zalan Bodo + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License (LPPL), either +version 1.3c of this license or (at your option) any later +version. The latest version of this license is in the file: + +http://www.latex-project.org/lppl.txt + +This work is "maintained" (as per LPPL maintenance status) by +Zalan Bodo. + +This work consists of the file nevelok.dtx and a Makefile. +Running make generates the derived files README.txt, nevelok.pdf and nevelok.sty. +Running make inst installs the files in the user's TeX tree. +Running make install installs the files in the local TeX tree. + +\endpostamble + +\usedir{tex/latex/nevelok} +\generate{ + \file{\jobname.sty}{\from{\jobname.dtx}{package}} +} +% +%\endbatchfile +%<*internal> +\usedir{source/latex/nevelok} +\generate{ + \file{\jobname.ins}{\from{\jobname.dtx}{install}} +} +\nopreamble\nopostamble +\usedir{doc/latex/nevelok} +\generate{ + \file{README.txt}{\from{\jobname.dtx}{readme}} +} +\ifx\fmtname\nameofplainTeX + \expandafter\endbatchfile +\else + \expandafter\endgroup +\fi +% +% \fi +% +% \iffalse +%<*driver> +\ProvidesFile{nevelok.dtx} +% +%\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%\ProvidesPackage{nevelok} +%<*package> + [2015/09/10 v1.00 LaTeX package for automatic definite articles for Hungarian] +% +%\RequirePackage{xstring} +%<*driver> +\documentclass{ltxdoc} +\usepackage[a4paper,margin=25mm,left=50mm,nohead]{geometry} +\usepackage[numbered]{hypdoc} +\usepackage{\jobname} +%\EnableCrossrefs +%\CodelineIndex +\RecordChanges +\newtheorem{example}{Example}[section] +\begin{document} + \sloppy + \DocInput{\jobname.dtx} +\end{document} +% +% \fi +% +% \GetFileInfo{\jobname.dtx} +% \DoNotIndex{\newcommand,\newenvironment} +% +%\title{\textsf{nevelok} --- \LaTeX{} package for automatic definite articles for Hungarian\thanks{This file +% describes version \fileversion, last revised \filedate.} +%} +%\author{Zal\'an Bod\'o\thanks{E-mail: zbodo@cs.ubbcluj.ro}} +%\date{Released \filedate} +% +%\maketitle +% +%\changes{v1.00}{2015/09/10}{First public release} +% +% \begin{abstract} +% \LaTeX{} package for automatic definite articles for Hungarian. +% \end{abstract} +% +%\section{Introduction} +% +% In Hungarian, the definite articles ``a'' and ``az'' are determined by the +% pronounciation of the subsequent word. If the first phoneme of the pronounced word +% is a vowel, then the article is ``az'', otherwise ``az'' must be used. +% The simple commands help the \LaTeX{} user to automatically adjust the +% definite article according to chapter, equation, page, etc. number. +% +% \section{Usage} +% +% \DescribeMacro{\aaz} +% \DescribeMacro{\Aaz} +% The \textsf{nevelok} package provides the following commands: \cmd{\aaz}\marg{reference} +% and \cmd{\Aaz}\marg{reference}, +% where {\em reference} is a reference to a labeled \LaTeX{} object (section, equation, figure, etc.). +% The difference stands in letter casing: the \cmd{\aaz} is the lower case command +% producing ``a'' and ``az'', while \cmd{\Aaz} is the upper case version, producing +% ``A'' and ``Az'' for the beginning of a sentence. +% The commands also work if the reference is put in round parantheses. +% +% \textsf{Note}: The commands work only with the simple, built-in references +% \cmd{\ref} and \cmd{\pageref}. It does not work with the popular \cmd{\eqref} +% command of \textsf{amsmath} package, but the same effect can be achieved by enclosing the +% reference in round parantheses. +% +% \textsf{Requirements}: The package requires/uses the \textsf{xstring} package. +% +%\StopEventually{^^A +% \PrintChanges +%} +% +% \section{Implementation} +% +% \begin{macro}{\aaz} +% The \cmd{\aaz} command outputs ``a'' or ``az'', depending on the argument. +% To be used inside the sentence. +% \begin{macrocode} +%% +\newcommand{\aaz}[1]{% + \z@aaz{#1}{a}{az}{(}{)}% +} +%% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\Aaz} +% The \cmd{\Aaz} command outputs ``A'' or ``Az'', depending on the argument. +% To be used when starting a new sentence. +% \begin{macrocode} +%% +\newcommand{\Aaz}[1]{% + \z@aaz{#1}{A}{Az}{(}{)}% +} +%% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\z@aaz} +% The main command of the package, used by the two provided commands: +% \cmd{\z@aaz}\marg{reference}\marg{art1}\marg{art2}\marg{sym1}\marg{sym2}. +% The {\em art1} and {\em art2} parameters stand for the definite articles used in case of +% consonants and vowels, respectively. Parameters {\em art1} and {\em art2} are used to +% handle cases when the reference is put between some symbols, e.g. ``('' and ``)''. +% The $4$th parameter is sought for at the beginning of the reference, and if found, +% the substring between the $4$th and $5$th parameter values is analyzed, instead of the whole +% reference. +% \begin{macrocode} +%% +\newcommand{\z@aaz}[5]{% + \def\param{#1}% the first (reference) parameter + \def\kezd{}\relax% the symbols to be put before the output + \def\veg{}\relax% the symbols to be put after the output + \IfBeginWith{\param}{#4}{% if starts with round parantheses, + % we remove it from both sides; + % the parameter changes + \StrPosition{\param}{#5}[\vegz]% + \newcount\ind% + \ind = \vegz% + \advance \ind by -1% + \StrMid{\param}{2}{\ind}[\param]% + \def\kezd{#4}% + \def\veg{#5}% + }{}\relax% + \IfBeginWith{\param}{1}{% if the reference starts with 1, + % special care is required + \StrLen{\param}[\hossz]% + \newcount\ind% + \newcount\vege% + \ind = \hossz% + \vege = 0% + \loop% loops while it does not find a digit at the end + % (in \ref-s, strangely, an \hbox {} appears at the end; + % this loop was actually written to remove these) + \StrChar{\param}{\ind}[\kar]% + \IfSubStr{1234567890}{\kar}{\vege=1}{}\relax% + \ifnum \vege = 0% + \advance \ind by -1% + \repeat% + \StrLeft{\param}{\ind}[\paramuj]% \paramuj will contain the + % ``cleaned'' parameter + \StrPosition[1]{\paramuj}{.}[\elsopontpozicioja]% + \StrLen{\paramuj}[\hossz]% + \newcount\eppme% position of the first dot minus 1 + \eppme = \elsopontpozicioja% + \advance \eppme by -1% + \ifnum \elsopontpozicioja = 0% + \StrLeft{\paramuj}{\hossz}[\prefix]% + \else% + \StrLeft{\paramuj}{\eppme}[\prefix]% + \fi% + \StrLen{\prefix}[\elsohossz]% + \ifnum \elsohossz = 1% 1 + #3% + \else\ifnum \elsohossz = 2% 10 + #2% + \else\ifnum \elsohossz = 3% 100 + #2% + \else\ifnum \elsohossz = 4% 1000 + #3% + \fi\fi\fi\fi% + }{% + \StrChar{\param}{1}[\kar]% + \newcount\az% + \az = 0% + \IfSubStr{2346789}{\kar}{% digits that require ``a''; + % this is redundant, but was kept for some reasons + \az = 0% + }{% + \IfSubStr{5AEIOUFLMNRSaeiouflmnrs}{\kar}{% digits and letters + % that require ``az'' + \az = 1% + }{% + \az = 0% + }\relax% + }\relax% + \ifnum \az = 1% + #3% + \else% + #2% + \fi% + }% + \ \kezd\param\veg% +} +%% +% \end{macrocode} +% \end{macro} +% +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/nevelok/nevelok.ins b/Master/texmf-dist/source/latex/nevelok/nevelok.ins new file mode 100644 index 00000000000..6b692d53fc4 --- /dev/null +++ b/Master/texmf-dist/source/latex/nevelok/nevelok.ins @@ -0,0 +1,54 @@ +%% +%% This is file `nevelok.ins', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% nevelok.dtx (with options: `install') +%% ---------------------------------------------------------------- +%% nevelok --- LaTeX package for automatic definite articles for Hungarian +%% Author: Zalan Bodo +%% E-mail: zbodo@cs.ubbcluj.ro +%% License: Released under the LaTeX Project Public License v1.3c or later +%% See: http://www.latex-project.org/lppl.txt +%% ---------------------------------------------------------------- +%% +\input docstrip.tex +\keepsilent +\askforoverwritefalse +\preamble +---------------------------------------------------------------- +nevelok --- LaTeX package for automatic definite articles for Hungarian +Author: Zalan Bodo +E-mail: zbodo@cs.ubbcluj.ro +License: Released under the LaTeX Project Public License v1.3c or later +See: http://www.latex-project.org/lppl.txt +---------------------------------------------------------------- + +\endpreamble +\postamble + +Copyright (C) 2015 by Zalan Bodo + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License (LPPL), either +version 1.3c of this license or (at your option) any later +version. The latest version of this license is in the file: + +http://www.latex-project.org/lppl.txt + +This work is "maintained" (as per LPPL maintenance status) by +Zalan Bodo. + +This work consists of the file nevelok.dtx and a Makefile. +Running make generates the derived files README.txt, nevelok.pdf and nevelok.sty. +Running make inst installs the files in the user's TeX tree. +Running make install installs the files in the local TeX tree. + +\endpostamble + +\usedir{tex/latex/nevelok} +\generate{ + \file{\jobname.sty}{\from{\jobname.dtx}{package}} +} +\endbatchfile diff --git a/Master/texmf-dist/tex/latex/nevelok/nevelok.sty b/Master/texmf-dist/tex/latex/nevelok/nevelok.sty new file mode 100644 index 00000000000..e19f9f6acd2 --- /dev/null +++ b/Master/texmf-dist/tex/latex/nevelok/nevelok.sty @@ -0,0 +1,126 @@ +%% +%% This is file `nevelok.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% nevelok.dtx (with options: `package') +%% ---------------------------------------------------------------- +%% nevelok --- LaTeX package for automatic definite articles for Hungarian +%% Author: Zalan Bodo +%% E-mail: zbodo@cs.ubbcluj.ro +%% License: Released under the LaTeX Project Public License v1.3c or later +%% See: http://www.latex-project.org/lppl.txt +%% ---------------------------------------------------------------- +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{nevelok} + [2015/09/10 v1.00 LaTeX package for automatic definite articles for Hungarian] +\RequirePackage{xstring} +%% +\newcommand{\aaz}[1]{% + \z@aaz{#1}{a}{az}{(}{)}% +} +%% +%% +\newcommand{\Aaz}[1]{% + \z@aaz{#1}{A}{Az}{(}{)}% +} +%% +%% +\newcommand{\z@aaz}[5]{% + \def\param{#1}% the first (reference) parameter + \def\kezd{}\relax% the symbols to be put before the output + \def\veg{}\relax% the symbols to be put after the output + \IfBeginWith{\param}{#4}{% if starts with round parantheses, + % we remove it from both sides; + % the parameter changes + \StrPosition{\param}{#5}[\vegz]% + \newcount\ind% + \ind = \vegz% + \advance \ind by -1% + \StrMid{\param}{2}{\ind}[\param]% + \def\kezd{#4}% + \def\veg{#5}% + }{}\relax% + \IfBeginWith{\param}{1}{% if the reference starts with 1, + % special care is required + \StrLen{\param}[\hossz]% + \newcount\ind% + \newcount\vege% + \ind = \hossz% + \vege = 0% + \loop% loops while it does not find a digit at the end + % (in \ref-s, strangely, an \hbox {} appears at the end; + % this loop was actually written to remove these) + \StrChar{\param}{\ind}[\kar]% + \IfSubStr{1234567890}{\kar}{\vege=1}{}\relax% + \ifnum \vege = 0% + \advance \ind by -1% + \repeat% + \StrLeft{\param}{\ind}[\paramuj]% \paramuj will contain the + % ``cleaned'' parameter + \StrPosition[1]{\paramuj}{.}[\elsopontpozicioja]% + \StrLen{\paramuj}[\hossz]% + \newcount\eppme% position of the first dot minus 1 + \eppme = \elsopontpozicioja% + \advance \eppme by -1% + \ifnum \elsopontpozicioja = 0% + \StrLeft{\paramuj}{\hossz}[\prefix]% + \else% + \StrLeft{\paramuj}{\eppme}[\prefix]% + \fi% + \StrLen{\prefix}[\elsohossz]% + \ifnum \elsohossz = 1% 1 + #3% + \else\ifnum \elsohossz = 2% 10 + #2% + \else\ifnum \elsohossz = 3% 100 + #2% + \else\ifnum \elsohossz = 4% 1000 + #3% + \fi\fi\fi\fi% + }{% + \StrChar{\param}{1}[\kar]% + \newcount\az% + \az = 0% + \IfSubStr{2346789}{\kar}{% digits that require ``a''; + % this is redundant, but was kept for some reasons + \az = 0% + }{% + \IfSubStr{5AEIOUFLMNRSaeiouflmnrs}{\kar}{% digits and letters + % that require ``az'' + \az = 1% + }{% + \az = 0% + }\relax% + }\relax% + \ifnum \az = 1% + #3% + \else% + #2% + \fi% + }% + \ \kezd\param\veg% +} +%% +%% +%% Copyright (C) 2015 by Zalan Bodo +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License (LPPL), either +%% version 1.3c of this license or (at your option) any later +%% version. The latest version of this license is in the file: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% This work is "maintained" (as per LPPL maintenance status) by +%% Zalan Bodo. +%% +%% This work consists of the file nevelok.dtx and a Makefile. +%% Running make generates the derived files README.txt, nevelok.pdf and nevelok.sty. +%% Running make inst installs the files in the user's TeX tree. +%% Running make install installs the files in the local TeX tree. +%% +%% +%% End of file `nevelok.sty'. diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 807cc0a0be8..cbb9cf1725f 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -390,7 +390,7 @@ my @TLP_working = qw( mychemistry mycv mylatexformat nag nameauth namespc nanumtype1 nar natbib natded nath nature navigator ncclatex ncctools - nddiss ndsu-thesis needspace nestquot neuralnetwork + nddiss ndsu-thesis needspace nestquot neuralnetwork nevelok newcommand newenviron newfile newlfm newpx newsletr newspaper newtx newtxsf newtxtt newunicodechar newvbtm newverbs nextpage diff --git a/Master/tlpkg/tlpsrc/collection-langeuropean.tlpsrc b/Master/tlpkg/tlpsrc/collection-langeuropean.tlpsrc index 22c1dba98ac..38f20e215d4 100644 --- a/Master/tlpkg/tlpsrc/collection-langeuropean.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-langeuropean.tlpsrc @@ -62,5 +62,6 @@ depend lshort-dutch depend lshort-finnish depend lshort-slovenian depend lshort-turkish +depend nevelok depend swebib depend turkmen diff --git a/Master/tlpkg/tlpsrc/nevelok.tlpsrc b/Master/tlpkg/tlpsrc/nevelok.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d -- cgit v1.2.3