# Is there a way of using changebars with XeLaTeX?

Is there any way of using the changebars package with XeLaTeX?

The current release of changebars doesn't support a xetex option. Almost three years ago there was a discussion on comp.text.tex about a patch to the package to support XeTeX, but nothing seems to have come of it; there was a similar question on the xetex mailing list last year, which seems to have gone unanswered.

Is there a recommended alternative to the changebars package which works with XeTeX, or any samizdat patches to it floating around?

Regrettably, changebar uses its own driver code and doesn't have any for dvipdfm or related drivers, which includes xdvipdfmx, used by XeTeX. As such, the answer here is 'no'.

You can achieve a similar effect using the mdframed package:

\documentclass{article}
\setlength{\parindent}{0sp}
\usepackage{mdframed}
\newmdenv[
topline=false,
bottomline=false,
rightline=false,
leftmargin=-11pt,
linewidth=1pt
]{changebars}

\begin{document}

In London, also, on Saturday night there was a thunderstorm, and my brother reached Waterloo in a cab.

\begin{changebars}
On the platform from which the midnight train usually starts he learned, after some waiting, that an accident prevented trains from reaching Woking that night.
\end{changebars}

The nature of the accident he could not ascertain; indeed, the railway authorities did not clearly know at that time.

\end{document}


Result:

• As of today, Dec 31, 2018, the changebar package now supports a xetex driver
• Prior to this (and after the time the last few answers here were posted), a dedicated package for this very same purpose xechangebar was available.