Take the tour ×  Rather than the default placing of \section and
\subsection on their own line, I'd like to place them on the
right margin (in a Right To Left document).  My current usage
looks like this:   \newfontfamily\hebrewfont{David CLM}   Which
gives:  enter image description here  Instead, I want to achieve
this:  enter image description here  It is not exactly clear in
the image but the bold text should be on the right margin.
Ideally I would like each \subsection to also include the
current \section when it's printed, but if there is a \section
without any \subsections, then only the \section should be
displayed.  share|improve this question add comment  1 Answer
up vote 2 down vote accepted  The titlesec package is brilliant
for doing all sorts of fancy headings. It plays well with bidi
provided that you load titlesec first (so in this case that
means before polyglossia). So a partial answer is
\newfontfamily\hebrewfont{New Peninim MT} % I don't have David!
which, when used with non-starred su