<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% Copyright (C) 2011 by Yossi Gil  yogi@cs.technion.ac.il
% ---------------------------------------------------------------------------
% This work may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), 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 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is Yossi Gil 
%
% This work consists of the files unisugar.tex and unisugar.sty and the derived
% file unisugar.pdf
\NeedsTeXFormat{LaTeX2e}

\newcommand\date@unisugar{2011/05/07}
\newcommand\version@unisugar{V 0.92}
\newcommand\author@unisugar{Yossi Gil}
\newcommand\mail@unisugar{yogi@cs.technion.ac.il}
\newcommand\signature@unisugar{%
  unisugar \version@unisugar{} by 
  \author@unisugar{} \mail@unisugar
}
      
\ProvidesPackage{unisugar}[\date@unisugar{} \signature@unisugar:
	Selected Unicode characters (e.g., âŒ˜, â£, â€¢, âŽ, Â¶, and Â§)
	 employed in some very common LaTeX commands.
]

\PackageInfo{unisugar}{This is unisugar, \signature@unisugar}

\RequirePackage{ifxetex}
\typeout{This is the unisugar package}
\providecommand\discardNextChar[1]{}

\providecommand*{\toEolnCommand}[2]{%
  \newcommand*{#1}{%
    \begingroup
    \escapechar=`\\%
    \catcode\endlinechar=\active
    \csname\string#1\endcsname
  }%
  \begingroup%
  \escapechar=`\\%
  \lccode`\~=\endlinechar
  \lowercase{%
    \expandafter\endgroup
    \expandafter\def\csname\string#1\endcsname##1~%
  }{\endgroup#2\space}%
}

\toEolnCommand\toEolnSection{\section{#1}}
\toEolnCommand\toEolnSubsection{\subsection{#1}}
\toEolnCommand\toEolnSubsubsection{\subsubsection{#1}}
\toEolnCommand\toEolnParagraph{\paragraph{#1}}
\toEolnCommand\toEolnSubparagraph{\subparagraph{#1}}

\ifxetex
	\relax
\else
	\PackageWarning{You should be LaTeXing your file with "xelatex \jobname" 
	                 to enjoy this package fully} 
	\endinput
\fi

% âŒ˜: U+2318 PLACE OF INTEREST SIGN (also command key), is used as a direction
% neutral escape character. Makes it possible to use the command key
% character as a command prefix. Useful in particular with right-to-left texts,
% in which the familiar, yet directionally non-neutral, backslash may be a bit confusing.
\catcode"2318=11
\edef\âŒ˜{âŒ˜}
\catcode"2318=0 

% â£: U+2423 OPEN BOX, a visual space is allowed as a legitimate character in 
% control sequences, whereby eliminating the need for ugly juxtaposing of words. 
\catcode"2423=11
\edef\â£{â£}


% â€¦: U+2026 HORIZONTAL ELLIPSIS, will serve as a sugar nickname for \ldots.
âŒ˜catcode"2026=âŒ˜active
âŒ˜newcommandâ€¦{âŒ˜ldots}

% â€¢: U+2022 BULLET (black small circle), a sugared alias for âŒ˜item.
âŒ˜catcode"2022=11
âŒ˜edefâŒ˜â€¢{â€¢}
âŒ˜catcode"2022=âŒ˜active 
âŒ˜newcommandâ€¢{âŒ˜item}

% âŽ: U+23CE RETURN SYMBOL, a sugared nickname for \\ 
âŒ˜catcode"23CE=11
âŒ˜edef\âŽ{âŽ}
âŒ˜catcode"23CE=âŒ˜active 
âŒ˜newcommandâŽ{\\}

% âŒ–: U+2316 POSITION INDICATOR, is an alias for LaTeX's \label command.
âŒ˜catcode"2316=11
âŒ˜edef\âŒ–{âŒ–}
âŒ˜catcode"2316=âŒ˜active 
âŒ˜newcommandâŒ–[1]{âŒ˜label{#1}} 

% â˜: U+261D WHITE UP POINTING INDEX, is an alias LaTeX's \ref command.
âŒ˜catcode"261D=11
âŒ˜edef\â˜{â˜}
âŒ˜catcode"261D=âŒ˜active 
âŒ˜newcommandâ˜[1]{âŒ˜ref{#1}}

% Â¶: U+00B6 PILCROW SIGN, will serve as a sugar nickname for  âŒ˜paragraph, using
% the remainder of the line as the paragraph's title. Further, Â¶Â¶, that is two
% successive occurrences of the pilcrow sign, shall serve as a sugared nickname
% for âŒ˜subparagraph, employing the remainder of the text on the current line as
% the subparagraph's title.
âŒ˜catcode"B6=11
âŒ˜edef\Â¶{Â¶}
âŒ˜catcode"B6=âŒ˜active 
âŒ˜newcommandÂ¶{âŒ˜paragraphâ£sugar} 

\newcommand\paragraphâ£sugar{%
      \@ifnextcharÂ¶{%
                \expandafter
                \toEolnSubparagraph
                \discardNextChar
      }{%
              \toEolnParagraph
      }%
}

% Â§: U+00A7 SECTION SIGN, will serve as a sugar nickname for âŒ˜section, using
% the remainder of the line as the section's title. Further, Â§Â§, that is two
% successive occurrences of this Unicode code point, shall serve as a sugared
% nickname for âŒ˜subsection, employing the remainder of the text on the current
% line as the subsection's title. Even further, Â§Â§Â§, three successive
% occurrences shall serve as a sugared nickname for âŒ˜subsubsection, employing
% again, the remainder of text on the line as the subsubsection's title.
%
âŒ˜catcode"A7=11
âŒ˜edef\Â§{Â§}
âŒ˜catcode"A7=âŒ˜active 
âŒ˜newcommandÂ§{âŒ˜sectionâ£sugar}
âŒ˜newcommandâŒ˜sectionâ£sugar{%
  \@ifnextcharÂ§{% Two or more Â§ were found.
      \expandafter
      \subâ£orâ£subsubâ£section
      \discardNextChar
   }{% Single Â§ found.
      \toEolnSection
  }%
}

\newcommand*\subâ£orâ£subsubâ£section{%
      \@ifnextcharÂ§{%
        \expandafter
        \toEolnSubsubsection
        \discardNextChar
      }{%
          \toEolnSubsection
      }%
}












</pre></body></html>