# Suppress bidi's logo when using polyglossia

This is obviously undesirable when composing a document meant to be viewed by others, whether a letter to one's coworkers or an exam form for one's students.

However, suppressing the logo proved challenging, and Google is (currently) no help.

This is what I currently know:

• There's a new option in bidi for generating a logo. From bidi.sty:

\newcommand*{\@bidi@inslogo@}{\insert\@bidi@copyins@{\@bidi@logo@}}
\newcommand*{\@bidi@logo@hb@xt@}{%
\if@RTLmain
\hboxR to
\else
\hboxL to
\fi
}
\newcommand*{\@bidi@logo@}{\@bidi@logo@hb@xt@\textwidth{\hss\LRE{\bfseries Typeset by the \textsf{bidi} package}}}

• If one calls bidi directly, I suspect (but I'm really not sure) that setting \usepackage[logo=off]{bidi} might be enough to suppress that message. However, if using polyglossia, one cannot set the flag either way.

• It's possible to suppress the logo by adding the following to the preamble, after \usepackage{polyglossia}:

\makeatletter
\let\@bidi@logo@\@empty \let\@bidi@inslogo@\@empty
\makeatother

• it uses \insert really? in latex, that's odd.. (the redefinition looks safe enough) – David Carlisle Jan 24 '18 at 15:50
• Have you tried \PassOptionsToPackage{logo=off}{bidi}? – Skillmon Jan 24 '18 at 16:17
• Yeah. "Why" was my way of saying I think it has no place in an open-source typesetting engine. Surely when undocumented, without returning a comment on proper suppression. – Jonathan Y. Jan 24 '18 at 17:07
• @JonathanY. as to "why", see github.com/tex-xet/bidi/issues/60. – BlackBird Jan 24 '18 at 17:59
• As to the “why” in that link, I'd like to point out I've never ever copied a single line of bidi. I'm basing my work on rlbabel (by Braams and Lavva), which has been part of babel for 20 years. I considered the possibilty of basing my work on bidi (crediting its author, of course, as I usually do), but for several reasons I finally discarded the idea -- one of them is I'm too lazy to read the bidi code. But IMHO, even if I had copied anything, there is no reason to penalize bidi users. – Javier Bezos Jan 27 '18 at 13:15

As long as you load bidi after loading polyglossia but before using any polyglossia commands that would load it as well (essentially any language setting commands), you can pass the logo=off option to bidi.

\documentclass{article}

\usepackage{polyglossia}
\usepackage[logo=off]{bidi}

\setmainlanguage{english}
\setotherlanguage{hebrew}

\newfontfamily\hebrewfont[Script=Hebrew]{David CLM}

\begin{document}

\begin{english}
Hello
\end{english}
\begin{hebrew}
שלום
\end{hebrew}
\end{document}

## Which approach is preferred?

As you mention in the comments, passing the option to bidi explicitly either via the method here or using \PassOptionsToPackage will fail with earlier versions of the package, whereas redefining \@bidi@inslogo@ will not. So if you have documents that might be compiled on different machines/distributions, the redefinition approach is clearly better.

As for using \PassOptionsToPackage vs. loading bidi immediately after polyglossia, the difference is probably just one of taste. Since the \PassOptionsToPackage can be anywhere in the loading order prior to loading polyglossia, it's slightly simpler to use that method.

• Thank you. Since the question also touches on the 'correct' way of performing this suppression, would you mind elaborating on (why) is this more/less robust than the approach using \PassOptionsToPackage or the redefinition? One thing I can already observe is that both of the first two options throw an error when bidi doesn't recognize the option logo (such as with old--and perhaps future--versions), while the redefinition doesn't. On the other hand, it would fail if the maintainer changed how the logo is generated... – Jonathan Y. Jan 24 '18 at 20:49
• Another possibility, if explicitly loading bidi is inconvenient, is to type \makeatletter\let\@bidi@inslogo@\@empty\makeatother just before \begin{document}. But probably \PassOptionsToPackage{logo=off}{bidi} before loading polyglossia is better. – egreg Jan 24 '18 at 22:09
• You may also want to set pdfinfo=off to avoid bidi clobbering the pdf's metadata (creator and producer). – Bruno Le Floch Jan 26 '18 at 14:23

You can use the macro \PassOptionsToPackage{<options>}{<package>} to pass options to a package which is loaded inside another package or a class. It is important to do so before the package is loaded.

With this you can use \PassOptionsToPackage{logo=off}{bidi} prior to \usepackage{polyglossia} which should solve the issue.