3

Why does the following example work with report, but not with scrreprt:

\documentclass{scrreprt}
\usepackage{shdoc}

\begin{document}
    \begin{sh}
        \begin{shbox}
            \shline{}{Test}
        \end{shbox}
    \end{sh}
\end{document}

Fun fact: I have a class based on scrreprt which compiles this example (really works), but there is a printed out "none" before the box.

  • I hve a version of shdoc from 2015 on my machine, which does some cray stuff, i.e. using its own commands before they are defiend. Something like that should not happen. – Johannes_B Mar 30 '17 at 16:03
  • @Johannes_B Version 2016/09/04 v2.1b seems to have solved these but still has other issues. – Schweinebacke Mar 30 '17 at 16:16
4

This is a bug in the package shdoc. It uses

\ifthenelse{\f@size<6}{%

This is an integer comparison but \f@size isn't an integer always. You get the same error with the standard classes, if you use option 11pt:

\documentclass[11pt]{report}
\usepackage{shdoc}

\begin{document}
    \begin{sh}
        \begin{shbox}
            \shline{}{Test}
        \end{shbox}
    \end{sh}
\end{document}

There are other comparisons like this. And also there are comparisons like

\ifnum\value{shlinenumber}<10%

which are at least dangerous. Here the scanning of number 10 should be terminated, e.g. using \relax.

There are also some missing % after { and some not needed % after macros at line ends I do not like. But maybe they aren't problems. I even found an empty line in \shread. But I'm not sure whether or not this is an intended paragraph or not.

You should report the bugs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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