<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass{ltxdoc} % Process with xelatex -shell-esc
\usepackage{unisugar}
\usepackage[colorlinks=true]{hyperref}
\usepackage{bashful}
\usepackage{varioref}

âŚletâŚuseâŁpackage=âŚusepackage
âŚuseâŁpackage{xspace}
âŚletâŚnewâŁcommand=âŚnewcommand
âŚnewâŁcommandâŚunisugar{âŚtexttt{unisugar}âŚxspace}

âŚuseâŁpackage{graphicx}
âŚuseâŁpackage{metalogo}
âŚuseâŁpackage{hyperref}
âŚuseâŁpackage{polyglossia}
  âŚsetmainlanguage{english}
  âŚsetotherlanguage{hebrew}
  âŚnewfontfamilyâŚhebrewfont[Script=Hebrew]{David CLM}
  âŚnewfontfamilyâŚcodefont{DejaVu Sans Mono}

âŚletâŚnewâŁenvironment=âŚnewenvironment

âŚnewâŁcommandâŚcommandâŁkey{{âŚcodefontâŚâŚ}}
âŚnewâŁcommandâŚreturnâŁkey{{âŚcodefontâŚâŹŽ}âŚxspace}

âŚnewâŁcommandâŚUnicode{âŚtextsc{Unicode}âŚxspace}
âŚnewâŁenvironment{code}{%
  âŚbegingroup
  âŚquote
  âŚsmall
  âŚcodefont
  âŚtt
}{%
  âŚendquote
  âŚendgroup
}
âŚnewâŁcommandâŚme{unisugar}
âŚtitle{The âŚtextsf{âŚme} Package\thanks{
  Copyright âŚcopyright{} 2011 by Yossi Gil  
    âŚurl{mailto:yogi@cs.technion.ac.il}.
  This work may be distributed and/or modified under the conditions of the
    âŚemph{âŚ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 
  âŚurl{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 âŚtexttt{âŚme.tex} and âŚtexttt{âŚme.sty} 
  and the derived file
  âŚtexttt{âŚme.pdf}
}}

âŚauthor{Yossi GilâŚthanks{âŚurl{mailto:yogi@cs.Technion.ac.IL}}âŹŽ
   âŚnormalsize Department of Computer ScienceâŹŽ
   âŚnormalsize The Technion---Israel Institute of TechnologyâŹŽ
   âŚnormalsize Technion City, Haifa 32000, Israel
}

âŚdate{{âŚmakeatletter
     âŚdate@unisugar\thanks{
        This document describes âŚunisugar âŚversion@unisugar.}}}
        
        

âŚbegin{document}
âŚbash[stdoutFile=README]
cat &lt;&lt; EOF
The unisugar package 0.92
=========================

This package requires a TeX-alike system that uses native Unicode input system;
current examples are XeTeX and LuaTeX. The package provides syntactic sugar for 
selected LaTeX commands, allowing these to be replaced with their Unicode- 
character counterpart, e.g., a Unicode bullet can be used instead of a \item,
and a pilcrow can be used instead of \paragraph.

The intent is to minimize the use of English left-to-right characters in 
documents whose main language is written right-to-left, since mixing characters
of different directionality confuses both text editors and human beings.

Using this package, you may find yourself typing a bit less, provided you can 
configure your text editor or keyboard driver to generate the handful of Unicode
characters defined by this package. More importantly, the package is useful in 
defining macros whose name is composed of right-to-left characters and in 
minimizing mixed directionality text in right-to-left documents.

This package may be distributed and/or modified under the LaTeX Project Public 
License (LPPL), version 1.3 or higher (your choice). The latest version of this 
license can be found at: http://www.latex-project.org/lppl.txt

This work is author-maintained(as per LPPL maintenance status) by Yossi Gil
&lt;yogi@cs.Technion.ac.IL&gt;
EOF
\END

âŚmaketitle
âŚbegin{abstract}
This package provides syntactic sugar
  for âŚLaTeX{} commands, using selected 
    âŚhref{http://www.unicode.org/standard/standard.html}âŚUnicode 
    characters:
Selected âŚUnicode characters can be used as shorthand for certain 
  âŚLaTeX{} commands.
The package also makes it possible to use the familiar 
  command key symbol,~âŚcommandâŁkey{} as a prefix of âŚTeX{}'s 
  macros (the backlash character,~âŚtextbackslash, can
  still be used).
And it allows the use of visual space,~âŚâŁ, 
  within the names of macros, thus making it easier to 
  write macros whose names are composed of more than one word.
  
In this document I describe these syntactical extensions,
  and explain why they make it easier to compose
  right-to-left documents.
âŚend{abstract}

{âŚsmallâŚtableofcontents}

âŚparindent 1.5ex
âŚparskip 0.5em

Â§ Introduction
You do not really âŚemph{need} this package. 
As its name implies, all it offers is what people call 
  ``syntactic sugar''---the ability to use a selected
    number of âŚtextsc{âŚUnicode} characters instead of and within 
    the most common âŚLaTeX{} commands.
    
Some may appreciate the fact that using this package, 
  the text you type---the input to âŚLaTeX{}---will look 
  a bit more neat
  and infinitesimally closer to the output.
Others will argue against it, mentioning that the input document 
  will be less portable,
  and less ``âŚLaTeX-like'' (whatever this term means).
 
Still, using this package, 
  you will find yourself typing a bit less, 
  provided you can configure your text editor or 
  keyboard driver to generate
  the handful of âŚUnicode characters defined by this package.
  
More importantly, if your input files include right-to-left text,
  you are likely to find this package indispensable.
If your document is indeed going to include right-to-left text, please
  pay special attention to Section~âť{Section:rtl:divisions},
    which describes how âŚunisugar should help you with
    your document divisioning directives, and 
    to Section~âť{Section:rtl:commands},
    which explains how âŚunisugar makes it easier
    to intermix âŚLaTeX{} commands with your text.
If however you are not likely to include right-to-left text in 
  your documents,
  you do not need to read these sections.

    
Â§ User Guide
Simply apply a âŚverb+\usepackage+ directive to use
  this package.
âŚbegin{code}
âŚverb+\usepackage{unisugar}+
âŚend{code}

There are no package options at this time.

You would then have to use a âŚUnicode based version of âŚLaTeX{}, 
  that is âŚXeLaTeX{} or âŚLuaLaTeX{}
  to process your input file, e.g., for processing the document 
    you are now reading,   
  I typed at my shell command prompt
âŚbegin{code}
xelatex unisugar.tex
âŚend{code}

Â§Â§ Document Divisioning Commands

Two of âŚUnicode's typographical characters,~âŚtexttt{âŚÂ¶}
   (code point B6, the pilcrow sign) and~âŚtexttt{âŚÂ§}
   (code point A7, the section sign) are employed
   in âŚunisugar to make shorthands 
  for âŚLaTeX{} traditional document divisionining commands:
  âŚverb+\section+, 
  âŚverb+\subsection+, âŚverb+\subsubsection+, and the lesser units,
  âŚverb+\paragraph+, 
  and âŚverb+\subparagraph+ commands.
  
Thus, instead of writing 
âŚbegin{code}
âŚtextbackslash sectionâŚ{User GuideâŚ}
âŚend{code}
at the beginning of this section, I typed just 
âŚbegin{code}
âŚÂ§ User Guide
âŚend{code}
Similarly, instead of
âŚbegin{code}
âŚtextbackslash subsectionâŚ{Document Divisioning CommandsâŚ}
âŚend{code}
I typed 
âŚbegin{code}
âŚÂ§âŚÂ§ Document Divisioning Commands
âŚend{code} 
to generate the header of this subsection.

Observe that I did not need to type nor an opening curly
  bracket,~âŚverb+{+, neither a closing curly bracket,~âŚverb+}+.
The division's title extends from the~âŚtexttt{âŚÂ§}
  character (in case of a section), or the~âŚtexttt{âŚÂ§âŚÂ§} 
  characters pair (in case of a subsection)
    until the end of the line.
  
  
Table âť{Table:divisions} summarizes the shorthands for the document 
  divisioning commands.
The original versions are always there, in case you need
   to use the starred version of the divisioning command, 
   or pass an optional argument to it.
    
âŚbegin{table}[!Hht]
âŚsmall
âŚbegin{center}
âŚbegin{tabular}{lll}
Division            &amp; âŚLaTeX{}              &amp; âŚunisugar âŹŽ
\hline
\hline
part                &amp; âŚverb+\part+          &amp;  --- âŹŽ
chapter             &amp; âŚverb+\chapter+       &amp;  --- âŹŽ
section             &amp; âŚverb+\section+       &amp; âŚtexttt{\Â§} âŹŽ
sub-section         &amp; âŚverb+\section+       &amp; âŚtexttt{\Â§\Â§} âŹŽ
sub-sub-section     &amp; âŚverb+\subsection+    &amp; âŚtexttt{\Â§\Â§\Â§} âŹŽ
paragraph           &amp; âŚverb+\paragraph+     &amp; âŚtexttt{\Â¶} âŹŽ
sub-paragraph       &amp; âŚverb+\subparagraph+  &amp; âŚtexttt{\Â¶\Â¶} âŹŽ
\hline
âŚend{tabular}
\caption{Shorthands for divisioning commands}
âŚ–{Table:divisions}
âŚend{center}
âŚend{table}

Â§Â§ Right-to-left Text Editing
âŚ–{Section:rtl:divisions}
There is a great advantage of using these sugared replacements 
  in composing left-to-right documents.
Think of a a Hebrew document including a section 
  named âŚtexthebrew{×ž×‘×•×} (Which means ``Introduction'' in Hebrew).
Then, with plain âŚXeLaTeX{}, the document would start with 
  a directive
âŚbegin{code}
âŚtextbackslash{}sectionâŚ{âŚfontspec{Courier New}
×ž×‘×•×%
âŚrmâŚttâŚ}
âŚend{code}
Even if your text editor can manage well mixed directionality text,
  you will find editing the above line a bit  confusing.
The reason is that the character following the opening 
  curly brackets is 
  not~âŚtexthebrew{×} but rather âŚtexthebrew{×ž}.
  
As the cursor moves forward beginning at the first character in
  the line, it hits the opening curly brackets, and then you may
  expect it to proceed to the adjacent 
  letter âŚtexthebrew{×}.
This so called âŚemph{visual} flow is 
  in incorrect. 
The more correct âŚemph{logical} flow prescribes 
  that the cursor should instead ``jump'' to the 
  to the letter âŚtexthebrew{×ž}, which is the first letter of 
  the word âŚtexthebrew{×ž×‘×•×}.

Some editors adhere to the visual flow, others, more modern
  editors, to the logical flow.
But experience shows that both are quite confusing.
  
Our sugared version of the divisioning directives 
  offer a more sane alternative.
You can write instead
âŚbegin{hebrew}
âŚbegin{code}
\Â§ âŚfontspec{Courier New} ×ž×‘×•×
âŚend{code} 
âŚend{hebrew}

To understand why the latter is so much better than the former,
  you need to know a bit about the manner in which âŚUnicode deals with 
  text directionality.
Broadly speaking, characters come
  in three major varieties:
âŚbegin{enumerate}
â€˘ Left-to-right directed characters, including e.g., Latin characters.
â€˘ Right-to-left directed characters, including e.g., 
      characters of the Hebrew
  alphabet.
â€˘ Undirected characters, including the digits 0-9, punctuation characters, 
    and characters such as âŚÂ§, âŚÂ¶, âŚâŁ, and âŚcommandâŁkey{}
    which are not part of specific writing script.
âŚend{enumerate}
âŚUnicode assigns a direction to each line
  according to the first strongly directed character of that line, and then
  proceeds to assigning directionality to subsequences of characters 
    occurring in that line.âŚfootnote{%
The full algorithm is fairly complicated, taking into account
  ``weak'' directionality of some of the undirected characters,
    explicit directionality markers and nested directionality levels;
    details can be found here âŚurl{http://unicode.org/reports/tr9}.}
    
Most text editors follow âŚUnicode's algorithm.
The line 
âŚbegin{code}
âŚtextbackslash{}section\{\fontspec{Courier New} ×ž×‘×•×%
âŚrmâŚttâŚ}
âŚend{code}
will thus be classified as left-to-right, with
  the âŚtexthebrew{×ž×‘×•×} portion classified right-to-left, leading
  to the visual vs.\ logical confusion and to irritating 
  cursor jumps.
  
Further, the fact that the entire line is left-to-right will
   lead text editors such as âŚtexttt{gedit} to place
   the first character of that line at the left most position
   in the window.
This might be confusing even further since the section body will, 
  most likely,
  be classified as right-to-left, and hence will be laid out
  on the screen with the first character at the right-most 
  position.
  
  
âŚbegin{figure}[!htbp]
âŚbegin{center}
	âŚincludegraphics[scale=0.3]{traditional.png}
âŚend{center}
âŚcaption{Using traditional sectioning directive with right-to-left text}
âŚ–{Figure:traditional}
âŚend{figure}
  
Figure~âť{Figure:traditional} depicting the use of âŚtexttt{gedit}
  to compose a Hebrew âŚLaTeX{} document
  may help in visualizing the difficulty.
Line~18 containing the section title is laid out left-to-right,
  despite the fact that the title is written Hebrew, in
  visual discrepancy with lines~19 and on, containing the section body,
  which are laid out right-to-left.
  
In contrast, the sugared version of our document divisioning command
âŚbegin{hebrew}
âŚbegin{code}
\fontspec{Courier New}
\Â§ âŚfontspec{Courier New} ×ž×‘×•×
âŚend{code} 
âŚend{hebrew}
has no left-to-right characters, and hence will be classified 
  as being entirely right-to-left:
The cursor will not jump as it moves 
  across that line.
  
  
Compare Figure~âť{Figure:traditional} with Figure~âť{Figure:sugar}
  in which the sugared version of the âŚverb+\section+ directive is used.
We see that in  Figure~âť{Figure:sugar} âŚemph{all} lines
  are laid out right-to-left.
  
  
âŚbegin{figure}[!hbtp]
âŚbegin{center}
	âŚincludegraphics[scale=0.3]{sugar.png}
âŚend{center}
âŚcaption{Using sugared sectioning directive with right-to-left text}
âŚ–{Figure:sugar}
âŚend{figure}

Â§Â§ Other Useful âŚUnicode Characters
The above sugar replacement for divisioning commands
  does not scale well.
With the exception of mathematical symbols, it is difficult 
  to find reasonable substitutes for âŚUnicode replacements 
  for the majority of âŚLaTeX{} commands.
  
Still, four more âŚUnicode characters are used by âŚunisugar
  as aliases for common âŚLaTeX{} commands:
âŚbegin{enumerate}
â€˘ Code point 2022, the bullet, rendered as âŚâ€˘, is
  yet another name for the âŚverb+\item+ command.
To obtain this item, I typed
âŚbegin{code}
\â€˘ Code point 2022, the bullet, rendered as âŚtextbackslash\â€˘,âŹŽ 
is yet another name for the âŚverb-\verb+\item+- command.âŹŽ
  To obtain this item, I typed:âŹŽ
âŚend{code}
â€˘ Code point 23CE, the return symbol, rendered 
  as~âŚreturnâŁkey is an alias for âŚverb+\\+.
  The âŚverb+\author+ directive of this manuscript was
  typed out as 
âŚbegin{code}
âŚverb+\author{+\\
âŚverb+  Yossi Gil+\\
âŚverb+    âŚthanks{\url{mailto:yogi@cs.technion.ac.il}}+âŚreturnâŁkeyâŹŽ
âŚverb+  âŚnormalsize Department of Computer Science+âŚreturnâŁkeyâŹŽ
âŚverb+  âŚnormalsize The Technion---Israel Institute+\\
âŚverb+                   of Technology+âŚreturnâŁkeyâŹŽ
âŚverb+  âŚnormalsize Technion City, Haifa 32000, Israel+\\
âŚverb+}+
âŚend{code}  
â€˘ Code point 2316 (position indicator), rendered as 
      {\fontspec{DejaVu Sans Mono}\âŚ–}
      is an alias for âŚLaTeX's âŚverb+\label+ command.
  To generate a label for Table âť{Table:divisions},
  I wrote:
âŚbegin{code}
{\fontspec{Courier New}\âŚ–}âŚverb+{Table:divisions}+
âŚend{code} 
â€˘ Code point 261D  (white up pointing index) rendered as 
    {\fontspec{DejaVu Sans Mono}\âť}
    is an alias âŚLaTeX{}'s âŚverb+\ref+ command.
    To reference Table âť{Table:divisions}, I wrote
âŚbegin{code}
   To reference Table {\fontspec{DejaVu Sans Mono}\âť}\{Table:divisions\}, 
   I wrote
âŚend{code} 

â€˘ Code point 2026 (horizontal ellipsis), rendered as \verb+â€¦+, serves as a sugar nickname for 
  \verb+\ldots+, the lower ellipsis command.
  
âŚend{enumerate}
 

Â§Â§ Extended Syntax for Commands
It is futile to try to introduce an pictorial, easy to remember, 
  symbol for each of the
  âŚLaTeX{} commands in ordinary use, or even for a substantial
  portion of these.
As large as it is, the âŚUnicode character repertoire
  simply does not include icons that associated visually with notions
  such as âŚverb-\verb+-, âŚverb+\begin{description}+, etc.
And even if it was, such a large set would be difficult to 
  memorize.
Worse, methods for producing so many characters would be cumbersome.

Thus, you would have to type âŚLaTeX{} commands every so often.
This package offers a slightly better syntax for writing these.
  

First, âŚUnicode's code point 2318, rendered as âŚcommandâŁkey, 
  is used in many computing systems
   to denote the command key. 
With âŚunisugar,the~âŚcommandâŁkey{}
  character can be used as a control sequence
  prefix,
So, instead of writing at the beginning of this document
âŚbegin{code}
âŚverb+\begin{document}+âŹŽ
âŚverb+\maketitle+âŹŽ
âŚverb+\begin{abstract}+âŹŽ
âŚverb+This package provides syntactic sugar+âŚldots
âŚend{code}
I wrote
âŚbegin{code}
âŚcommandâŁkeyâŚverb+begin{document}+âŹŽ
âŚcommandâŁkeyâŚverb+maketitle+âŹŽ
âŚcommandâŁkeyâŚverb+begin{abstract}+âŹŽ
âŚverb+This package provides syntactic sugar+âŚldots
âŚend{code}

Second, âŚunisugar, extends to the usual set of~52 letters (a--z and A--Z)
  âŚUnicode character 2423,
  the open box, which looks like like visible space in its 
  rendering~âŚâŁ.
This character can thus participate in control sequences. 
The intention is that it will serve for separating words
  in the case that your control sequence is composed of 
  several words.
  
 
The names of a large number of  âŚLaTeX{} commands are made 
  from two words.
There are even a dozen or so control sequences whose
  name consists of three words, e.g., âŚverb+\enlargethispage+
  and âŚverb+\addcontentsline+.
Although âŚunisugar does not provide aliases for any of
  these multi-word commands, you can do so yourself.
For example, at the preamble of this document, right after
  âŚverb+\usepackage{unisugar}+, 
I wrote
âŚbegin{code}
âŚcommandâŁkey{}letâŚcommandâŁkey{}useâŁpackage=âŚcommandâŁkey{}usepackageâŹŽ
âŚcommandâŁkey{}useâŁpackageâŚ{xspaceâŚ}âŹŽ
âŚcommandâŁkey{}letâŚcommandâŁkey{}newâŁcommand=âŚcommandâŁkey{}newcommandâŹŽ
âŚcommandâŁkey{}newâŁcommandâŚcommandâŁkey{}%
  unisugarâŚ{âŚcommandâŁkey{}textttâŚ{unisugarâŚ}âŚcommandâŁkey{}xspaceâŚ}âŹŽ
âŚend{code}

Â§Â§ Intermixing Commands with Right-to-Left Text
âŚ–{Section:rtl:commands}
You may not appreciate so much the advantage of 
  typing âŚUnicode's~âŚcommandâŁkey{}
  instead of plain ASCII's~âŚtexttt{âŚtextbackslash}.
Granted, on most keyboards, typing~âŚtexttt{âŚtextbackslash}
  would be easier.
  
However, the nice property of âŚcommandâŁkey{} is that it directionally 
  neutral.
You would have to think about a sentence 
  involving at least one âŚLaTeXâŚ control sequence
  and/or a slash character to understand what I mean.
You would not have to think so hard,
  since, this last sentence, namely,
âŚbegin{quote}
``âŚemph{You would have to think about a sentence 
  involving at least one âŚLaTeX{} control sequence
  and/or a slash character to understand what I mean.}''
âŚend{quote} 
is a perfect example, since
  it is a sentence which involves a âŚLaTeX{} control sequence,
  since the âŚLaTeXâŚ logo is printed out using
  the ``âŚverb+\LaTeX\+" control sequence.
Further, this sentence includes the slash character.

Typing this sentence in English is fairly straightforward. 
âŚbegin{code}
You would have to think about a sentence 
  involving at least one âŚverb+\LaTeX\ +control sequence
  and/or a slash character to understand what I mean.
âŚend{code}

Let me translate this sentence into Hebrew for you. 

âŚbegin{hebrew}
×™×”×™×” ×˘×ś×™×š ×ś×—×©×•×‘ ×˘×ś ×ž×©×¤× ×”×ž×›×™×ś ×ś×¤×—×•×Ş ×¤×§×•×“×Ş ×‘×§×¨×” ××—×Ş 
×©×ś âŚLaTeXâŚ ×•/××• ×ś×•×›×ˇ×ź ×‘×›×“×™ ×ś×”×‘×™×ź ×ś×ž×” ××&nbsp;×™ ×ž×Ş×›×•×•×ź.
âŚend{hebrew}


What input does âŚLaTeX{} require in order to produce the above? 
Using backslashes and traditional âŚLaTeX{} notation I would have written
âŚbegin{hebrew}
âŚbegin{code}âŚfontspec{Courier New}
×™×”×™×” ×˘×ś×™×š ×ś×—×©×•×‘ ×˘×ś ×ž×©×¤× ×”×ž×›×™×ś ×ś×¤×—×•×Ş ×¤×§×•×“×Ş ×‘×§×¨×” 
××—×Ş âŹŽ 
×©×ś 
âŚverb+\LaTeX\+ 
×•/××• ×ś×•×›×ˇ×ź ×‘×›×“×™ ×ś×”×‘×™×ź ×ś×ž×” ××&nbsp;×™ ×ž×Ş×›×•×•×ź.
âŚend{code}
âŚend{hebrew}

Figure~âť{Figure:gedit-mixed-traditional} shows what this might look on
  an actual text editor.
This may not seem too complicated, but a closer look 
  would reveal that the production and inspection of this âŚLaTeX{} 
  is hindered by two or three annoying hidden issues.


âŚbegin{figure}[!htbp]
âŚbegin{center}
%Produced from:
%
%
%Let me translate this sentence into Hebrew for you.
%
%âŚbegin{hebrew}
%×™×”×™×” ×˘×ś×™×š ×ś×—×©×•×‘ ×˘×ś ×ž×©×¤× ×”×ž×›×™×ś ×ś×¤×—×•×Ş ×¤×§×•×“×Ş ×‘×§×¨×” ××—×Ş 
%×©×ś âŚLaTeX\ ×•/××• ×ś×•×›×ˇ×ź ×‘×›×“×™ ×ś×”×‘×™×ź ×ś×ž×” ××&nbsp;×™ ×ž×Ş×›×•×•×ź.
%âŚend{hebrew}
%
%
%
%
âŚincludegraphics[scale=0.3]{gedit-mixed-traditional.png}
âŚend{center}
âŚcaption{A Hebrew sentence containing a control sequence (without âŚunisugar).}
âŚ–{Figure:gedit-mixed-traditional}
âŚend{figure}


First, the two backslash characters in the figure are not really 
  âŚemph{back}slashes. 
The reason is that Hebrew is written right-to-left, and the âŚtextbackslash{} 
  character leans in the text direction, and should therefore be considered 
  a âŚemph{forward} slash in this context.
  
The second annoyance is the distinction between the 
  two occurrences of this character:
  the first is at the beginning of the control sequence âŚverb+\LaTeX+,
  denoting that the control sequence starts at that point.
The second occurrence is at the end of the same control sequence,
  with the purpose of
  escaping the space that follows.
This escape is required to prevent the control sequence from consuming
  the spaces that follow.
  
The distinction between the first and which is the last ``backslash''
  is clear in the case that the enclosing sentence is 
  written left-to-right.
 But, both humans and text processing devices may be confused
  when the enclosing sentence is right-to-left.

{âŚsmallâŚtextsl
(There is yet a third difficulty in the above sentence which I will 
  not address here.
  The English forward slash character is used in Hebrew for separating the day, 
  month and 
  year components of a date. 
  This is natural, since dates involve digits, and these are written,
    even in Hebrew, left to right.
  Most Hebrew authors extrapolate this convention to the separation of
  Hebrew words by a ``forward'' (left-leaning) slash as in the phrase
  âŚtexthebrew{âŚfontspec{Courier New}%
  ×•/××•
  }%
  in the above. 
  Other authors would right this phrase with the slash leaning in
    the text direction, i.e., 
     âŚtexthebrew{âŚfontspec{Courier New}%
  ×•âŚtextbackslash{}××•
  }%
  )}
  
The fact that the âŚcommandâŁkey{} character does not 
  lean neither left nor right,
  takes care of the first annoyance.
  
The remedy for the second is simpler---use a pair of curly brackets
  to mark the end of the control sequence.
  
Thus, with âŚunisugar, I would write:
âŚbegin{hebrew}
âŚbegin{code}
âŚfontspec{Courier New}
×™×”×™×” ×˘×ś×™×š ×ś×—×©×•×‘ ×˘×ś ×ž×©×¤× ×”×ž×›×™×ś ×ś×¤×—×•×Ş ×¤×§×•×“×Ş ×‘×§×¨×” 
××—×Ş âŹŽ ×©×ś 
âŚsetLTRâŚverb+{}+LaTeXâŚcommandâŁkey{}âŚsetRTL
×•/××• ×ś×•×›×ˇ×ź ×‘×›×“×™ ×ś×”×‘×™×ź ×ś×ž×” ××&nbsp;×™ ×ž×Ş×›×•×•×ź.
âŚend{code}
âŚend{hebrew}

Figure~âť{Figure:gedit-mixed-traditional} shows this sugared input as it
  appears in the gedit editor.
We can see that the entire control sequence phrase 
  is written left-to-right, with the escape character
  first, and the pair of curly brackets last.
  

âŚbegin{figure}[!htbp]
âŚbegin{center}
%
%Produced from:
%
%Let me translate this sentence into Hebrew for you.
%
%âŚbegin{hebrew}
%×™×”×™×” ×˘×ś×™×š ×ś×—×©×•×‘ ×˘×ś ×ž×©×¤× ×”×ž×›×™×ś ×ś×¤×—×•×Ş ×¤×§×•×“×Ş ×‘×§×¨×” ××—×Ş 
%×©×ś {}LaTeXâŚ ×•/××• ×ś×•×›×ˇ×ź ×‘×›×“×™ ×ś×”×‘×™×ź ×ś×ž×” ××&nbsp;×™ ×ž×Ş×›×•×•×ź.
%âŚend{hebrew}
%
%
%
%
%
%
âŚincludegraphics[scale=0.3]{gedit-mixed-sugar.png}
âŚend{center}
âŚcaption{A Hebrew sentence containing a control sequence (with âŚunisugar).}
âŚ–{Figure:gedit-mixed-sugar}
âŚend{figure}

Evidently, mixed directionality text is slightly easier and clearer.  
But we can do even better, if we allow Hebrew characters
in control sequences. 
This is carried out by (a yet to be published) another package,
  named âŚtexttt{sukkar}, which, relying on âŚunisugar does precisely this
  and more.
Package âŚtexttt{sukkar} also translates many common âŚLaTeX{}
  commands to Hebrew, and since juxtaposition of words looks
  weird in Hebrew, it uses the~âŚâŁ{} Unicode character 
  to separate words.
With âŚtexttt{sukkar} 
  one can write, e.g., 
âŚbegin{hebrew}âŚcodefontâŚcommandâŁkeyâŚfontspec{Courier New}
×˘×©×”âŚâŁ{}×›×•×Ş×¨×Ş
âŚend{hebrew}
  instead of âŚverb+\make_title+.
  
  
Â§ History
âŚbegin{description}
â€˘[Version 0.9] Initial release.
â€˘[Version 0.91] Placed under LPPL.
â€˘[Version 0.92] Added U+2026 HORIZONTAL ELLIPSIS, as nickname for âŚverb+\ldots+.
âŚend{description}
    

Â§ Acknowledgements
Will Robertson advised gave the advise of 
	using âŚXeLaTeX{} and âŚtexttt{polyglossia}
  to circumvent a bug of âŚtexttt{utf8x}.
I pay tribute to Bruno Le Floch and Martin Scharrer who together 
  devised the mechanism that made it possible to 
  define a command which takes the rest of the line as argument.
Martin Scharrer and Will Robertson encouraged me to work on this package.
Vafa Khalighi  
	devotion to bidirectional text processing with âŚLaTeX{}
  was truly inspirational.
  




âŚend{document}
</pre></body></html>