4

How does one deal, in general, with packages that do not play well with each other, like for example, {eepic} and {showframe}:

\documentclass{report}

\usepackage{eepic}
\usepackage{showframe}

\begin{document}
This is a test.
\end{document}

In the case of this specific one, what would be a possible way to run them together?

5
  • 3
    Since the package incompatability or bad behaviour is really dependant on which packages you are using (and loading order) I doubt there is a "general way" to deal with them
    – Mane32
    Commented Feb 18 at 4:14
  • 2
    Since showframe is intended for purely diagnostic purposes when configuring page layouts, in this case, you'd drop showframe but, as @Mane32 noted, there's no general solution.
    – cfr
    Commented Feb 18 at 4:41
  • 2
    As others have mentioned it depends. Some might be made compatible by saving the offending command and redefining etc. In your case I would drop the eepic package solely because of its maintenance stage (1988) and the fact that it redefines many commands. It will fail with PGF/TikZ also, just browsing its documentation quickly.
    – yannisl
    Commented Feb 18 at 6:13
  • I suppose "learn TeX programming, read the source code of the packages, and fix them" would count as a general way, but that is a rather trivial statement to make.
    – user202729
    Commented Feb 19 at 7:05
  • There has already been various takes for a general question e.g. incompatibility - Two conflicting packages in one document — doable? - TeX - LaTeX Stack Exchange
    – user202729
    Commented Feb 19 at 7:08

1 Answer 1

7

There really isn't any reason to use eepic these days unless drawing donkeys or unicorns

However the package copied the definition of \line as it was in the 1980s and added its extension but that undoes any changes made in the last 30 years. The code below makes the comment in the package true again, by adding the eepic extension to the current version of \line (probably other picture mode commands would need similar extensions but this is enough for your example)

\documentclass{report}
\errorcontextlines1000

\usepackage{eepic}
\makeatletter
%% Replace original \line. Only change is to call \@ssline instead
%% of \@sline. For description, see latex.tex
\def\line(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
  \@defaultunitsset\@linelen{#3}\unitlength
    \ifnum\@xarg =\z@ \@vline
      \else \ifnum\@yarg =\z@ \@hline \else \@ssline\fi
  \fi}
\makeatother
\usepackage{showframe}

\begin{document}
This is a test.
\end{document}

You must log in to answer this question.

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