3

In passing from the code

\item $\Sp^\Sigma(\C,K)$ has a left proper, cellular model category
structure, called the \textbf{projective model structure}, where a map
$f\colon X\rightarrow Y$ in $\Sp^\Sigma(\C)$ is a weak
equivalence (resp., a fibration), if $f_n\colon X_n\rightarrow Y_n$ is
a weak equivalence (resp., a fibration) in $\C$, for all $n\in\bbN$.

to the code

\item $\Sp^\Sigma(\C,K)$ has a left proper, cellular model category
structure, called the \textbf{projective model structure}, where a map
$f\colon X\rightarrow Y$ in $\Sp^\Sigma(\C,K)$ is a weak        % ← added ",K"
equivalence (resp., a fibration), if $f_n\colon X_n\rightarrow Y_n$ is
a weak equivalence (resp., a fibration) in $\C$, for all $n\in\bbN$.

where the only difference is in the marked K, I get the following Latex error at line 1, when trying to compile my document:

! \OML/cmm/m/it/10.95 Y$ \OT1/cmr/m/it/10.95 in $[][]\OT1/cmr/m/n/10.95 (\U/eus/m/n/10.95 C\OML/cmm/m/it/10.95 ; K\OT1/cmr/m/n/10.95 )

This makes absolutely no sense to me and I can not find much help on-line. Note also that, if I leave the problematic piece of code unaltered and keep on typing other stuff, I have no problem in compiling (even when I add a lot of code).

Upon seeing some comments, let me try to clarify the problem better. The following code uses all the packages I am using and compiles with no problems

\documentclass[11pt]{amsart}

\usepackage[utf8]{inputenc}  % to allow unicode in source

\pagestyle{plain}

%% AMS and other general math packages:
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\let\amssquare\square
\usepackage{dsfont}
\usepackage{marvosym}
\usepackage{mathpartir}
\usepackage{mathtools} % for \mathclap, used to center extra-wide diagrams.
\usepackage{stmaryrd}

%% General style packages:
\usepackage{xcolor}
\definecolor{darkgreen}{rgb}{0,0.45,0}
\definecolor{darkred}{rgb}{0.75,0,0}
\definecolor{darkblue}{rgb}{0,0,0.6}
\usepackage[colorlinks,citecolor=darkgreen,linkcolor=darkred,urlcolor=darkblue]{hyperref}
\usepackage{breakurl}
\usepackage[mathscr]{eucal}
\usepackage{enumerate} % for customising enumerated listsEDIT:
\usepackage[capitalize]{cleveref}



%\parskip = 0.1in
%\parindent = 0.0in

%% For syntax of type theory:
\usepackage{mathpartir}

%% Graphics and diagrams packages:
\usepackage{tikz}
\usetikzlibrary{arrows}
\usepackage[all]{xy}
\xyoption{2cell}
\xyoption{curve}
\UseTwocells

\newcommand{\Sp}{\mathsf{Sp}}
\newcommand{\C}{\mathscr{C}}
\newcommand{\bbN}{\mathbb{N}}


\begin{document}
\begin{itemize}
\item $\Sp^\Sigma(\C,K)$ has a left proper, cellular model category structure, called the \textbf{projective model structure}, where a map $f\colon X\rightarrow Y$ in $\Sp^\Sigma(\C,K)$ is a weak equivalence (resp., a fibration), if $f_n\colon X_n\rightarrow Y_n$ is a weak equivalence (resp., a fibration) in $\C$, for all $n\in\bbN$.
\end{itemize}
\end{document}

This is the exact same code I am using in my problematic file and that does not allow me to compile. If, in my problematic file, I replace the second occurrence of

$\Sp^\Sigma(\C,K)$

with

$\Sp^\Sigma(\C)$

I do not generate any error. Here is a screenshot of the error I get in texmaker upon compiling. (The command \end{document} is present in the file, I just could not screenshot it). Again, the only thing that causes texmaker not to compile is adding that extra ,K. I am unable to get the error from the log file, as was suggested in the comment.

