3

\documentclass[12pt, letterpaper]{Ultheses}
\addtolength{\footskip}{0.25in}
\usepackage{amsmath}
\usepackage{array}
\usepackage{tabu} 
\usepackage{graphicx}
\graphicspath{ {/} }
\usepackage{matlab-prettifier}
\usepackage{caption}
\usepackage{subcaption}
%\usepackage[colorinlistoftodos]{todonotes}
\numberwithin{equation}{section}
%\usepackage{cleveref}
\usepackage{amsmath,amssymb,amsfonts}
%\usepackage{breqn}
\usepackage[intoc,refpage]{nomencl}
\makenomenclature
\usepackage{hyperref}
%\renewcommand{\pagedeclaration}[1]{\dotfill\hyperpage{#1}}
\newcommand{\nm}[2]{\nomenclature{#1}{#2}}
%\renewcommand{\contentsname}{Table of Contents}
\usepackage{lipsum}
%\usepackage{epsfig} %% for loading postscript figures
\usepackage{epstopdf}
\usepackage{fancyvrb}
%\usepackage[usenames]{color}
\usepackage{layout}
\usepackage{mydef}
\usepackage{url}
\usepackage{titlesec}
%\newcommand{\sectionbreak}{\clearpage}
\usepackage{indentfirst}
\usepackage{ragged2e}

I have use these packages. Its my thesis. I don't know which part of the code should I upload here?

How can I remove the overwriting of equation numbers? I have not labelled all the equations however after properly labeling the equation number the problem remains. How can this problem be fixed? enter image description here

8
  • 3
    how we can reproduce your problem if you not provide equation code? please edit your question and add small but complete document with your equation beginning with \documentclass{...}˙and end with \end{document}. welcome to tex.se!
    – Zarko
    Mar 28 '18 at 18:41
  • Welcome to TeX.SX!
    – Skillmon
    Mar 28 '18 at 18:43
  • Take a look at the following to learn how to create a minimal working example (MWE) In short: Post code that is enough to recreate your issue, but nothing more. So the display environment you used to typeset that formula and all packages necessary to use that code snippet. And make sure that the posted code actually shows your issue.
    – Skillmon
    Mar 28 '18 at 19:03
  • 1
    you upload only preamble. you should add code of equation too. your error is untypical and you doing something very wrong. however until we not see equation code, we cant say anything.
    – Zarko
    Mar 28 '18 at 19:04
  • And in the editor for your question you can highlight the code and click on the {} button to mark it as code (as I did in my edit for you).
    – Skillmon
    Mar 28 '18 at 19:04
5

The file ullthesis2017.cls -- which may or may not be functionally the same as Ultheses.cls -- contains the instructions

\@addtoreset {equation}{chapter}
\renewcommand\theequation
    {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@equation}

This code indicates that you should not be providing the instruction

\numberwithin{equation}{section}

in the preamble of your thesis document. For sure, if one comments out this instruction, the unfortunate equation number overprinting issue vanishes.

enter image description here

If I were in your shoes, I would mostly strive to find an alternative to the ullthesis2017 (or Ultheses) document class. Really.

\documentclass[12pt, letterpaper]{ullthesis2017} % same as 'Ultheses.cls'?
%% I've simplified the preamble considerably...
\usepackage{amsmath} % for '\numberwithin' macro
\numberwithin{equation}{section} % see what happens if you comment out this line...

\begin{document}
\begin{equation}
1+1=2
\end{equation}
\end{document}
6
  • This solved the problem of equation overwriting. thanks a ton!!!! Huge problem solved!!!
    – Abhijeet
    Mar 28 '18 at 19:41
  • 1
    I'm very fast. Good answer +1.
    – Sebastiano
    Mar 28 '18 at 19:41
  • @Abhijeet - The real solution would consist mainly in not using such a dreadful mess of a LaTeX document class.
    – Mico
    Mar 28 '18 at 19:43
  • I am new to Latex. The graduate school provided me the template. I am slowly and steadily learning LaTeX. I will definitely code it on my own in the future.
    – Abhijeet
    Mar 28 '18 at 19:46
  • I see no problem in the code using \ifnum.
    – egreg
    Mar 28 '18 at 20:42
2
  • your document class is unknown to me, so i cant test your code.
  • with standard documentclass as is article,reportorbook` is not possible reproduce your problem. for example

\documentclass[12pt, letterpaper]{article}%{Ultheses}
\usepackage{mathtools}

\begin{document}
\begin{equation}
  \begin{split}
   \MoveEqLeft
xxxx = 1 + yyyyy + zzzzz    \\
      &   - uuuuuu - vvvvvvv
\end{split}
\end{equation}

\end{document}

gives

enter image description here

please test this minimal document example with your document class and see, i you will obtain your error.

3
  • Also for you +1.
    – Sebastiano
    Mar 28 '18 at 19:42
  • It's some bizarre code in the document class used by the OP that's responsible for the overprinting issue. See my answer for more details. The "remedy", such as it is, consists of omitting the otherwise-standard instruction \numberwithin{equation}{section}.
    – Mico
    Mar 28 '18 at 19:42
  • 2
    @Mico, +1 for your answer. it is difficult believe, that exist such documentclasses. i sympathize with everyone they need to use them.
    – Zarko
    Mar 28 '18 at 19:51

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.