Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

The complexity package uses the \typeout command to print a banner when the package is loaded.

What is the correct way to disable the banner (other than editing the source code of the package)?


MWE:

\documentclass{article}
\usepackage{complexity}
\begin{document}$\P = \NP$\end{document}

Compile with "pdflatex". During the compilation, you will see something like this:

  +----------------------------------------------+
    complexity LaTeX package 
    version: 
    author: Chris Bourke (cbourke@cse.unl.edu) 
  +----------------------------------------------+
share|improve this question
add comment

2 Answers 2

up vote 7 down vote accepted

There's no correct way, I'm afraid:

%  Changes made (.76 -> .80)
%   -Added a cool message using \typeout!

You can suppress the message with the following trick

\let\latextypeout\typeout
\def\typeout#1{\let\typeout\latextypeout}
\usepackage{complexity}

Since \typeout is almost the first instruction in complexity.sty, this will disable printing the "cool message" and redefine \typeout to the original meaning.

share|improve this answer
    
Great idea, thanks! –  Jukka Suomela Sep 30 '12 at 20:42
add comment
\let\savedtypeout\typeout
\def\typeout#1{}
\usepackage{complexity}
\let\typeout\savedtypeout
share|improve this answer
    
Is this kind of approach "safe"? Do I lose any warnings and/or errors this way? –  Jukka Suomela Sep 30 '12 at 20:32
    
No it only affects \typeout that are actually executed during the package load, any \typeout that are embedded in commands defined by the package will execute the restored normal definition when they are run. It would be possible for a package to save the definition of \typeout active when it was loaded and use that saved definition (rather than \typeout itself) in commands, but that is unlikely in general and does not happen in the case of this package (I just looked:-) –  David Carlisle Sep 30 '12 at 20:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.