19
  • 1
    please show the actual error message, copied from the log file in a code {} (not quote (>) section so line ends preserved Commented Jun 25, 2017 at 15:13
  • 1
    If LaTeX gives an error or some other message (from your snippet is absolutly not clear if you really have an error) the source is the code. So show more info instead of claiming that it can't be ... Commented Jun 25, 2017 at 15:14
  • 1
    the edit with all the packages is sadly no use at all, please fix the example and add some text text that makes the error that you are asking about Commented Jun 25, 2017 at 15:18
  • 2
    Here's my guess from looking at the screenshot: what you have is not an error but just a warning (about an overfull box), but your editor/IDE (Texmaker) has a bug in its parser, that makes it naively treat any line that starts with ! as an error. In which case your best bet here would be to just reword the text and/or do something else to fix the overfull box, or else increase the line width of error messages so that the line no longer starts with a ! Commented Jun 25, 2017 at 15:54
  • 1
    @DavidCarlisle Yes I was typing the above comment at the same time you were editing the answer :-) That's my guess too, that Texmaker is confused by the ! in the warning message. But thanks to your answer I know why there's a ! in the error message :-) Commented Jun 25, 2017 at 15:55

3 Answers 3

7

It's hard to answer as no code producing the message was provided and the fragments have undefined command errors however the nearest I can get to an example is

 \documentclass[11pt]{amsart}

\usepackage[utf8]{inputenc} 
\pagestyle{plain}

%% AMS and other general math packages:
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\let\amssquare\square
\usepackage{dsfont}
\usepackage{marvosym}
\usepackage{mathpartir}
\usepackage{mathtools} 
\usepackage{stmaryrd}

%% General style packages:
\usepackage{xcolor}
\definecolor{darkgreen}{rgb}{0,0.45,0}
\definecolor{darkred}{rgb}{0.75,0,0}
\definecolor{darkblue}{rgb}{0,0,0.6}
\usepackage[colorlinks,citecolor=darkgreen,linkcolor=darkred,urlcolor=darkblue]{hyperref}
\usepackage{breakurl}
\usepackage[mathscr]{eucal}
\usepackage{enumerate} 
\usepackage[capitalize]{cleveref}

\usepackage{mathpartir}

%% Graphics and diagrams packages:
\usepackage{tikz}
\usetikzlibrary{arrows}
\usepackage[all]{xy}
\xyoption{2cell}
\xyoption{curve}
\UseTwocells
\input{diagxy}
\def\Sp{SSSS}
\def\C{C}
\def\bbN{\mathbb{N}}
\addtolength\textwidth{-18pt}

\begin{document}
\begin{itemize}
\item $\Sp^\Sigma(\C,K)$ has a left proper, cellular model category
\mbox{structure,} called the \textbf{projective model structure}, where a map
$f\colon X\rightarrow Y$ in $\Sp^\Sigma(\C,K)$ is a weak
equivalence (resp., a fibration), if $f_n\colon X_n\rightarrow Y_n$ is
a weak equivalence (resp., a fibration) in $\C$, for all $n\in\bbN$.
\end{itemize}
\end{document}

which produces

Overfull \hbox (3.40347pt too wide) in paragraph at lines 46--51
[]$\OML/cmm/m/it/10.95 SSSS[]\OT1/cmr/m/n/10.95 (\OML/cmm/m/it/10.95 C; K\OT1/c
mr/m/n/10.95 )$ has a left proper, cel-lu-lar model cat-e-gory []

which is not an error message, it is a warning message saying that the line ...cellular model category... is 3pt too wide to fit in the specified line width.


The full box output for that paragraph includes

.....\OMS/cmsy/m/n/10.95 !
.....\penalty 500
.....\glue(\thickmuskip) 3.04161 plus 3.04161
.....\OML/cmm/m/it/10.95 Y

So if you had posted the log you would see there is no error, but your editor (you have not said which that is) is confused by the ! (which is the right arrow) and displaying this box output as an error message.

6
  • Thanks for the answer. Edited original post. Hopefully this will help. Commented Jun 25, 2017 at 15:35
  • 1
    @MarcoVergura showing screenshots of an editor isn't a lot of help to be honest and there still is no posted example that makes the warning. Commented Jun 25, 2017 at 15:47
  • Thanks! You were right, the .pdf file was produced anyway upon compiling, but texmaker was giving me an error due to that !. I "fixed" that by moving things around in the code. Commented Jun 25, 2017 at 15:57
  • 1
    @MarcoVergura glad you got it working, but next time please provide a complete example:-) Commented Jun 25, 2017 at 15:59
  • 2
    @MarcoVergura you should report this as a bug in texmaker Commented Jun 25, 2017 at 16:28
11

This is a bug in Texmaker, which I can reproduce (with the defaults, i.e. without the config changes that I mention later below) with the following input file:

