我正在写论文,一位同事给了我写论文的格式,但执行时,我在写论文的包 geometry 处遇到了错误\spacing{1.5}
。我不知道该怎么办。
\documentclass[12pt, oneside ]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
%\spanishdecimal{.}%Para usar punto en vez de coma decimal
\usepackage{calligra} %tipo de letra
\usepackage{amsthm}
\usepackage{amsmath}%centrar formulas
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsbsy}%Para poner fórmulas químicas
%\usepackage{graphicx} % figuras
\usepackage{subfigure} % subfiguras
\usepackage[spanish]{babel}
\usepackage{emptypage}
\usepackage{fancyhdr}
\usepackage{hyperref}
\usepackage{booktabs} %Para tablas importadas de excel
\usepackage[table]{xcolor}
\usepackage{colortbl}%row color
\usepackage{multirow}
\usepackage{float} %Para dejar fija la tabla
\usepackage{longtable} %Tabla en dos páginas
\usepackage{stackrel}
\usepackage{enumerate}
\usepackage{upgreek}%Para poner letras griegas en negrita
\usepackage{mathrsfs}
\usepackage{comment}
\usepackage{verbatim}
\usepackage{subfigure} % subfiguras%Para imágenes seguidas
\usepackage{tabularx}
\usepackage{bigstrut}
\usepackage{caption}
\usepackage{cite}
\usepackage{geometry}
\usepackage[myheadings]{fullpage}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{graphicx, wrapfig, setspace, booktabs}
\usepackage[T1]{fontenc}
\usepackage[font=small, labelfont=bf]{caption}
\usepackage{fourier}
\usepackage[protrusion=true, expansion=true]{microtype}
\usepackage{setspace} %interlineados
\usepackage{titlesec}
\usepackage{titling}
\usepackage{mathrsfs}
\usepackage{enumerate} % enumerados
\usepackage{emptypage}
\usepackage{fancyhdr}
\usepackage{fancybox}
\usepackage{scrextend}
\usepackage{hyperref}
\pagenumbering{roman}
\usepackage[top=2.43cm,bottom=3cm,lmargin=3.21cm,rmargin=2.73cm,bindingoffset=0.25in,heightrounded,]{geometry}
\spacing{1.5} %**Here is the error that show me Texmaker**
\titleformat{\chapter}[display]{\normalfont}{\vspace{-0.33cm}\filcenter \normalsize\textbf{CAPÍTULO \Roman{chapter}}}{2.2pt}{\normalsize\bfseries\filcenter}
\renewcommand{\thechapter}{\arabic{chapter}}
\renewcommand{\thesection}{\arabic{chapter}.\arabic{section}}
\renewcommand{\theequation}{\arabic{chapter}.\arabic{equation}}
\renewcommand{\thefigure}{\arabic{figure}}
答案1
看起来您加载了您知道的每个包...;-) 以下应该有效:
\documentclass[12pt, oneside ]{book}
\usepackage[T1]{fontenc}
\usepackage{upgreek}%Para poner letras griegas en negrita
\usepackage{amssymb}
\usepackage{amsbsy}%Para poner fórmulas químicas
\usepackage{amsfonts}
\usepackage{fourier}
\usepackage{mathrsfs}
\usepackage{calligra} %tipo de letra
\usepackage[protrusion=true, expansion=true]{microtype}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
%\spanishdecimal{.}%Para usar punto en vez de coma decimal
\usepackage{geometry}
\geometry{top=2.43cm,bottom=3cm,lmargin=3.21cm,
rmargin=2.73cm,bindingoffset=0.25in,heightrounded}
\usepackage{fancyhdr}
\usepackage{amsthm}
\usepackage{amsmath}%centrar formulas
\usepackage{graphicx} % figuras
\usepackage{subfigure} % subfiguras
\usepackage{booktabs} %Para tablas importadas de excel
\usepackage[table]{xcolor}
\usepackage{multirow}
\usepackage{float} %Para dejar fija la tabla
\usepackage{longtable} %Tabla en dos páginas
\usepackage{stackrel}
\usepackage{enumerate}
\usepackage{comment}
\usepackage{verbatim}
\usepackage{tabularx}
\usepackage{bigstrut}
\usepackage{cite}
\usepackage{emptypage}
\usepackage[myheadings]{fullpage}
\usepackage{fancyhdr}
\usepackage{wrapfig}
\usepackage[font=small, labelfont=bf]{caption}
\usepackage{titlesec}
\usepackage{titling}
\usepackage{enumerate} % enumerados
\usepackage{fancybox}
\usepackage{scrextend}
\usepackage{setspace} %interlineados
\onehalfspacing %**Here is the error that show me Texmaker**
%\usepackage{lastpage}
\titleformat{\chapter}[display]{\normalfont}{
\vspace{-0.33cm}
\filcenter \normalsize\textbf{CAPÍTULO \Roman{chapter}}}{2.2pt}{\normalsize\bfseries\filcenter}
\renewcommand{\thechapter}{\arabic{chapter}}
\renewcommand{\thesection}{\arabic{chapter}.\arabic{section}}
\renewcommand{\theequation}{\arabic{chapter}.\arabic{equation}}
\renewcommand{\thefigure}{\arabic{figure}}
\usepackage{hyperref}
\pagenumbering{roman}
\begin{document}
foo
\end{document}