%%
%% This is file `textcmds.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% textcmds.dtx  (with options: `pkg')
%% 
%% Copyright 2001, 2010 American Mathematical Society.
%% 
%% American Mathematical Society
%% Technical Support
%% Publications Technical Group
%% 201 Charles Street
%% Providence, RI 02904
%% USA
%% tel: (401) 455-4080
%%      (800) 321-4267 (USA and Canada only)
%% fax: (401) 331-3842
%% email: tech-support@ams.org
%% 
%% 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 the American Mathematical
%% Society.
%% 
\ProvidesPackage{textcmds}[2012/08/02 v2.00]
\providecommand{\mdash}{\textemdash\penalty\exhyphenpenalty}
\providecommand{\ndash}{\textendash\penalty\exhyphenpenalty}
\providecommand{\qd}{\textquestiondown}
\providecommand{\xd}{\textexclamdown}
\providecommand{\ldq}{\textquotedblleft}
\providecommand{\rdq}{\textquotedblright}
\providecommand{\lsq}{\textquoteleft}
\providecommand{\rsq}{\textquoteright}
\providecommand{\bul}{\textbullet}%
\providecommand{\vsp}{\textvisiblespace}%
\providecommand{\pdc}{\textperiodcentered}%
\providecommand{\vrt}{\textbar}%
\providecommand{\cir}{\textasciicircum}%
\providecommand{\til}{\textasciitilde}%
\providecommand{\bsl}{\textbackslash}%
\providecommand{\cwm}{\textcompwordmark}%
\providecommand{\qq}[1]{\ldq#1\/\rdq}
\providecommand{\q}[1]{\lq#1\/\rq}
\newcommand{\supsize}{%
  \expandafter\ifx\csname S@\f@size\endcsname\relax
    \calculate@math@sizes
  \fi
  \csname S@\f@size\endcsname
  \fontsize\sf@size\z@\selectfont
}
\DeclareRobustCommand{\tsup}[1]{%
  \leavevmode\raise.9ex\hbox{\supsize #1}%
}
\DeclareRobustCommand{\tsub}[1]{%
  \leavevmode\lower.6ex\hbox{\supsize #1}%
}
\DeclareTextSymbolDefault{\textprimechar}{OMS}
\DeclareTextSymbol{\textprimechar}{OMS}{48}
\DeclareRobustCommand{\tprime}{\tsup{\textprimechar}}
\@ifundefined{textlangle}{%
  \DeclareTextSymbolDefault{\textlangle}{OMS}
  \DeclareTextSymbolDefault{\textrangle}{OMS}
}{}
\DeclareTextSymbol{\textlangle}{OMS}{"68}
\DeclareTextSymbol{\textrangle}{OMS}{"69}
\DeclareRobustCommand{\lara}[1]{\textlangle#1\/\textrangle}
\csname endinput\endcsname
<*emacs>
(defvar latex-ndash-command "\\ndash"
  "*String to insert for an n-dash in LaTeX mode.")

(defvar latex-mdash-command "\\mdash"
  "*String to insert for an m-dash in LaTeX mode.")

(defvar latex-quote-command "\\qq"
  "*String to insert for quotes in LaTeX mode.")

(defun latex-maybe-start-quotes (arg)
  "Insert the beginning of a \\qq{...} structure if the preceding char is
a left quote."
  (interactive "*p")
  (if (= (preceding-char) ?\`)
      (progn
        (delete-backward-char 1)
        (insert-and-inherit (concat latex-quote-command "\{")))
    (self-insert-command arg)))

(defun latex-maybe-end-quotes (arg)
  "Insert the end of a \\qq{...} structure if appropriate."
  (interactive "*p")
  (if (= (preceding-char) ?\')
      (progn
        (delete-backward-char 1)
        (insert-and-inherit "\}"))
    (self-insert-command arg)))

(defun latex-maybe-dash (arg)
  "Convert two or three hyphens to \\mdash or \\ndash."
  (interactive "*p")
  (cond
   ((re-search-backward
     (concat (regexp-quote latex-ndash-command) " *\\=") nil t)
    (replace-match (concat (regexp-quote latex-mdash-command) " ")))
   ((= (preceding-char) ?-)
    (delete-backward-char 1)
    (insert-and-inherit (concat latex-ndash-command " ")))
   (t (self-insert-command arg))))

(add-hook 'TeX-mode-hook
  '(lambda
    (define-key LaTeX-mode-map "\`" 'latex-maybe-start-quotes)
    (define-key LaTeX-mode-map "\'" 'latex-maybe-end-quotes)
    (define-key LaTeX-mode-map "-" 'latex-maybe-dash)))
</emacs>
\endinput
%%
%% End of file `textcmds.sty'.