2
votes
2answers
130 views

Strange errors while writing a package

This short document: \documentclass[a4paper]{report} \usepackage{gnu} \begin{document} \end{document} with the following package: %!TEX encoding = UTF-8 Unicode \def\fileversion{2.7} ...
3
votes
1answer
29 views

How can I control which file errors are reported in?

Here is a class that can generate errors in two ways. It yields an error unless given one of two options, and also it has a command that always yields an error. \NeedsTeXFormat{LaTeX2e} ...
6
votes
1answer
155 views

'Unknown option' for my own package

I create a package: one common file that includes others. In common package file (russian_post.sty) I define options: \DeclareOption{times}{\@seriffalse} \DeclareOption{landscape}{\@lscapetrue} ...
3
votes
1answer
84 views

bug in listings package?

It seems as if the listings package can not be loaded after all other packages using \AtBeginDocument \documentclass[]{scrbook} % \AtBeginDocument{\RequirePackage{listings}} \begin{document} ...
9
votes
1answer
223 views

How to raise a LaTeX warning from within Lua code?

I want to raise a warning from within Lua code. With advice from the LuaTeX wiki and LaTeX 2𝜀 for class and package writers, I arrived at the following (working) solution: \documentclass{article} ...
7
votes
1answer
88 views

Error line inside a package

I've created my own package, but, when I use it in a new document, and pdflatex find an error using a custom command (defined in my own package), it shows me only the error line where this command was ...
6
votes
4answers
371 views

Signalling error in “expandable context”

I'm reviewing a few old macros of mine to make them fully expandable. One of the macros takes one argument, which should either be a two-digit or a four-digit integer (>1955). The macro then converts ...
13
votes
3answers
915 views

How can I word-wrap LaTeX warning/error output?

This question led to a new package: hardwrap In writing error messages and warnings for a package/class, I find it a pain to manually insert \MessageBreaks so that words don't get cruelly ...