LaTeX错误: “缺少数字,视为零” 和 “非法的度量单位(插入pt)”。

huangapple go评论61阅读模式
英文:

LaTeX ERROR: "Missing number, treated as zero" & "Illegal unit of measure (pt inserted)."

问题

我无法解决我的LaTeX项目中出现的这些问题。特别是,错误如下:

缺少数字,被视为零。
非法的度量单位(插入了pt)。

我尝试注释文档中的每个“可疑包”,但没有任何变化。这是我的导言部分:

\documentclass[11pt, twocolumn, a4paper]{article}
\usepackage[colorlinks, linkcolor=black]{hyperref}
\usepackage[italian]{babel}
\usepackage[utf8]{inputenc}
\usepackage[landscape, margin=1.5 cm]{geometry}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{calc}
\usepackage{fancyhdr}
\usepackage{capt-of}
\usepackage{booktabs}
\usepackage{fontenc}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagenumbering{arabic}
\setlength{\columnsep}{1cm}
\pagestyle{fancy}
\fancyhead{}
\fancyhead[L]{\rightmark}
\fancyfoot{}
\fancyfoot[R]{\thepage\ }
\renewcommand{\headrulewidth}{}
\renewcommand{\footrulewidth}{}
\renewcommand{\thefigure}{\arabic{figure}}
\renewcommand{\thetable}{\arabic{table}}
\renewcommand{\familydefault}{\sfdefault}
\fontfamily{qag}\selectfont

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
\begin{titlepage}
%我的个人模板标题
\end{titlepage}
\end{document}

问题出现在以下命令中:(i) \newpage,(ii) \subsubsection 和 (iii) \paragraph。

感谢您可能提供的任何答案。

英文:

I can't solve these problems with my latex project. In particular, the errors are:

Missing number, treated as zero.
Illegal unit of measure (pt inserted).

I tried to comment every 'suspect package' in my document but anything changed. This is my preamble:

\documentclass[11pt, twocolumn, a4paper]{article}
\usepackage[colorlinks, linkcolor=black]{hyperref}
\usepackage[italian]{babel}
\usepackage[utf8]{inputenc}
\usepackage[landscape, margin=1.5 cm]{geometry}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{calc}
\usepackage{fancyhdr}
\usepackage{capt-of}
\usepackage{booktabs}
\usepackage{fontenc}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagenumbering{arabic}
\setlength{\columnsep}{1cm}
\pagestyle{fancy}
\fancyhead{}
\fancyhead[L]{\rightmark}
\fancyfoot{}
\fancyfoot[R]{\thepage\ }
\renewcommand{\headrulewidth}{}
\renewcommand{\footrulewidth}{}
\renewcommand{\thefigure}{\arabic{figure}}
\renewcommand{\thetable}{\arabic{table}}
\renewcommand{\familydefault}{\sfdefault}
\fontfamily{qag}\selectfont

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
\begin{titlepage}
%my personal template title
\end{titlepage}
\end{document}

Problems appear with commands: (i) \newpage , (ii) \subsubsection and (iii) \paragraph.

Thank you for any possible answers.

答案1

得分: 0

你不能重新定义以下部分的内容为空:

\renewcommand{\headrulewidth}{}
\renewcommand{\footrulewidth}{}

如果你想移除页眉和页脚的水平线,可以将它们的宽度设置为零,如下所示:

\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}

这样就可以去掉页眉和页脚的水平线了。

英文:

You can't redefine

\renewcommand{\headrulewidth}{}
\renewcommand{\footrulewidth}{}

to be empty. If you want to remove the head- and footrule, set their widths to zero instead:

\documentclass[11pt, twocolumn, a4paper]{article}
\usepackage[colorlinks, linkcolor=black]{hyperref}
\usepackage[italian]{babel}
\usepackage[utf8]{inputenc}
\usepackage[landscape, margin=1.5 cm]{geometry}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{calc}
\usepackage{fancyhdr}
\usepackage{capt-of}
\usepackage{booktabs}
\usepackage{fontenc}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagenumbering{arabic}
\setlength{\columnsep}{1cm}
\pagestyle{fancy}
\fancyhead{}
\fancyhead[L]{\rightmark}
\fancyfoot{}
\fancyfoot[R]{\thepage\ }
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\renewcommand{\thefigure}{\arabic{figure}}
\renewcommand{\thetable}{\arabic{table}}
\renewcommand{\familydefault}{\sfdefault}
\fontfamily{qag}\selectfont

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
\begin{titlepage}
my personal template title
\end{titlepage}
\newpage
test
\end{document}

huangapple
  • 本文由 发表于 2023年5月15日 00:23:10
  • 转载请务必保留本文链接:https://go.coder-hub.com/76248545.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定