summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/dirtytalk/dirtytalk.sty
blob: 27327054dcdece7f75dcc5fdb23497da06063a94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
%%
%% This is file `dirtytalk.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% dirtytalk.dtx  (with options: `package')
%% 
%% M. Klammler, 2010
%% 
%% I, the copyright holder of this work, release the source code of the dirtytalk
%% package as well as the accompaining documentation into the public domain. This
%% applies worldwide.
%% 
%% In some countries this may not be legally possible; if so: I grant anyone the
%% right to use this work for any purpose, without any conditions, unless such
%% conditions are required by law.
%% 

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{dirtytalk}[2010/11/21 A package making "quoting" easier]
\RequirePackage{kvoptions}
\newcommand{\dirtytalk@lqq}{``}
\newcommand{\dirtytalk@rqq}{''}
\newcommand{\dirtytalk@lq}{`}
\newcommand{\dirtytalk@rq}{'}
\DeclareStringOption{left}
\DeclareStringOption{right}
\DeclareStringOption{leftsub}
\DeclareStringOption{rightsub}
\ProcessKeyvalOptions*
\RequirePackage{ifthen}
\ifthenelse%
  {\equal{\dirtytalk@left}{}}%
  {}%
  {\renewcommand{\dirtytalk@lqq}{\dirtytalk@left}}
\ifthenelse%
  {\equal{\dirtytalk@right}{}}%
  {}%
  {\renewcommand{\dirtytalk@rqq}{\dirtytalk@right}}
\ifthenelse%
  {\equal{\dirtytalk@leftsub}{}}%
  {}%
  {\renewcommand{\dirtytalk@lq}{\dirtytalk@leftsub}}
\ifthenelse%
  {\equal{\dirtytalk@rightsub}{}}%
  {}%
  {\renewcommand{\dirtytalk@rq}{\dirtytalk@rightsub}}
\newcounter{dirtytalk@qdepth}
\newcommand%
  {\dirtytalk@lsymb}%
  {\ifthenelse%
    {\value{dirtytalk@qdepth}>1}%
    {\dirtytalk@lq}%
    {\dirtytalk@lqq}%
  }%
\newcommand{\dirtytalk@rsymb}%
  {\ifthenelse%
    {\value{dirtytalk@qdepth}>1}%
    {\dirtytalk@rq}%
    {\dirtytalk@rqq}%
  }
\providecommand{\say}[1]%
  {%
    \addtocounter{dirtytalk@qdepth}{1}%
    \dirtytalk@lsymb%
    #1%
    \dirtytalk@rsymb%
    \addtocounter{dirtytalk@qdepth}{-1}%
  }
\endinput
%%
%% End of file `dirtytalk.sty'.