\documentclass{article}
\begin{document}
abcdefghijklmnopqrstuvw $X \rightarrow Y$ and lots more text here: the quick~brown~fox jumps over the lazy dog.
\end{document}

error screenshot

This is what happens: when TeX sets an overfull box, it writes out relevant information to the terminal. This gets wrapped to the default line length, and in this case one of the lines starts with a !. Texmaker gets confused by this, as it naively considers any line starting with ! as an error.

This is a bug to be reported to Texmaker.


Until TeXmaker fixes it, and for independent reasons, here's my suggestion (and the first thing I did after installing TeX Live 2017): increase the line lengths to prevent such line wrapping. Here's how / what I did:

  1. In a terminal, run kpsewhich texmf.cnf to find the location of your texmf.cnf file. For me it was /usr/local/texlive/2017/texmf.cnf. Edit that file as root. (If you can't edit as root, you can also create your own texmf.cnf and update the TEXMFCNF variable to point to your file.)
  2. Add the following lines to the texmf.cnf:

    % We must have error_line < 255 and half_error_line < error_line - 15
    max_print_line=10000
    error_line=254
    half_error_line=238
    

This gives you as long lines and as much context as possible. For example, here's the warning from the above input, by default:

Overfull \hbox (8.15326pt too wide) in paragraph at lines 3--4
[]\OT1/cmr/m/n/10 abcdefghijklmnopqrstuvw $\OML/cmm/m/it/10 X \OMS/cmsy/m/n/10 
! \OML/cmm/m/it/10 Y$ \OT1/cmr/m/n/10 and lots more text here: the quick brown 
fox

and here's the same warning after the change:

Overfull \hbox (8.15326pt too wide) in paragraph at lines 3--4
[]\OT1/cmr/m/n/10 abcdefghijklmnopqrstuvw $\OML/cmm/m/it/10 X \OMS/cmsy/m/n/10 ! \OML/cmm/m/it/10 Y$ \OT1/cmr/m/n/10 and lots more text here: the quick brown fox

Similarly here are example font info lines from a log file, before and after:

</usr/local/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb
></usr/local/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb>
</usr/local/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi8.pfb></
usr/local/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></us
r/local/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/l
ocal/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/lo
cal/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/symbols/msbm10.pfb>

(note the random breaks in the later lines) versus

</usr/local/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb></usr/local/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb></usr/local/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi8.pfb></usr/local/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/local/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/local/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/local/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/symbols/msbm10.pfb>

Perhaps not a big difference in this case, but try it and see—I vastly prefer the non-wrapped lines (your terminal may wrap them for display, but you'll be able to tell the lines apart when you say copy-paste the log).

3
  • Yep, the wrapping makes really interesting parsing *tex output. Would be very nice if there were a way of having no wrapping, and semantically reasonable new lines (each font, each file open, etc.)
    – Rmano
    Commented Jun 25, 2017 at 18:13
  • @Rmano I think max_print_line=10000 practically means no wrapping (maybe it can be increased even more). But IMO the tragedy is that despite TeX being one of the best-documented and stable programs in existence, we've ended up in a state where almost everyone is more likely parse TeX output rather than simply adding hooks into the program to tweak it or add more logging in the way they'd like. (The latter was intended by Knuth to be easy, but has ended up being hard in our current ecosystem.) Commented Jun 25, 2017 at 18:20
  • you are a genius! thank you very much! Commented Jun 3 at 4:07
3

(too long for a comment, hence posted as an answer)

I am unable to replicate the error message you've reported, using the code shown below. Please tell us which document class you use and if you use any special math-related packages.

\documentclass{article}
\usepackage{amssymb} % for "\mathbb" macro
\providecommand\bbN{\mathbb{N}}
\providecommand\Sp{\mathsf{Sp}}
\providecommand\C{\mathcal{C}}

\begin{document}
\begin{itemize}
\item $\Sp^\Sigma(\C,K)$ has a left proper, cellular model 
category structure, called the \textbf{projective model structure}, 
where a map $f\colon X\rightarrow Y$ in $\Sp^\Sigma(\C,K)$ is a
weak equivalence (resp., a fibration), if $f_n\colon X_n\rightarrow Y_n$ 
is a weak equivalence (resp., a fibration) in $\C$, for all $n\in\bbN$.
\end{itemize}
\end{document}
1
  • Thanks for the answer. Edited original post. Hopefully this will help. Commented Jun 25, 2017 at 15:35

You must log in to answer this question.

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