7

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?

0

3 Answers 3

6

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

1
4

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

2
  • 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.
1
  • However, it seems that \cbcolor dose not work in xechangebar. And \changebarsep of package changebar does not work when changebar across pages .
    – lyl
    Jun 11, 2021 at 5:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .