Is there a way of using changebars with XeLaTeX?

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:

example


  • 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.

Tags:

Xetex