1

I don't use LaTeX often, when I create a document I usually use my old as a draft and add new packages when I need them. I have a complex document created right now and I noticed that there are no addition (plus) symbols in my equations.

According to the similar topic (Addition Symbol Isn't showing In PDF) it is connected with packages I use that somehow conflict with each other. I tried to find a cause, but I failed, any help of more experienced user would be very appreciated.

EDIT:

Any equation, for example:

\begin{equation}
F = Q\left(\textbf{E} + \textbf{v} \times \textbf{B}\right)
\label{eq:lorentz}
\end{equation}

but any equations, even simple using $$ signs does not render "+".

working class code:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
% File:     pk.cls           (LaTeX Document class option "pk")
% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\message{*** ***}       

\newif\ifpdflatex\pdflatexfalse
\NeedsTeXFormat{LaTeX2e} % 
\ProvidesClass{pk} 
\DeclareOption{pdflatex}{\pdflatextrue}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}} 
\ProcessOptions\LoadClass[a4paper,oneside]{report} 

\RequirePackage{times}
\RequirePackage[T1]{fontenc}
\RequirePackage{graphicx}
\RequirePackage{geometry}
\RequirePackage[usenames]{color}
\RequirePackage{fancyhdr}
\RequirePackage{url}
\RequirePackage{titlesec}
\RequirePackage{tocloft}

\geometry{lmargin=30mm, rmargin=20mm, tmargin=25mm, bmargin=25mm, foot=10mm, head=10mm}
\definecolor{Green}{rgb}{0.1,0.5,0.1}

\def\shorttitlePL#1   {\gdef\@shorttitlePL{#1}}
\def\shorttitleEN#1   {\gdef\@shorttitleEN{#1}}
\def\authorEN#1       {\gdef\@authorEN{#1}}
\def\shortauthor#1    {\gdef\@shortauthor{#1}}
\def\titlePL#1        {\gdef\@titlePL{#1}}
\def\titleEN#1        {\gdef\@titleEN{#1}}
\def\facultyEN#1      {\gdef\@facultyEN{#1}}
\def\facultyPL#1      {\gdef\@facultyPL{#1}}
\def\thesistypePL#1   {\gdef\@thesistypePL{#1}}
\def\thesistypeEN#1   {\gdef\@thesistypeEN{#1}}
\def\supervisorPL#1   {\gdef\@supervisorPL{#1}}
\def\supervisorEN#1   {\gdef\@supervisorEN{#1}}
%\def\acknowledgements#1   {\gdef\@acknowledgements{#1}}
\def\departmentPL#1   {\gdef\@departmentPL{#1}}
\def\departmentEN#1   {\gdef\@departmentEN{#1}}



\linespread{1.3}
%\renewcommand{\labelitemi}{--}
\usepackage[utf8]{inputenc}

