컴파일 후 추가(+) 기호가 표시되지 않습니다.

컴파일 후 추가(+) 기호가 표시되지 않습니다.

나는 LaTeX를 자주 사용하지 않습니다. 문서를 만들 때 일반적으로 이전 문서를 초안으로 사용하고 필요할 때 새 패키지를 추가합니다. 지금 생성된 복잡한 문서가 있는데 방정식에 더하기(더하기) 기호가 없다는 것을 알았습니다.

비슷한 주제에 따르면 (추가 기호가 PDF에 표시되지 않습니다.) 그것은 내가 사용하는 패키지와 연결되어 있으며 어떻게 든 서로 충돌합니다. 원인을 찾으려고 노력했지만 실패했습니다. 경험이 많은 사용자의 도움을 주시면 감사하겠습니다.

편집하다:

예를 들면 다음과 같습니다.

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

그러나 $$ 기호를 사용하는 간단한 방정식이라도 "+"는 렌더링되지 않습니다.

노동계급 코드:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
% 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}

주요 문서:


% \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}

엄청난 혼란이라는 건 알지만 필요할 때 항상 새 패키지를 추가하고 불필요한 패키지를 삭제하지 않았으며 이제는 모든 것이 너무 복잡해서 지금 내가 실제로 사용하는 것이 무엇인지 알 수 없습니다. 추가 파일 없이도 작동되도록 그림과 외부 챕터 파일을 주석 처리했습니다.

코드의 기능을 손상시키지 않고 문제의 원인을 찾을 수 있도록 도와주세요. 감사합니다!

편집 2: \usepackage{pslatex} 줄을 삭제하면 방정식 문제가 해결되지만 참고 문헌이 작동하지 않습니다. 나는 이를 위해 `\printbibliography'를 사용하고 biblio.bib 파일의 예는 다음과 같습니다:

@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},
}

나는 PdfLaTeX+ Biber를 사용하여 컴파일합니다.

"죄송하지만 miktex-makemf가 성공하지 못했습니다" 및 "죄송하지만 miktex-makepk가 성공하지 못했습니다"라는 정보를 받았습니다. 오류 로그에는 1500줄이 있으므로 여기에 입력하고 싶지 않습니다. 나는 PdfLaTeX+ Bib(la)TeX를 사용하여 컴파일합니다.

답변1

누락된 +의 예를 제공하지 않았습니다. 보다 합리적인 테스트 파일은 다음과 같습니다.

여기에 이미지 설명을 입력하세요

\documentclass{article}

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

\begin{document}

$a+b$
\end{document}

로드하지 마십시오 pslatex. 일반적으로 패키지 라인이 반복되고 충돌하므로 대부분의 패키지 라인을 삭제해야 합니다. 필요한 경우에만 패키지를 사용하세요.


pslatex코드가 더 이상 사용되지 않고 이제 + 기호가 표시되도록 질문을 편집했습니다 .

여기에 이미지 설명을 입력하세요

관련 정보