diff options
author | Karl Berry <karl@freefriends.org> | 2012-07-14 16:21:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-07-14 16:21:06 +0000 |
commit | 2c00df54e8832273ac81fa75582d143889a2689b (patch) | |
tree | 9d1f9dd61080518bf195f15d7eceded569084744 /Master/texmf-dist/tex/latex/foreign/foreign.sty | |
parent | 48b56d799036b3732d15096eff82a9c1788f252f (diff) |
new latex package foreign 2.6 (20jun12)
git-svn-id: svn://tug.org/texlive/trunk@27045 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/foreign/foreign.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/foreign/foreign.sty | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/foreign/foreign.sty b/Master/texmf-dist/tex/latex/foreign/foreign.sty new file mode 100644 index 00000000000..de46bee8f42 --- /dev/null +++ b/Master/texmf-dist/tex/latex/foreign/foreign.sty @@ -0,0 +1,125 @@ +%% +%% This is file `foreign.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% foreign.dtx (with options: `package') +%% +%% Copyright (C) 2012 by +%% Philip G. Ratcliffe <philip.ratcliffe@uninsubria.it> +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3c 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.3c or later is part of all distributions of +%% LaTeX version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained.' +%% +%% The current maintainer of this work is Philip G. Ratcliffe. +%% +\NeedsTeXFormat{LaTeX2e}[1995/12/01] +\ProvidesPackage{foreign} + [2012/06/20 v2.6 type-setting package for foreign words (PGR)] + +\RequirePackage{xpunctuate,xspace} +\DeclareRobustCommand\foreign[1]{{\foreignfullfont{#1}}\xspace} +\DeclareRobustCommand\notforeign[1]{#1\xspace} +\newcommand\foreignfullfont{\emph} +\newcommand\foreignabbrfont{\em} +\newcommand\defasforeign[2][]{% + \define@foreign{#1}{#2}{\newcommand}{\foreign} +} +\newcommand\defnotforeign[2][]{% + \define@foreign{#1}{#2}{\newcommand}{\notforeign} +} +\newcommand\redefasforeign[2][]{% + \define@foreign{#1}{#2}{\renewcommand}{\foreign} +} +\newcommand\redefnotforeign[2][]{% + \define@foreign{#1}{#2}{\renewcommand}{\notforeign} +} +\newcommand\define@foreign[4]{% + \def\foreign@csname{#1}% + \ifx\foreign@csname\@empty + \def\foreign@csname{#2}% + \fi + \expandafter#3\csname\foreign@csname\endcsname{#4{#2}}% +} +\DeclareOption{xlatin}{% + \defasforeign{addendum} + \defasforeign{Addendum} + \defasforeign[adhoc]{ad hoc} + \defasforeign[Adhoc]{Ad hoc} + \defasforeign[aposteriori]{a posteriori} + \defasforeign[Aposteriori]{A posteriori} + \defasforeign[apriori]{a priori} + \defasforeign[Apriori]{A priori} + \defasforeign{caveat} + \defasforeign{Caveat} + \defasforeign{circa} + \defasforeign{Circa} + \defasforeign{curriculum} + \defasforeign{Curriculum} + \defasforeign{erratum} + \defasforeign{Erratum} + \defasforeign{ibidem} + \defasforeign{Ibidem} + \defasforeign{idem} + \defasforeign{Idem} + \defasforeign{sic} + \defasforeign{Sic} + \defasforeign[viceversa]{vice versa} + \defasforeign[Viceversa]{Vice versa} + \defasforeign[vitae]{vit{\ae}} + \defasforeign[Vitae]{Vit{\ae}} +} +\DeclareOption{xfrench}{% + \defasforeign[ala]{\`{a} la} + \defasforeign[Ala]{\`{A} la} + \defasforeign[visavis]{vis \`{a} vis} + \defasforeign[Visavis]{Vis \`{a} vis} +} +\DeclareOption{xgerman}{% + \defasforeign{ansatz} + \defasforeign{Ansatz} + \defasforeign{gedanken} + \defasforeign{Gedanken} +} +\DeclareOption{abbreviations}{% + \DeclareRobustCommand\cf{\UKUS@comma{{\foreignabbrfont{cf}}}} + \DeclareRobustCommand\eg{% + \UKUS@comma{{\foreignabbrfont{e}}.{\foreignabbrfont{g}}}} + \DeclareRobustCommand\etal{\xperiodafter{{\foreignabbrfont{et al}}}} + \DeclareRobustCommand\etc{\xperiodafter{{\foreignabbrfont{etc}}}} + \DeclareRobustCommand\etseq{\xperiodafter{{\foreignabbrfont{et seq}}}} + \DeclareRobustCommand\ibid{\xperiodafter{{\foreignabbrfont{ibid}}}} + \DeclareRobustCommand\ie{% + \UKUS@comma{{\foreignabbrfont{i}}.{\foreignabbrfont{e}}}} + \DeclareRobustCommand\opcit{% + {\foreignabbrfont{op}}.\ \xperiodafter{{\foreignabbrfont{cit}}}} + \DeclareRobustCommand\viz{\xperiodafter{{\foreignabbrfont{viz}}}} +} +\newcommand\UKUS@comma{\xperiodafter} +\DeclareOption{UKenglish}{\renewcommand\UKUS@comma{\xperiodafter}} +\DeclareOption{USenglish}{\renewcommand\UKUS@comma{\xperiodcommaafter}} +\ExecuteOptions{USenglish} +\DeclareOption{british}{\ExecuteOptions{UKenglish}} +\DeclareOption{phrases}{\ExecuteOptions{xfrench,xgerman}} +\DeclareOption{all}{\ExecuteOptions{xlatin,phrases,abbreviations}} +\ProcessOptions +\InputIfFileExists{foreign.cfg}{% + \typeout{% + ============================================^^J% + Loading local configuration file foreign.cfg^^J% + ============================================% + } +}{}% +\endinput +%% +%% End of file `foreign.sty'. |