Latex中标题前不需要的空白页

Latex中标题前不需要的空白页,latex,Latex,Latex中标题前有一个不需要的空白页,我不明白为什么在这个空白页中有字符串“\u result\u result”,我很确定我没有添加它们 这是我的密码。 **我正在背面编辑并使用LuaLaTex** 请不要忽略.log文件中的错误和警告。它们准确地告诉您哪些包不兼容,哪些命令丢失 总结这些变化: 很多不兼容的包 \titleformat中的语法错误。尤其是不能编写\titleformat{}{} 写入\textb某些文本是错误的。它是一个宏,因此您需要\textbf{some text

Latex中标题前有一个不需要的空白页,我不明白为什么在这个空白页中有字符串“\u result\u result”,我很确定我没有添加它们 这是我的密码。 **我正在背面编辑并使用LuaLaTex**


请不要忽略.log文件中的错误和警告。它们准确地告诉您哪些包不兼容,哪些命令丢失

总结这些变化:

  • 很多不兼容的包

  • \titleformat
    中的语法错误。尤其是不能编写
    \titleformat{}{}

  • 写入
    \textb某些文本
    是错误的。它是一个宏,因此您需要
    \textbf{some text}
    \bfseries some text

  • 你应该清理你的序言,许多包是多余的,没有意义或者被多次加载



谢谢您的代码运行良好,但我的问题是,在我的标题页之前仍然有一个空白页,如@chenL2.71。请制作一个复制问题的脚本。我的答案中的代码在背页上运行良好是的,我发现这是因为我使用了引用。当我添加这样的引用时,事情就出了问题。我不知道如何修复此问题。@chenL2.71您可以通过删除我在回答中注释掉的所有不兼容包来修复此问题,还可以修复我在回答中更正的
\titleformat
中的语法错误。我刚刚修复了另一个语法错误,它导致了参考书目的问题。谢谢!我以前没有注意错误,因为我认为它编译得很好。我的空白页问题已经解决了,我发现这是因为我错误地设置了一个表格的标题。再次感谢你,祝你周末愉快!
\documentclass[letterpaper,twocolumn,12pt]{article}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,chains}
\usepackage{cite}
\usepackage{graphicx}
\usepackage{float} 
\usepackage{subfigure} 
\usepackage{fontspec}
\usepackage{underscore}
\usepackage{ragged2e}
\usepackage{geometry}
\usepackage{array}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{textcomp}
\usepackage{pgfplots}
\usepackage{indentfirst}
\setlength{\parindent}{2em}
\usepackage[numbers,sort&compress]{natbib}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{subfigure}
\usepackage[font=footnotesize,labelfont=bf]{caption}
\usepackage{subcaption}
\geometry{centering,textwidth=0.887589cm,columnsep=.81cm,left=1.6cm,right=1.6cm,top=1.91cm,bottom=2.54cm}
\pagenumbering{gobble}
\usepackage{verbatim}
\newtheorem{definition}{Definition}
\usepackage{titlesec}
\usepackage[]{caption2} 
\renewcommand{\figurename}{Fig.} 
\renewcommand{\captionlabeldelim}{.~} 
\renewcommand{\thesubfigure}{Figure.\arabic{figure}(\alph{subfigure})}
\makeatletter \renewcommand{\@thesubfigure}{\thesubfigure\space}
\renewcommand{\p@subfigure}{} \makeatother
\titleformat*{\section}{\normalsize\centering\textbf}
\titleformat*{\subsection}{\indent\small\centering\textbf}{\hspace{1cm}}
\renewcommand\thesection{\Roman{section}.}
\renewcommand\thesubsection{\arabic{subsection}.}
\newcommand{\upcite}[1]{\textsuperscript{\textsuperscript{\cite{#1}}}}
\newcommand{\tnewroman}{\fontspec{Times New Roman}}
\providecommand{\keywords}[1]
{
  \footnotesize     
  \textbf{Key words --} #1
}
\providecommand{\abstrct}[1]
{
 \footnotesize  
  \textbf{Abstract --} #1
} 
\newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}} 

\setlength{\parskip}{0.5\baselineskip}
%set font style
\setmainfont{Times New Roman}
%set title and author
\title{\vspace{-1cm}My title}

%begin the document
\begin{document}
\maketitle 
% !TeX TS-program = xelatex


\documentclass[letterpaper,twocolumn,12pt]{article}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,chains}
\usepackage{cite}
\usepackage{graphicx}
\usepackage{float} 
\usepackage{subfigure} 
\usepackage{fontspec}
\usepackage{underscore}
\usepackage{ragged2e}
\usepackage{geometry}
\usepackage{array}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{textcomp}
\usepackage{pgfplots}
\usepackage{indentfirst}
\setlength{\parindent}{2em}
\usepackage[numbers,sort&compress]{natbib}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{subfigure}
\usepackage[font=footnotesize,labelfont=bf]{caption}
%\usepackage{subcaption}
\geometry{centering,textwidth=0.887589cm,columnsep=.81cm,left=1.6cm,right=1.6cm,top=1.91cm,bottom=2.54cm}
\pagenumbering{gobble}
\usepackage{verbatim}
\newtheorem{definition}{Definition}
\usepackage{titlesec}
%\usepackage[]{caption2} 
\renewcommand{\figurename}{Fig.} 
%\renewcommand{\captionlabeldelim}{.~} 
\renewcommand{\thesubfigure}{Figure.\arabic{figure}(\alph{subfigure})}
\makeatletter \renewcommand{\@thesubfigure}{\thesubfigure\space}
\renewcommand{\p@subfigure}{} \makeatother
\titleformat*{\section}{\normalsize\centering\bfseries}
\titleformat*{\subsection}{\indent\small\centering\bfseries\hspace{1cm}}
\renewcommand\thesection{\Roman{section}.}
\renewcommand\thesubsection{\arabic{subsection}.}
\newcommand{\upcite}[1]{\textsuperscript{\textsuperscript{\cite{#1}}}}
\newcommand{\tnewroman}{\fontspec{Times New Roman}}
\providecommand{\keywords}[1]
{
  \footnotesize     
  \textbf{Key words --} #1
}
\providecommand{\abstrct}[1]
{
 \footnotesize  
  \textbf{Abstract --} #1
} 
\newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}} 

\setlength{\parskip}{0.5\baselineskip}
%set font style
\setmainfont{Times New Roman}
%set title and author
\title{\vspace{-1cm}My title}
\author{names}

%begin the document
\begin{document}
\maketitle 
\justifying

%%











\begin{thebibliography}{00}
\bibitem{1}My bib
\end{thebibliography}

\end{document}