6

I am using WinEdt 10 (64 bit). Today, I observed a strange behavior that I cannot understand. I would appreciate if anyone could explain why parts of my text would disappear due to a grammatical error in my text!

When I compile my text that has a grammatical error at the end of the last sentence, parts of my text disappears in the output pdf (the figure below shows a snapshot of my latex file with a duplicate word "to" at the end and its pdf output which is missing parts of its second line): enter image description here

enter image description here

When I fix the grammatical error by deleting the duplicate word "to", the disappeared part shows up! Can anyone understand why winedt/latex behaves this way?

enter image description here

enter image description here

For clarification: Lines in pdf snapshots are end-of-page and header lines, so they are not parts of the text.

27
  • 1
    Can you make this happen with only that paragraph in question, plus a few packages? Could you paste that corresponding tex code, instead of giving us screen shots?
    – Teepeemm
    Mar 20, 2018 at 2:41
  • 1
    When I delete any other parts of the text, this does not happen! So I couldn't produce what you ask.
    – Salivan
    Mar 20, 2018 at 3:18
  • 1
    What compiler are you using? Can you compile your document using command line, instead of WinEdt? Is the result the same?
    – user139954
    Mar 20, 2018 at 3:29
  • 3
    Did you ever find out what's the problem? I got it and can't figure out what is going on. This must be the most ridiculous bug I've seen with LaTeX so far! I'm using MiKTeX 2.9.5700 on Win7 and it's impossible to find a MWE. Only a document that has the same exact spacing causes MiKTeX to fail; it outputs a line with only the first word, and the rest of the line seems to have vanished far to the right beyond the page margin.
    – user21820
    May 12, 2018 at 12:28
  • 2
    No, I could not figure out the reason. I had to change the spacing a bit to avoid that. But now, whenever I create a pdf I visually go through that to make sure nothing is left out---very frustrating!
    – Salivan
    May 15, 2018 at 16:39

1 Answer 1

4

I had the same problem in my document (and sadly also cannot upload a MWE) and "solved" it as suggested by Salivan in a comment:

Change the spacing a little

Even though it is not a real solution, but only fights the symptoms, it was the only way I could get a correct PDF.

In my case it was enough to replace : (colon, space) by :\ (colon, backslash, space) in the document, which changes the spacing only very little.

Details

For anyone interested in the problem, I put my preamble here. I removed all lines, where I'm 100% sure, that they're not related to the problem, like \newcommand, \tikzstyle, ... . Since the problem disappears with the slightest change, the preamble is still quite large.

As described in the preamble, commenting out the line \newcounter{unusedCounter} "resolves" the problem. The counter is nowhere else used in the code.

The compilation log-file in the buggy case shows for the last counter of the bibtex-part: \c@cbx@tempcntd=\count512

Maybe someone has an idea, whether this could mean something. I mean, a high powers of 2 that appears at the same time as a problem could very well be related to that problem. Still, I changed some other lines that led to a compilation where also \c@cbx@tempcntd=\count512, but the pdf-output was correct.

The preamble:

\documentclass[11pt, a4paper, twoside, cleardoublepage=plain, openright, hyphens]{scrbook}

\usepackage{etex}
\usepackage[utf8]{inputenc}
\usepackage[russian, ngerman, main=english, australian]{babel}
\usepackage[cmex10]{amsmath}
\usepackage{algcompatible}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
\usepackage{subcaption}
\usepackage{amssymb}
\usepackage{blindtext}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{tikz}
\usepackage[normalem]{ulem}
\usetikzlibrary{shapes,arrows,fit,calc}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{backgrounds,calc,circuits.logic.US,positioning,intersections}
\usetikzlibrary{patterns, patterns.meta}
\usetikzlibrary{decorations.pathreplacing,angles,quotes}
\usetikzlibrary{shapes.geometric}
\usepackage{circuitikz}
\usepackage{graphicx}
\usepackage{makecell}
\usepackage{xspace}
\usepackage{arydshln}
\usepackage{mathtools}
\usepackage[usestackEOL]{stackengine}
\usepackage{scalerel}
\usepackage{titletoc}
\usepackage{enumerate}
\usepackage{lmodern}
\usepackage{bibentry}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage[official]{eurosym}
\usepackage{amsthm}
\usepackage{soul}
\usepackage[most]{tcolorbox}
\usepackage[T1]{fontenc}
\usepackage{pifont}
\usepackage{pdftexcmds}
\usepackage{catchfile}
\usepackage{ifluatex}
\usepackage{ifplatform}
\usepackage{ifthen}
\usepackage{cancel}
\usepackage{microtype}
\usepackage{mathtools}
\usepackage{pdflscape}
\usepackage{enumitem}
\usepackage{filecontents}
\usepackage{etoolbox}
\usepackage{framed}
\usepackage{fancyhdr}
\usepackage{xpatch}