%------------------------------------------------------------------------------
\newcommand{\comm}[1]{
\begin{center}

{\small \textit{#1}}
\end{center}
}

\newcommand{\titlepages}{%

\newpage  \titlepage

\begin{center}

%    \begin{tabular}{lcl}
%      \multirow{4}{*}{\includegraphics[height=16mm]{pk.jpg}} &
%     \Large \textsc{\textbf{UNI name}} &
%      \multirow{4}{*}{\includegraphics[height=16mm]{mech2}}\\
%      &\textsc{\textbf{\@facultyEN}\vspace*{1mm}}\\
%      &\textsc{\textbf{Institute name}}&
%    \end{tabular}
\vspace*{5mm}

{\sffamily
{\large Field of study:}\\\vspace*{1mm}

{\large Speciality:}}\\\vspace*{2mm}

\vspace*{1cm}

{\huge\scshape \@thesistypeEN}\\\vspace*{2cm}

{\LARGE\scshape \@authorEN}\\\vspace*{2cm}

{\LARGE{\bfseries\scshape \@titleEN}}\\\vspace*{3cm}


\large{\scshape Supervisor:\\} \@supervisorEN


\vfill{\Large City, \@date}

\end{center}

\clearpage \titlepage



\clearpage
\titlepage

\begin{center}
\hspace*{-1cm}
%\noindent\makebox[\textwidth]{%
%    \begin{tabular}{lcl}
%      \multirow{4}{*}{\includegraphics[height=1.6cm]{pk.jpg}} &
%     \Large \textsc{\textbf{university full name}} &
%      \multirow{4}{*}{\includegraphics[height=1.6cm]{mech2}}\\
%      &\textsc{\textbf{\@facultyPL}\vspace*{1mm}}\\
%      &\textsc{\textbf{Institute full name}}&
%    \end{tabular}
%    }
\vspace*{5mm}

{\sffamily
{\hspace*{-1cm}\large field of studies full name pl}\\\vspace*{1mm}

{\hspace*{-1cm}\large Specialty full name pl}}\\\vspace*{2mm}

\vspace*{1cm}

{\huge\scshape \@thesistypePL}\\\vspace*{2cm}

{\LARGE\scshape \@author}\\\vspace*{2cm}

{\LARGE{\bfseries\scshape \@titlePL}}\\\vspace*{3cm}


\large{\scshape Promotor:\\} \@supervisorPL


\vfill{\Large CityPL, \@date}

\end{center}

\clearpage
\titlepage



%\vspace*{}
{\large
\textbf{Autor pracy:} 
\vspace*{-0.2cm}

\textbf{Nr pracy:}
}




\clearpage
\setcounter{page}{4}

}

\def\thesisheaders{
\fancyfoot[L]{\small \@shortauthor\quad\textit{\@shorttitleEN}}
}

\DeclareOption{en}{
\def\thesisheaders{
\fancyfoot[L]{\small \@shortauthor\quad\textit{\@shorttitleEN}}
}
}

\ProcessOptions

\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{\thechapter.\ #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0.5pt}
\fancyhf{}
\fancyhead{}
\fancyhead[L]{\slshape{\small \rightmark}}
\fancyhead[R]{\bfseries \thepage}

\thesisheaders

\frenchspacing
\sloppy 
\widowpenalty     9999 
\clubpenalty      9999 
\flushbottom


\titleformat{\chapter}[block]
{\bfseries\LARGE}{\filright \LARGE\thechapter. }{0ex}{}
%odst�py: lewy, g�ra, d��
\titlespacing{\chapter}{0pt}{17mm}{19mm}
\titleformat{\section}[block]
{\bfseries\Large}{\filright \Large\thesection. }{0ex}{}
\titlespacing{\section}{7mm}{8mm plus 0mm minus 1mm}{4mm plus 0mm minus 1mm}
\titleformat{\subsection}[block]
{\bfseries\large}{\filright \large\thesubsection. }{0ex}{}
\titlespacing{\subsection}{7mm}{6mm}{2.5mm}
\titleformat{\subsubsection}[block]
{\bfseries\normalsize}{\filright \normalsize\thesubsubsection. }{0ex}{}
\titlespacing{\subsubsection}{7mm}{3mm}{1.5mm}


\renewcommand{\cfttoctitlefont}{\bfseries\Large}
\renewcommand{\cftbeforetoctitleskip}{20mm}
\renewcommand{\cftaftertoctitleskip}{19mm}
\renewcommand{\cftchapleader}{\cftdotfill{\cftdot}}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdot}}
\renewcommand{\cftsubsecleader}{\cftdotfill{\cftdot}}
\renewcommand{\cftchapaftersnum}{.}
\renewcommand{\cftsecaftersnum}{.}
\renewcommand{\cftsubsecaftersnum}{.}
\setlength{\cftparskip}{2pt}
\setlength{\cftbeforechapskip}{0mm}
\renewcommand{\cftchappagefont}{\normalsize}

main document:


% \documentclass[pdflatex,11pt]{pk}
\documentclass[12pt]{pk}        
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
% dodatkowe pakiety
\usepackage{enumerate}
\usepackage{listings}
\usepackage[hidelinks]{hyperref}
\lstloadlanguages{TeX}
\usepackage{color, colortbl}
\usepackage{hhline}
\usepackage{multirow}
\usepackage[rightcaption]{sidecap}
% options apply to all captions
\usepackage{caption}
\usepackage{subcaption}
\usepackage[font={it,small}]{caption}
\usepackage{float}
\usepackage{flafter} 
\usepackage{capt-of}
%\usepackage[demo]{graphicx}
\usepackage{graphicx}
\usepackage[table,xcdraw]{xcolor}
\usepackage{booktabs}
\usepackage{enumerate}
\usepackage{newtxtext,newtxmath,amsmath}
\usepackage{geometry} 
\usepackage[percent]{overpic}
\usepackage{contour}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
% applies to all subfigure and subtable captions
\usepackage[font={it,footnotesize}]{subcaption}

\usepackage[
    backend=biber,
    style=nature,
    sorting=none,
    %articletitle=true,
  ]{biblatex}


\addbibresource{biblio.bib}
\usepackage[bottom,symbol]{footmisc}

\usepackage{fancyhdr}
\usepackage{bm}
\pagestyle{fancy}
\DeclareFieldFormat{title}{\textit{#1}}
\DeclareFieldFormat*{journal}{#1}
\DeclareFieldFormat{journal}{#1}
\DeclareFieldFormat*{biblabeldate}{#1}
\DeclareFieldFormat{issuetitle}{#1}
%\DeclareFieldFormat{year}{\textbf{#1}}
%podpisy
\renewcommand\cftloftitlefont{\LARGE\bfseries}
\renewcommand\cftlottitlefont{\LARGE\bfseries}

%koniec podpisow

\lstset{
  literate={ą}{{\k{a}}}1
           {ć}{{\'c}}1
           {ę}{{\k{e}}}1
           {ó}{{\'o}}1
           {ń}{{\'n}}1
           {ł}{{\l{}}}1
           {ś}{{\'s}}1
           {ź}{{\'z}}1
           {ż}{{\.z}}1
           {Ą}{{\k{A}}}1
           {Ć}{{\'C}}1
           {Ę}{{\k{E}}}1
           {Ó}{{\'O}}1
           {Ń}{{\'N}}1
           {Ł}{{\L{}}}1
           {Ś}{{\'S}}1
           {Ź}{{\'Z}}1
           {Ż}{{\.Z}}1
}

%---------------------------------------------------------------------------

\author{author name}
\authorEN{author name}
\shortauthor{a. name}

\titlePL{title in polish}
\titleEN{title in english}

\shorttitlePL{short title PL}

\shorttitleEN{short title EN}

\thesistypePL{Praca Magisterska}
\thesistypeEN{Master of Science Thesis}

\supervisorPL{Prof. dr. hab. inż.}

\supervisorEN{Professor name}

\date{2020}

\departmentPL{Instytut}
\departmentEN{Department of}

\facultyPL{Wydział}
\facultyEN{Faculty}




\setlength{\cftsecnumwidth}{10mm}

%---------------------------------------------------------------------------
\setlength{\parskip}{1em}
\renewcommand{\baselinestretch}{1.5}
\begin{document}

\titlepages


\addcontentsline{toc}{chapter}{Acknowledgements}
\chapter*{Acknowledgments}

acknowledgements

\chapter*{Abstract}
\addcontentsline{toc}{chapter}{Abstract}

abstract


\clearpage
\tableofcontents
\clearpage

%\include{introduction}
%\include{theory}
%\include{model}
%\include{analysis}
%\include{discussion}
%\include{conclusions}
%\include{summaryPL}
%%\include{abstractEN}
%\include{appendix}
\nocite{*} 

%\include{list}


\end{document}

I know it is a huge mess, but I always added new packages when I needed it and didn't delete unnecessary ones and now whole thing is too complex for me to know which I really use right now. I commented out figures and external chapter files so it works without any additional files.

Please help me find the cause of the problem without breaking functionality of the code, thank you!

EDIT 2: deleting line \usepackage{pslatex} solves the problem with equations, but my bibliography does not work. I use `\printbibliography' for it and example of biblio.bib file looks as follows:

@Online{Mangano2017,
  author = {Michelangelo Mangano and Patrizia Azzi and Monica D’Onofrio and Matthew Mccullough},
  title  = {Physics at its limits},
  year   = {2017},
  url    = {https://cerncourier.com/a/physics-at-its-limits/},
}

@Book{Steinmetz1917,
  author    = {Steinmetz, Charles},
  title     = {Theory and Calculation of Electric Circuits},
  year      = {1917},
  publisher = {McGraw-Hill},
}

I use PdfLaTeX+ Biber to compile.

I receive an information "sorry, but miktex-makemf did not succeed" and "sorry, but miktex-makepk did not succeed" Error log has 1500 lines so I don't want put it here. I use PdfLaTeX+ Bib(la)TeX to compile.

  • 1
    Please, can you put a complete compilable code? Thank you. – Sebastiano Feb 1 at 20:38
  • There are multiple .tex files included as different chapters, I have commented it out and deleted personal information, give me a second to put it here, thanks! – Omzigus Feb 1 at 20:43
  • your code should be an example of the problem but i see no + here? But also your preamble does not make a lot of sense, why are you loading pslatex (I wrote that and haven't used it since about 1988) loading times does nothing as you later load newtxtext, \usepackage[font={it,small}]{caption} will generate an option error as you have loaded caption earlier you specify the color package twice but then load xcolor you load enumerate twice, and graphicx twice.. there are probably more, they are just the ones I spotted – David Carlisle Feb 1 at 20:50
  • you are still making it far too difficult for anyone to test, why have you put the equation in a separate fragment? put it in the main document, and if $a+b$ is enough to show the problem that is all you need to have in your main document. – David Carlisle Feb 1 at 21:40
  • there is nothing called bib(la)tex you are using the biblatex latex package so you should be using biber (not bibtex) program to generate the bibliography. miktex-makemf error is unrelated to the question you are asking here, and basically just means that you are referencing some font you do not have the log will show which font. But that is a different question, you should be able to make an example (the size of the test file in my answer, not using dozens of unrelated packages as here) and ask a new question showing the error message and the log. – David Carlisle Feb 1 at 22:54
3

You did not provide an example of a missing +, a more reasonable test file would be

enter image description here

\documentclass{article}

\usepackage{newtxtext,newtxmath}
\usepackage{pslatex}

\begin{document}

$a+b$
\end{document}

Do not load pslatex and in general you should delete most of the package lines, as they are repeating and conflicting. Only use a package if you know you need it.


You have edited the question so your code no longer uses pslatex and the + signs now appear:

enter image description here

| improve this answer | |
  • Sorry, I made my first post more clear now. Even simple example as yours does not work, I just tried commenting out \usepackage{pslatex} and it still does not work. I'm not fluent in LaTeX enough to decide which packages I really use in my 100 pages document I prepared for months so it's not that simple for me just do delete redundant packages. – Omzigus Feb 1 at 21:35
  • @Omzigus it is simple for you to start with a document that just has $a+b$ and delete every package you can while still showing the problem. It may be that you need to put some back for your real document but then at least you know where the problem is. But the preamble you show in your question has so many conflicts – David Carlisle Feb 1 at 21:38
  • @Omzigus see the image I just added, your code from the question now typesets + signs, as you have removed pslatex – David Carlisle Feb 1 at 21:50
  • I tried that and just discovered that if I have all my chapters and bibliography commented out it actually works without pslatex package - addition sign is visible. However, if I use my chapters and bibliography I can't compile files (I use PdfLaTeX + Bib(la)tex to compile and it says sorry it 'did not succeed' – Omzigus Feb 1 at 21:56
  • 1
    @Omzigus sorry you are just making it hard for anyone to help you. If you have an example that shows a problem fix your question to have that example, otherwise there is nothing that can be said really. – David Carlisle Feb 1 at 22:17

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.