1

In my tex file, = doesn't appear.

\RequirePackage[l2tabu]{nag}        
\makeatletter
\renewcommand*\cleardoublepage{\clearpage\if@twoside
  \ifodd\c@page \hbox{}\newpage\if@twocolumn\hbox{}%
  \newpage\fi\fi\fi}
\makeatother
\documentclass[a4paper,12pt,openany,leqno,footinclude=true]{memoir} 
\usepackage{enumitem}% http://ctan.org/pkg/enumitem
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{lineno}
\usepackage{multicol}
\usepackage{blindtext}
\RequirePackage{graphicx}

\usepackage{enumitem}
\setlist[itemize]{leftmargin=*}
%\usepackage{amsmath,fontspec}

\usepackage{subfig}
\usepackage{amsfonts}
\usepackage{algorithm,algorithmic}
\usepackage{enumitem}
\usepackage{eqparbox}
\setlist[itemize]{leftmargin=*}
\def\cftchapteraftersnum{.}
\makeatletter
\def\@copyrightspace{\relax}
\makeatother

\settrimmedsize{297mm}{210mm}{*}
\setlength{\trimtop}{0pt} 
\setlength{\trimedge}{\stockwidth} 
\addtolength{\trimedge}{-\paperwidth} 
\settypeblocksize{634pt}{448.13pt}{*} 
\setulmargins{4 cm}{*}{*} 
\setlrmargins{*}{*}{1.5} 
\setmarginnotes{17pt}{51pt}{\onelineskip} 
\setheadfoot{\onelineskip}{2\onelineskip} 
\setheaderspaces{*}{2\onelineskip}{*} 
\setlrmargins{*}{*}{1}
\checkandfixthelayout
\pagestyle {plain}
\usepackage{fouriernc}
\usepackage[T1]{fontenc}
\aliaspagestyle{part}{empty}
\OnehalfSpacing 

\newcommand{\clearemptydoublepage}{\newpage{\thispagestyle{empty}\cleardoublepage}}

\usepackage{import}
\usepackage{underscore}     
% Add other packages needed for chapters here. For example:
\usepackage{lipsum}                 %Needed to create dummy text
\usepackage{amsfonts}                   %Calls Amer. Math. Soc. (AMS) fonts
\usepackage[centertags]{amsmath}            %Writes maths centred down
\usepackage{stmaryrd}                   %New AMS symbols
\usepackage{amssymb}                    %Calls AMS symbols
\usepackage{amsthm}                 %Calls AMS theorem environment
\usepackage{newlfont}                   %Helpful package for fonts and symbols
\usepackage{layouts}                    %Layout diagrams
\usepackage{graphicx}                   %Calls figure environment
\usepackage{longtable,rotating}         %Long tab environments including rotation. 
\usepackage[applemac]{inputenc}         %Needed to encode non-english characters 
                                    %directly for mac
\usepackage{colortbl}                   %Makes coloured tables
\usepackage{wasysym}                    %More math symbols
\usepackage{mathrsfs}                   %Even more math symbols
\usepackage{float}                      %Helps to place figures, tables, etc. 
\usepackage{verbatim}                   %Permits pre-formated text insertion
\usepackage{upgreek }                   %Calls other kind of greek alphabet
\usepackage{latexsym}                   %Extra symbols
\usepackage[square,numbers,
             sort&compress]{natbib}     %Calls bibliography commands 
\usepackage{url}                        %Supports url commands
\usepackage{etex}                       %eTeXÕs extended support for counters
\usepackage{fixltx2e}                   %Eliminates some in felicities of the 
                                    %original LaTeX kernel
\usepackage[spanish,english]{babel}     %For languages characters and hyphenation
\usepackage{color}                                  %Creates coloured text and background
\usepackage[colorlinks=true,
             allcolors=black]{hyperref}              %Creates hyperlinks in cross references
\usepackage{memhfixc}                   %Must be used on memoir document 
                                    %class after hyperref
\usepackage{enumerate}                  %For enumeration counter
\usepackage{footnote}                   %For footnotes
\usepackage{microtype}                  %Makes pdf look better.
\usepackage{rotfloat}                   %For rotating and float environments as tables, 
                                    %figures, etc. 
\usepackage{alltt}                      %LaTeX commands are not disabled in 
                                    %verbatim-like environment
\usepackage[version=0.96]{pgf}          %PGF/TikZ is a tandem of languages for producing vector graphics from a 
\usepackage{tikz}                       %geometric/algebraic description.
\usetikzlibrary{arrows,shapes,snakes,
               automata,backgrounds,
               petri,topaths}               %To use diverse features from tikz      


%
\usepackage{mathptmx}% http://ctan.org/pkg/mathptmx
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3}

\usepackage{tocloft}%
\newcommand{\cftchapaftersnum}{.}
\begin{document}
% -----------------------------------------------------------Pages
\let\cleardoublepage\clearpage

\input{frontmatter/title}

\end{document}

The above contains the preamble.

Consider putting in title.tex:

\[dupthresh = D\cdot[1+log(n)]\]

= does not appear.

A minimal example would be as follows:

\documentclass{article}
\usepackage{fouriernc}
\usepackage{mathptmx}
\begin{document}
$a=b$
\end{document}
13
  • why specify \usepackage{enumitem} three times (and enumerate which is incompatible with that) Nov 23 '15 at 15:37
  • 2
    @ferrer first you should make it reasonable for anyone to try to help by posting an example of the problem also don't load etex or fixltx2e in current latex releases and newlfont in any latex since the 1990's. Nov 23 '15 at 15:41
  • 1
    Here's a correct MWE: \documentclass{article} \usepackage{fouriernc} \usepackage{mathptmx} \begin{document} $x=x$ \end{document}
    – cgnieder
    Nov 23 '15 at 15:41
  • 1
    It is always best for a new document to start with loading no packages and then just add packages if you need them. It is clear from this preamble that it just loads multiple packages multiple times, so such clashes are not unexpected. Nov 23 '15 at 15:44
  • 1
    just don't load both fourierenc and mathptm. Also are you really using a legacy apple encoding rather than a standard encoding \usepackage[applemac]{inputenc} ? (and why is graphicx loaded three times (none of which is needed as it is loaded by rotating`)? Nov 23 '15 at 15:47
4

The particular error is that the document loads two incompatible redefinitions of math mode, fouriernc and mathptmx but more generally the preamble loads multiple packages many of them three or four times, and most of them unneeded as the already extensive memoir class is used as base. It also loads newlfont, etex, fixltx2e which shouldn't be used with current releases. (newlfont should only ever have been used to work with documents from before latex2e was released in 1993). The preamble also defined \cleardoublepage twice, with different definitions, and specifies \usepackage[applemac]{inputenc} which is unlikely to be the encoding used by modern text editors, even on a Mac.

My recommendation would be to change the document to start

\documentclass{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\begin{document}

then only add more packages if you need them.

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