\newcommand{\pageeq}[2]{\ifthenelse{\pageref{#1}=\pageref{#2}}{p.~\pageref{#1}}{pp.~\pageref{#1}-\pageref{#2}}}
\newcommand{\Pageeq}[2]{\ifthenelse{\pageref{#1}=\pageref{#2}}{Page~\pageref{#1}}{Pages~\pageref{#1}-\pageref{#2}}}

\let\newclassictheorem\newtheorem 
\let\classicproof\proof

\tcbset{
    thmbox/.style={
        enhanced,
        breakable,
        sharp corners=all,
        fonttitle=\bfseries\normalsize,
        fontupper=\normalsize\itshape,
        top=0mm,
        bottom=0mm,
        right=0mm,
        colback=white,
        colframe=white,
        colbacktitle=white,
        coltitle=black,
        attach boxed title to top left,
        boxed title style={empty, size=minimal, bottom=1.5mm},
        overlay unbroken ={
            \draw (title.south west)--(title.south east);
            \draw ([xshift=3.5mm]frame.north west)|-%
            (frame.south east)--(frame.north east);},
        overlay first={
            \draw (title.south west)--(title.south east); 
            \draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);
            \draw (frame.north east)--(frame.south east);},
        overlay middle={
            \draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);
            \draw (frame.north east)--(frame.south east);},
        overlay last={
            \draw ([xshift=3.5mm]frame.north west)|-%
            (frame.south east)--(frame.north east);},
    },
    L/.style={thmbox, 
        overlay unbroken ={
            \draw (title.south west)--(title.south east);
            \draw ([xshift=3.5mm]frame.north west)|-([xshift=15mm]frame.south west);},
        overlay first={
            \draw (title.south west)--(title.south east); 
            \draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);},
        overlay middle={
            \draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);},
        overlay last={
            \draw ([xshift=3.5mm]frame.north west)|-([xshift=15mm]frame.south west);},
    },
    LQ/.style={thmbox, 
        overlay unbroken ={
            \draw (title.south west)--(title.south east);
            \draw ([xshift=3.5mm]frame.north west)|-([xshift=15mm]frame.south west);
            \node[anchor=east] at (frame.south east) {$\square$};},
        overlay first={
            \draw (title.south west)--(title.south east); 
            \draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);},
        overlay middle={
            \draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);},
        overlay last={
            \draw ([xshift=3.5mm]frame.north west)|-([xshift=15mm]frame.south west);
            \node[anchor=east] at (frame.south east) {$\square$};},
    },
}


\newcommand*\quotefont{\fontfamily{LinuxLibertineT-LF}}

\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}} 
\fancyhead{}
\fancyhead[RO]{\slshape\nouppercase{\rightmark}}
\fancyhead[LE]{\slshape\nouppercase{\leftmark}}
\fancyfoot{}
\fancyfoot[LE,RO]{\thepage}

\newclassictheorem{hypothesis}[]{Hypothesis}

\newtcbtheorem[number within = section]{theobox}{Theorem}{thmbox,L, 
    before skip=1em plus 0.5em,
    after skip=1em plus 0.5em}{thm}
\newtcbtheorem[use counter from=theobox]{defbox}{Definition}{thmbox,L, description delimiters parenthesis, separator sign none, 
    before skip=1em plus 0.5em,
    after skip=1em plus 0.5em,
fontupper=\normalfont}{def}
%% Many more \newtcbtheorem[use counter from=theobox] 
\newtcbtheorem[]{proofbox}{Proof}{thmbox,LQ,
    before skip=1em plus 0.5em,
    after skip=1em plus 0.5em}{proof}

\newcommand{\thmCounter}{tcb@cnt@theobox}

\newclassictheorem{algo}[\thmCounter]{Algorithm}
\newclassictheorem{algo-sketch}[\thmCounter]{Algorithm Sketch}

\makeatletter
\renewcommand\thealgorithm{\thesection.\arabic{\thmCounter}} 
\@addtoreset{algorithm}{\thmCounter} 
\makeatother


%%%%%%%%%%%%%%%%% % Comment the following line out to dissolve problem
\newcounter{unusedCounter}
%%%%%%%%%%%%%%%%%


\usepackage[
backend=biber,
style=ieee,
sorting=nyt,
bibencoding=utf8,
defernumbers=true,
maxnames=10,
citestyle=numeric-comp
]{biblatex}

\assignrefcontextkeyws[labelprefix=J]{J}
\assignrefcontextkeyws[labelprefix=C]{C}
\assignrefcontextkeyws[labelprefix=B]{B}
\assignrefcontextkeyws[labelprefix=W]{W}

% Pseudo-Code
\makeatletter
\def\BState{\State\hskip-\ALG@thistlm}
\makeatother

% \hyphenation, \newcommand, \tikzstyle, ...
\usepackage[bookmarks=false]{hyperref} 
25
  • No, please, this isn't a solution and shouldn't be treated as one! Can you confirm whether you are using footmisc or not?
    – user21820
    Jun 18, 2021 at 9:14
  • 1
    @user21820 This isn't a great solution, but it does solve the problem. So until someone can reproduce the problem and is willing to share that example with the rest of us, "change the spacing a little" is the best that we'll get.
    – Teepeemm
    Jun 21, 2021 at 1:40
  • do you still have a sample document that shows this behaviour? Sep 1, 2021 at 15:03
  • @user21820 Sorry for the late reply. As you can see now, I did not use footmisc.
    – Rayllum
    Oct 22, 2021 at 2:26
  • @DavidCarlisle Yes, I still have the file, also sorry for taking so long to reply. I tried working it down to an MWE, but even removing an unused counter "resolved" the problem. (See the added preamble in m answer).
    – Rayllum
    Oct 22, 2021 at 2:28

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