diff options
author | Karl Berry <karl@freefriends.org> | 2010-12-30 23:46:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-12-30 23:46:34 +0000 |
commit | 2df82144ac9bdab9f36ba436434b2e8788bb6dd3 (patch) | |
tree | e9c974bc6a0c6e0b539acf29680fbf59d0ee3af5 /Master | |
parent | 36afe9e9ca936d29452643e766c1837e209e1676 (diff) |
new latex package spanglish (28dec10)
git-svn-id: svn://tug.org/texlive/trunk@20889 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/spanglish/README | 26 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/spanglish/spanglish.ldf | 373 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/spanglish/spanglish.sty | 66 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkg-ctan-check | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc | 1 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/spanglish.tlpsrc | 0 |
6 files changed, 467 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/spanglish/README b/Master/texmf-dist/doc/latex/spanglish/README new file mode 100644 index 00000000000..2acfae40bc4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/spanglish/README @@ -0,0 +1,26 @@ + +The \textsf{Spanglish} ``dialect'' is in fact a compromise between the use of the +Spanish language in writing and the default \LaTeX\ layout, +designed by and for US-Americans. +You may see it as a form of Spanish with a lot of English code switching +---or viceversa. +There are no mathematical features enabled, and there is +(probably less than) minimal Spanish language support for text, +activating Spanish hyphenation, captions, date, frenchspacing, +indentfirst, symbolic footnotes, uppercase roman numerals, +and a few shorthands. +All other typographic decisions are left to other macro packages +according to user's taste (or lack thereof). + +There is a conscious effort to make this ``language'' upwards compatible with +the ``standard'' spanish language definition, so the shorthands implemented here +are but a very narrow subset of the standard Spanish language: +those strictly necessary to handle Spanish hyphenation properly, +and a few extras to straighten the text a little in a Spanish layout. +So, in a sense, this ``language'' is a very stripped down or ultra-sloppy +version of the ``standard'' spanish.ldf, mostly as a fallback in case something +goes very awry with it. + +Questions, comments? Drop me an email at jlrn77 at gmail dot com + +December 28, 2010. diff --git a/Master/texmf-dist/tex/latex/spanglish/spanglish.ldf b/Master/texmf-dist/tex/latex/spanglish/spanglish.ldf new file mode 100644 index 00000000000..25bc5dfc15c --- /dev/null +++ b/Master/texmf-dist/tex/latex/spanglish/spanglish.ldf @@ -0,0 +1,373 @@ +%% +%% This is file `spanglish.ldf', +%% Copyright 2008 Luis Rivera and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +% The 'spanglish' pseudo-language was originally adapted from the 'galician' +% language (v1.2l 2005/03/30), by Manuel Carriba (mcarriba at eunetcom.net), +% based on the original spanish.sty, written by Julio Sanchez, +% (jsanchez at gmv.es) +% Additional code borrowed from spanish.ldf v4.2, by Javier Bezos. +%% +%% 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/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Luis Rivera. +%% jlrn77 at gmail dot com +%% +%% The list of derived (unpacked) files belonging to the distribution +%% and covered by LPPL is defined by the unpacking scripts (with +%% extension .ins) which are part of the distribution. +%% +%% \changes{2010/12/28}{Release version, from 2007/01/26 code} +\ProvidesLanguage{spanglish} + [2010/12/28 v0.1 Spanglish: simple Spanish support] +\LdfInit{spanglish}\captionsspanglish +\ifx\l@spanglish\@undefined + \ifx\l@spanish\@undefined + \@nopatterns{spanglish} + \adddialect\l@spanglish0\fi + \adddialect\l@spanglish\l@spanish\fi +\def\LaTeXeFmtName{LaTeX2e} +\addto\captionsspanglish{% + \def\prefacename{Prefacio}% + \def\refname{Referencias}% + \def\abstractname{Resumen}% + \def\bibname{Bibliograf\'{\i}a}% + \def\chaptername{Cap\'{\i}tulo}% + \def\appendixname{Ap\'endice}% + \def\contentsname{Contenido}% + \def\listfigurename{\'Indice de Figuras}% + \def\listtablename{\'Indice de Cuadros}% + \def\indexname{\'Indice Alfab\'etico}% + \def\figurename{Figura}% + \def\tablename{Cuadro}% + \def\partname{Parte}% + \def\enclname{Anexo}% + \def\ccname{Copia a}% + \def\headtoname{A}% + \def\pagename{P\'agina}% + \def\seename{v\'ease}% + \def\alsoname{v\'ease tambi\'en}% + \def\proofname{Demostraci\'on}% + \def\glossaryname{Glosario}% +} +\def\datespanglish{% + \def\today{\number\day\space de \ifcase\month\or + enero\or febrero\or marzo\or abril\or mayo\or junio\or + julio\or agosto\or septiembre\or octubre\or noviembre\or diciembre\fi + \space de \number\year}} +\addto\extrasspanglish{\bbl@frenchspacing} +\addto\noextrasspanglish{\bbl@nonfrenchspacing} +\addto\extrasspanglish{\languageshorthands{spanglish}} +\initiate@active@char{"} +\addto\extrasspanglish{% + \bbl@activate{"}} +\@ifpackagewith{babel}{activeacute}{% + \initiate@active@char{'}}{} +\@ifpackagewith{babel}{activeacute}{% + \addto\extrasspanglish{\bbl@activate{'}}}{} +\addto\noextrasspanglish{% + \bbl@deactivate{"}} +\@ifpackagewith{babel}{activeacute}{% + \addto\noextrasspanglish{\bbl@deactivate{'}}}{} +\addto\extrasspanglish{% + \babel@save\"% + \def\"{\protect\@umlaut}} +\@ifpackagewith{babel}{activeacute}{% + \babel@save\'% + \addto\extrasspanglish{\def\'{\protect\@acute}} + }{} +\let\dieresis\" +\@ifpackagewith{babel}{activeacute}{\let\textacute\'}{} +\def\@umlaut#1{\allowhyphens\dieresis{#1}\allowhyphens} +\@ifpackagewith{babel}{activeacute}{% + \def\@acute#1{\allowhyphens\textacute{#1}\allowhyphens}}{} +\declare@shorthand{spanglish}{"-}{\nobreak-\bbl@allowhyphens} +\declare@shorthand{spanglish}{"|}{\discretionary{-}{}{\kern.03em}} +\declare@shorthand{spanglish}{"u}{\@umlaut{u}} +\declare@shorthand{spanglish}{"U}{\@umlaut{U}} +\declare@shorthand{spanglish}{"i}{\@umlaut{\i}} +\declare@shorthand{spanglish}{"I}{\@umlaut{I}} +\declare@shorthand{spanglish}{"r} + {\bbl@allowhyphens\discretionary{\char\hyphenchar\font}% + {}{r}\bbl@allowhyphens} +\declare@shorthand{spanglish}{"R} + {\bbl@allowhyphens\discretionary{\char\hyphenchar\font}% + {}{R}\bbl@allowhyphens} +\declare@shorthand{spanglish}{"<}{\guillemotleft{}} +\declare@shorthand{spanglish}{">}{\guillemotright{}} +\ifx\fmtname\LaTeXeFmtName% this code, by javier bezos (jb) + \DeclareTextCommand{\guillemotleft}{OT1}{% + \ifmmode\ll + \else + \save@sf@q{\penalty\@M + \leavevmode\hbox{\usefont{U}{lasy}{m}{n}% + \char40 \kern-0.19em\char40 }}% + \fi}% + \DeclareTextCommand{\guillemotright}{OT1}{% + \ifmmode\gg + \else + \save@sf@q{\penalty\@M + \leavevmode\hbox{\usefont{U}{lasy}{m}{n}% + \char41 \kern-0.19em\char41 }}% + \fi}% +\fi% end jb +\declare@shorthand{spanglish}{"`}{\textquotedblleft{}} +\declare@shorthand{spanglish}{"'}{\textquotedblright{}} +\@ifpackagewith{babel}{activeacute}{% + \declare@shorthand{spanglish}{'a}{\textormath{\@acute a}{^{\prime} a}} + \declare@shorthand{spanglish}{'e}{\textormath{\@acute e}{^{\prime} e}} + \declare@shorthand{spanglish}{'i}{\textormath{\@acute\i{}}{^{\prime}i}} + \declare@shorthand{spanglish}{'o}{\textormath{\@acute o}{^{\prime} o}} + \declare@shorthand{spanglish}{'u}{\textormath{\@acute u}{^{\prime} u}} + \declare@shorthand{spanglish}{'A}{\textormath{\@acute A}{^{\prime} A}} + \declare@shorthand{spanglish}{'E}{\textormath{\@acute E}{^{\prime} E}} + \declare@shorthand{spanglish}{'I}{\textormath{\@acute I}{^{\prime} I}} + \declare@shorthand{spanglish}{'O}{\textormath{\@acute O}{^{\prime} O}} + \declare@shorthand{spanglish}{'U}{\textormath{\@acute U}{^{\prime} U}} + \declare@shorthand{spanglish}{'n}{\textormath{\~n}{^{\prime} n}} + \declare@shorthand{spanglish}{'N}{\textormath{\~N}{^{\prime} N}} + \declare@shorthand{spanglish}{''}{% + \textormath{\textquotedblright}{\sp\bgroup\prim@s'}} + }{} +\def\xp@plain@esabrv#1{.$^{{\rm #1}}$} +\def\xp@ltx@esabrv#1{.\textsuperscript{#1}} +\def\xp@esabrv@r#1#2{\esabrv{#1#2}}% nice trick by Bezos +\ifx\fmtname\LaTeXeFmtName + \addto\extrasxpanish{\let\esabrv=\xp@ltx@esabrv} + \else + \addto\extrasxpanish{\let\esabrv=\xp@plain@esabrv} +\fi +%\addto\extrasspanglish{% this code should state ordinal 1"o as 1o. +% \def\xp@usabrv#1{#1.} +% \let\esabrv\xp@usabrv +% \def\xp@esabrv@r#1#2{\esabrv{#1#2}} +%} +\declare@shorthand{spanglish}{"a}{\esabrv{a}} +\declare@shorthand{spanglish}{"o}{\esabrv{o}} +\declare@shorthand{spanglish}{"e}{\protect\xp@esabrv@r{e}} +\declare@shorthand{spanglish}{"A}{\esabrv{A}} +\declare@shorthand{spanglish}{"O}{\esabrv{O}} +\declare@shorthand{spanglish}{"E}{\protect\xp@esabrv@r{E}} +\declare@shorthand{spanglish}{"/}% by Bezos + {\setbox\z@\hbox{/}% + \dimen@\ht\z@ + \advance\dimen@-1ex + \advance\dimen@\dp\z@ + \dimen@.31\dimen@ + \advance\dimen@-\dp\z@ + \ifdim\dimen@>0pt + \kern.01em\lower\dimen@\box\z@\kern.03em + \else + \box\z@ + \fi} +\declare@shorthand{spanglish}{"?} + {\setbox\z@\hbox{?`}% + \leavevmode\raise\dp\z@\box\z@} +\declare@shorthand{spanglish}{"!} + {\setbox\z@\hbox{!`}% + \leavevmode\raise\dp\z@\box\z@} +\addto\extrasspanglish{% + \babel@save{\-}% + \def\-{\bbl@allowhyphens\discretionary{-}{}{}\bbl@allowhyphens}} +% the following code from spanish.ldf 5.x, by Bezos +\@ifundefined{documentclass} + {\let\ifxp@latex\iffalse} + {\let\ifxp@latex\iftrue} +\ifxp@latex +% +\addto\mathspanglish{\xp@sdef\dotlessi{\protect\xp@dotlessi}} +\let\nomathspanglish\relax +% +\ifxp@latex + \def\xp@texti{\i} + \addto\@uclclist{\dotlessi\xp@texti} +\fi +% +\ifxp@latex + \def\xp@dotlessi{% + \ifmmode + {\ifnum\mathgroup=\m@ne + \imath + \else + \count@\escapechar \escapechar=\m@ne + \expandafter\expandafter\expandafter + \split@name\expandafter\string\the\textfont\mathgroup\@nil + \escapechar=\count@ + \@ifundefined{\f@encoding\string\i}% + {\edef\f@encoding{\string?}}{}% + \expandafter\count@\the\csname\f@encoding\string\i\endcsname + \advance\count@"7000 + \mathchar\count@ + \fi}% + \else + \i + \fi} +\else + \def\xp@dotlessi{\textormath{\i}{\mathchar"7010}} +\fi +% +\def\accentedoperators{% + \def\xp@op@ac##1{\acute{\if i##1\dotlessi\else##1\fi}}} +\def\unaccentedoperators{% + \def\xp@op@ac##1{##1}} +\accentedoperators +\def\spacedoperators{\let\xp@op@sp\,} +\def\unspacedoperators{\let\xp@op@sp\@empty} +\spacedoperators +\addto\mathspanglish{\xp@operators} +% +\ifxp@latex\else + \let\operator@font\rm +\fi +\def\xp@operators{% + \xp@sdef\bmod{\nonscript\mskip-\medmuskip\mkern5mu + \mathbin{\operator@font m\xp@op@ac od}\penalty900\mkern5mu + \nonscript\mskip-\medmuskip}% + \@ifundefined{@amsmath@err}% + {\xp@sdef\pmod##11{\allowbreak\mkern18mu + ({\operator@font m\xp@op@ac od}\,\,##11)}}% + {\xp@sdef\mod##1{\allowbreak\if@display\mkern18mu + \else\mkern12mu\fi{\operator@font m\xp@op@ac od}\,\,##1}% + \xp@sdef\pmod##1{\pod{{\operator@font m\xp@op@ac od}% + \mkern6mu##1}}}% + \def\xp@a##1 {% + \if^##1^% empty? continue + \bbl@afterelse + \xp@a + \else + \bbl@afterfi + {\if&##1% &? finish + \else + \bbl@afterfi + \begingroup + \let\,\@empty % ignore when def'ing name + \let\acute\@firstofone % id + \edef\xp@b{\expandafter\noexpand\csname##1\endcsname}% + \def\,{\noexpand\xp@op@sp}% + \def\acute{\noexpand\xp@op@ac}% + \edef\xp@a{\endgroup + \noexpand\xp@sdef\expandafter\noexpand\xp@b{% + \mathop{\noexpand\operator@font##1}\nolimits}}% + \xp@a % restores itself + \xp@a + \fi}% + \fi}% + \let\xp@b\spanglishoperators + \addto\xp@b{ }% + \expandafter\xp@a\xp@b l\acute{i}m l\acute{i}m\,sup + l\acute{i}m\,inf m\acute{a}x \acute{i}nf m\acute{i}n + sen tg arc\,sen arc\,cos arc\,tg & } +\def\spanglishoperators{cotg cosec senh tgh } +\DeclareTextCompositeCommand{\'}{OT1}{i}{\@tabacckludge'{\i}} +% +\addto\extrasspanglish{% + \def\@alph#1% + {\ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or + k\or l\or m\or n\or \~n\or o\or p\or q\or r\or s\or t\or u\or v\or + w\or x\or y\or z\else\@ctrerr\fi}% + \def\@Alph#1% + {\ifcase#1\or A\or B\or C\or D\or E\or F\or G\or H\or I\or J\or + K\or L\or M\or N\or \~N\or O\or P\or Q\or R\or S\or T\or U\or V\or + W\or X\or Y\or Z\else\@ctrerr\fi} + } +\ifx\fmtname\LaTeXeFmtName% +%\ifes@LaTeXe %<<<<<< again, by Bezos + \addto\textspanish{% + \babel@save\lsc + \def\lsc{\protect\xp@lsc}} +% + \def\xp@lsc#1{% + \leavevmode + \hbox{\scshape\selectfont + \expandafter\ifx\csname\f@encoding/\f@family/\f@series + /n/\f@size\expandafter\endcsname + \csname\curr@fontshape/\f@size\endcsname + \csname S@\f@size\endcsname + \fontsize\sf@size\z@\selectfont + \PackageInfo{spanish}{Replacing undefined sc font\MessageBreak + shape by faked small caps}% + \MakeUppercase{#1}% + \else + \MakeLowercase{#1}% + \fi}} +%\fi %<<<<<< + \def\spanglishlayout{% nothing fancy + \def\theenumii{\alph{enumii}} + \def\theenumiii{\arabic{enumiii}} + \def\theenumiv{\alph{enumiv}} + \def\labelenumii{{\itshape\theenumii})} + \def\labelenumiii{{\upshape\theenumiii})} + \def\labelenumiv{{\itshape\theenumiv}\ensuremath{'}} + \def\p@enumii{{\itshape\theenumii}} + \def\p@enumiii{{\theenumiii}} + \def\p@enumiv{{\itshape\theenumiv}\ensuremath{'}} + \let\@afterindentfalse\@afterindenttrue% + \@afterindenttrue% + \def\@fnsymbol##1% + {\ifcase##1\or*\or**\or***\or****\or + *****\or******\else\@ctrerr\fi}% + \def\@roman##1{\protect\xp@roman{\number##1}}% + \def\xp@roman##1{\protect\xp@lsc{\romannumeral##1}}% + \def\esromanindex##1##2{##1{\protect\xp@lsc{##2}}} + } +\AtEndOfPackage{% + \RequirePackage{esindex}% + \def\bbl@tempa{spanglish}% + \ifx\bbl@main@language\bbl@tempa% + \AtBeginDocument{\spanglishlayout}% + } +\fi +%% +%% This patch fixes a bug in \bbl@activate; +%% it may be removed as soon as \bbl@activate +%% is fixed in the kernel of babel. +%% Thanks to Javier Bezos for fixing this one. +%% +\gdef\bbl@activate#1{% + \begingroup + \lccode`\~=`#1 + \lowercase{% + \endgroup + \def~{\bbl@use@shorthand~}}} + +\def\bbl@use@shorthand{% + \ifx\thepage\relax + \bbl@afterelse + \string + \else + \bbl@afterfi + {\ifx\protect\@unexpandable@protect + \bbl@afterelse + \noexpand + \else + \bbl@afterfi + \bbl@use@sh + \fi}% + \fi} + +\def\bbl@use@sh#1{% + \if@safe@actives + \bbl@afterelse + \string#1% + \else% + \bbl@afterfi + \textormath + {\csname active@char\string#1\endcsname}% + {\csname normal@char\string#1\endcsname}% + \fi} + +%% +%% End of patch. +\ldf@finish{spanglish} +\endinput +%% +%% End of file `spanglish.ldf'.
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/spanglish/spanglish.sty b/Master/texmf-dist/tex/latex/spanglish/spanglish.sty new file mode 100644 index 00000000000..e761103f35f --- /dev/null +++ b/Master/texmf-dist/tex/latex/spanglish/spanglish.sty @@ -0,0 +1,66 @@ +%% +%% This is file `spanglish.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% spanglish.dtx (with options: `sty') +%% +%% This is a generated file. +%% +%% Copyright 2008 Luis Rivera and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% 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/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Luis Rivera. +%% jlrn7 at gmail dot com +%% +%% The list of derived (unpacked) files belonging to the distribution +%% and covered by LPPL is defined by the unpacking scripts (with +%% extension .ins) which are part of the distribution. +%% +\ifx\LdfInit\undefined + \def\LdfInit{% + \chardef\atcatcode=\catcode`\@ + \catcode`\@=11\relax + \input babel.def\relax + \catcode`\@=\atcatcode \let\atcatcode\relax + \LdfInit} +\fi +\ifx\PackageError\undefined + \def\ProvidesLanguage#1[#2 #3 #4]{% + \wlog{Language: #1 #4 #3 <#2>}}% +\else + \def\bblstyerror{% + \PackageError{babel}% + {You have used an old interface to call babel\MessageBreak + You may expect compatibility problems wit other packages}% + {You could proceed but don't complain if you run into errors}% + \let\bblstyerror\@undefined + } + \ifx\ProvidesLanguage\undefined + \bblstyerror + \def\ProvidesLanguage{% + \chardef\atcatcode=\catcode`\@ + \catcode`\@=11\relax + \input babel.def\relax + \catcode`\@=\atcatcode \let\atcatcode\relax + \ProvidesLanguage} + \else + \bblstyerror + \fi +\fi +\def\CurrentOption{spanglish} +\input spanglish.ldf\relax +\endinput +%% +%% End of file `spanglish.sty'. diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index c4159037b66..57fee79730f 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -298,7 +298,7 @@ my @TLP_working = qw( skak skaknew skb skeycommand skeyval slantsc slashbox slideshow smalltableof smartref snapshot songbook sort-by-letters soton soul soyombo - spanish spanish-mx sparklines spie + spanglish spanish spanish-mx sparklines spie sphack splines splitbib splitindex spot spotcolor spreadtab spverbatim srcltx stack stage standalone starfont statistik statex statex2 staves stdclsdv stdpage steinmetz diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc index 816e336e362..7244c6c3cbf 100644 --- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc @@ -581,6 +581,7 @@ depend smalltableof depend smartref depend snapshot depend soul +depend spanglish depend sparklines depend sphack depend spreadtab diff --git a/Master/tlpkg/tlpsrc/spanglish.tlpsrc b/Master/tlpkg/tlpsrc/spanglish.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/tlpkg/tlpsrc/spanglish.tlpsrc |