我正在用 LaTeX 写论文。最近我参考了一个 YouTube 视频。编译后,它返回以下内容:
就我而言,(打字指导)不应该出现。
我的序言是:
\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel} % pone el idioma en español
\setcounter{tocdepth}{3} % pone en TOC hasta la subsubsección
\setcounter{secnumdepth}{3} % enumera hasta la subsubsección
\usepackage{lipsum} % dummy text
\usepackage{graphicx}
\usepackage{geometry} % margenes del documento
\geometry{letterpaper, top = {2,5cm}, bottom = {2,5cm}, inner = {2,5cm},
outer = {2,5cm}, head = {1,1cm}, foot = {1,1cm}, bindingoffset = {1,0cm}}
% Si se va a usar dos paginas por hoja, agregar la opción twoside
\usepackage{helvet} % Arial
\renewcommand{\familydefault}{\sfdefault} % Arial
\usepackage{titlesec} % cambiar modo de ver capitulos y secciones
\titleformat{\chapter}[display]
{\large\bfseries\centering}{\MakeUppercase\chaptertitlename\ \thechapter}{1em}{\MakeUppercase}{} % Cambios en Capitulo
\titleformat{\section}{\large\bfseries}{\thesection.}{1em}{\MakeUppercase}
\titleformat{\subsection}{\normalsize\bfseries}{\thesubsection.}{1em}{\MakeUppercase} % Cambios en SubSección
\titleformat{\subsubsection}{\normalsize\bfseries}{\thesubsubsection.}{1em}{\MakeUppercase} % Cambios en SubSubSección
\titlespacing*{\chapter}{0pt}{-2.5em}{3em} % Cambia el espaciamiento del capitulo de 50pt a lo pedido
\titlespacing*{\section}{0pt}{3em}{2em} % Cambia el espaciamiento de la sección a 3 espacios en blanco antes y 2 despues.
\usepackage{enumitem}
%\setlist[enumerate]{label=\thesection.\arabic*., leftmargin=*}
%\renewcommand*{\theenumi}{\thechapter.\arabic{enumi}} % numero de capitulo en listas
%\renewcommand*{\theenumii}{\theenumi.\arabic{enumi}} % añade lo anterior a sublistas
\usepackage{titletoc}
\titlecontents{chapter}[0em]
{\vspace{0em}}
{\normalfont\normalsize\contentslabel[\thecontentslabel.]{2em}\uppercase}
{\hspace*{-2em}\uppercase}
{\titlerule*[.75em]{.}\contentspage}
\titlecontents{section}[2em]
{\vspace{0em}}
{\normalfont\normalsize\contentslabel[\thecontentslabel.]{2em}\uppercase}
{\hspace*{-2em}\uppercase}
{\titlerule*[.75em]{.}\contentspage}
\titlecontents{subsection}[5em]
{\vspace{0em}}
{\normalfont\normalsize\contentslabel[\thecontentslabel.]{2.9em}\uppercase}
{\hspace*{-2em}\uppercase}
{\titlerule*[.75em]{.}\contentspage}
\titlecontents{subsubsection}[9em]
{\vspace{0em}}
{\normalfont\normalsize\contentslabel[\thecontentslabel.]{3.8em}\uppercase}
{\hspace*{-2em}\uppercase}
{\titlerule*[.75em]{.}\contentspage}
\usepackage{setspace}
\renewcommand{\baselinestretch}{1.5} % interlineado de 1.5
\usepackage[skip=6pt, indent=1cm, tocskip]{parskip} % configurar espacio entre parrafos y sangría izquierda. tocskip genera el salto entre parrafos en el indice
% paquetes necesarios para citar
\usepackage{csquotes}
\usepackage[style=apa, backend=biber, sortcites, url=true]{biblatex}
\addbibresource{bibliografia.bib}
\usepackage{etoolbox}
\patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{fancy}}{}{} % necesario para poner encabezado en paginas de capítulos
% paquete para encabezado y pie de pagina
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancypagestyle{mystyle}{
\fancyfoot{}
\renewcommand{\thepage}{\ifnum\value{page}<10 0\fi\arabic{page}}
}
\pagestyle{mystyle} % Aplicar el estilo de numeración de página personalizado
\usepackage[labelfont=bf]{caption} %% Formato de pies de foto
\usepackage[]{hyperref}
% - - - - - COMANDOS - - - - -
\newenvironment{itemizecita}{%
\begin{itemize}
\setlength{\leftskip}{1.27cm}
}{%
\end{itemize}
}
\long\def\citalarga#1{%
\medskip
\begingroup
\parindent 0pt
\leftskip=1.27cm
#1
\par
\endgroup
\medskip
}
\long\def\citalargacontinuacion#1{\medskip
\begingroup
\parindent 1.27cm
\leftskip=1.27cm
#1 \par \medskip
\endgroup
}
\long\def\resej#1{\medskip
\begingroup
\parindent 0pt
\leftskip=1.5em
#1 \par \medskip
\endgroup
}
% - - - - - PORTADA - - - - -
\title{\textbf{\MakeUppercase{text}}}
\author{text}
\date{}
\begin{document}
\maketitle
\fancyhead{}
\fancyfoot{}
\fancyhead[L]{}
\fancyhead[R]{}
\fancyfoot[R]{\thepage}
\fancyheadoffset[lh]{2cm}
%% - - - - - RESUMEN EJECUTIVO - - - - -
%
\include{1-resumen-ejecutivo.tex} % works
%
\tableofcontents
% - - - - - INTRODUCCIÓN - - - - -
\clearpage % para que el siguiente comando empiece en una página nueva
\pagenumbering{arabic} % numeración en números arábigos
\include{2-introduccion.tex} % works
% - - - - - CAPÍTULO 1 - - - - -
\include{3-capitulo-1.tex} % works
% - - - - - CAPÍTULO 2 - - - - -
\include{4-capitulo-2.tex} % doesn't work
% - - - - - CAPÍTULO 3 - - - - -
\include{5-capitulo-3.tex}% doesn't work
% - - - - - BIBLIOGRAFÍA - - - - -
\printbibliography
\end{document}
我的 .bib 文件中的引用是:
@video{solarsolutionSolarPanelsExplained2021,
entrysubtype = {video},
title = {Solar {{Panels Explained}}: {{Mono}} // {{Poly PV Crystalline}} // {{PERC}} // {{Thin Film Modules}}},
shorttitle = {Solar {{Panels Explained}}},
editor = {{Solar Solution}},
editortype = {director},
date = {2021-09-11},
url = {https://www.youtube.com/watch?v=ue3udnwuA5g},
abstract = {Course trailer and Coupon Code:~~~•~Off-Grid~Energy~C...~~ === Energy Engineer Jesse Gorter explains in this video how solar panels work, which materials they are made of, and what makes one panel better than the other. ✅ Content: 02:00 Photo Voltaics 04:37 Material Options 05:24 Solar Panel Efficiency 08:12 From PV Cell to Module 09:01 PV Busbars and Fingers 11:25 Solar Panel Layers 14:02 Bypass Diodes 16:14 MC4 Connectors ✅ YouTube Channel ~~~/~solarsolution~~ ✅ Playlists Wiring ~~~•~Wiring~~ Costs ~~~•~Cost~-~Off~grid~~ Charging ~~~•~Charging~~ Batteries ~~~•~Batteries~~ Solar Panels ~~~•~Solar~Panels~~ ✅ Online Video Course Learn more through the Online Video Courses: https://courses.solarsolution.co ✅ Facebook https://web.facebook.com/solarsolutio... ✅ LinkedIn https://www.linkedin.com/company/sola... ✅ Website https://www.solarsolution.co/contact DISCLAIMER: The content of this video is for information purposes only. If you choose to use any information provided through this video, you do so at your own risk. Viewing and/or listening to this video does not form a professional relationship of any kind. All rights reserved. COPYRIGHT Solar Solution. \#Solar Panel \#PV Module \# PV Module \#Photovoltaic module}
}
答案1
我认为你的问题重复了Biblatex APA 样式不支持编辑器类型?
您必须定义typedirector
字符串(用西班牙语,因为您使用该语言),并添加以下代码:
\NewBibliographyString{director}
\NewBibliographyString{directors}
\NewBibliographyString{bydirector}
\NewBibliographyString{cbydirector}
\NewBibliographyString{typedirector}
\NewBibliographyString{typedirectors}
\DefineBibliographyStrings{spanish}{%
director = {director},
directors = {directores},
typedirector = {director},
typedirectors = {directores},
bydirector = {dirigido por},
cbydirector = {dir\adddot},
}
以下是完整的示例(下次,尝试制作你的 MWE最小):
\begin{filecontents}{bibliografia.bib}
@video{solarsolutionSolarPanelsExplained2021,
entrysubtype = {video},
title = {Solar {{Panels Explained}}: {{Mono}} // {{Poly PV Crystalline}} // {{PERC}} // {{Thin Film Modules}}},
shorttitle = {Solar {{Panels Explained}}},
editor = {{Solar Solution}},
editortype = {director},
date = {2021-09-11},
url = {https://www.youtube.com/watch?v=ue3udnwuA5g},
abstract = {Course trailer and Coupon Code:~~~•~Off-Grid~Energy~C...~~ === Energy Engineer Jesse Gorter explains in this video how solar panels work, which materials they are made of, and what makes one panel better than the other. ✅ Content: 02:00 Photo Voltaics 04:37 Material Options 05:24 Solar Panel Efficiency 08:12 From PV Cell to Module 09:01 PV Busbars and Fingers 11:25 Solar Panel Layers 14:02 Bypass Diodes 16:14 MC4 Connectors ✅ YouTube Channel ~~~/~solarsolution~~ ✅ Playlists Wiring ~~~•~Wiring~~ Costs ~~~•~Cost~-~Off~grid~~ Charging ~~~•~Charging~~ Batteries ~~~•~Batteries~~ Solar Panels ~~~•~Solar~Panels~~ ✅ Online Video Course Learn more through the Online Video Courses: https://courses.solarsolution.co ✅ Facebook https://web.facebook.com/solarsolutio... ✅ LinkedIn https://www.linkedin.com/company/sola... ✅ Website https://www.solarsolution.co/contact DISCLAIMER: The content of this video is for information purposes only. If you choose to use any information provided through this video, you do so at your own risk. Viewing and/or listening to this video does not form a professional relationship of any kind. All rights reserved. COPYRIGHT Solar Solution. \#Solar Panel \#PV Module \# PV Module \#Photovoltaic module}
}
\end{filecontents}
\documentclass[12pt]{report}
%\usepackage[utf8]{inputenc}<--- no more needed
\usepackage[spanish]{babel} % pone el idioma en español
\setcounter{tocdepth}{3} % pone en TOC hasta la subsubsección
\setcounter{secnumdepth}{3} % enumera hasta la subsubsección
\usepackage{lipsum} % dummy text
\usepackage{graphicx}
\usepackage{geometry} % margenes del documento
\geometry{letterpaper, top = {2,5cm}, bottom = {2,5cm}, inner = {2,5cm},
outer = {2,5cm}, head = {1,1cm}, foot = {1,1cm}, bindingoffset = {1,0cm}}
% Si se va a usar dos paginas por hoja, agregar la opción twoside
\usepackage{helvet} % Arial
\renewcommand{\familydefault}{\sfdefault} % Arial
\usepackage{titlesec} % cambiar modo de ver capitulos y secciones
\titleformat{\chapter}[display]
{\large\bfseries\centering}{\MakeUppercase\chaptertitlename\ \thechapter}{1em}{\MakeUppercase}{} % Cambios en Capitulo
\titleformat{\section}{\large\bfseries}{\thesection.}{1em}{\MakeUppercase}
\titleformat{\subsection}{\normalsize\bfseries}{\thesubsection.}{1em}{\MakeUppercase} % Cambios en SubSección
\titleformat{\subsubsection}{\normalsize\bfseries}{\thesubsubsection.}{1em}{\MakeUppercase} % Cambios en SubSubSección
\titlespacing*{\chapter}{0pt}{-2.5em}{3em} % Cambia el espaciamiento del capitulo de 50pt a lo pedido
\titlespacing*{\section}{0pt}{3em}{2em} % Cambia el espaciamiento de la sección a 3 espacios en blanco antes y 2 despues.
\usepackage{enumitem}
%\setlist[enumerate]{label=\thesection.\arabic*., leftmargin=*}
%\renewcommand*{\theenumi}{\thechapter.\arabic{enumi}} % numero de capitulo en listas
%\renewcommand*{\theenumii}{\theenumi.\arabic{enumi}} % añade lo anterior a sublistas
\usepackage{titletoc}
\titlecontents{chapter}[0em]
{\vspace{0em}}
{\normalfont\normalsize\contentslabel[\thecontentslabel.]{2em}\uppercase}
{\hspace*{-2em}\uppercase}
{\titlerule*[.75em]{.}\contentspage}
\titlecontents{section}[2em]
{\vspace{0em}}
{\normalfont\normalsize\contentslabel[\thecontentslabel.]{2em}\uppercase}
{\hspace*{-2em}\uppercase}
{\titlerule*[.75em]{.}\contentspage}
\titlecontents{subsection}[5em]
{\vspace{0em}}
{\normalfont\normalsize\contentslabel[\thecontentslabel.]{2.9em}\uppercase}
{\hspace*{-2em}\uppercase}
{\titlerule*[.75em]{.}\contentspage}
\titlecontents{subsubsection}[9em]
{\vspace{0em}}
{\normalfont\normalsize\contentslabel[\thecontentslabel.]{3.8em}\uppercase}
{\hspace*{-2em}\uppercase}
{\titlerule*[.75em]{.}\contentspage}
\usepackage{setspace}
\renewcommand{\baselinestretch}{1.5} % interlineado de 1.5
\usepackage[skip=6pt, indent=1cm, tocskip]{parskip} % configurar espacio entre parrafos y sangría izquierda. tocskip genera el salto entre parrafos en el indice
% paquetes necesarios para citar
\usepackage{csquotes}
\usepackage[style=apa, sortcites]{biblatex}% backend=biber and url=true are defaults, no need to add them
\NewBibliographyString{director}
\NewBibliographyString{directors}
\NewBibliographyString{bydirector}
\NewBibliographyString{cbydirector}
\NewBibliographyString{typedirector}
\NewBibliographyString{typedirectors}
\DefineBibliographyStrings{spanish}{%
director = {director},
directors = {directores},
typedirector = {director},
typedirectors = {directores},
bydirector = {dirigido por},
cbydirector = {dir\adddot},
}
\addbibresource{bibliografia.bib}
\usepackage{etoolbox}
\patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{fancy}}{}{} % necesario para poner encabezado en paginas de capítulos
% paquete para encabezado y pie de pagina
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancypagestyle{mystyle}{
\fancyfoot{}
\renewcommand{\thepage}{\ifnum\value{page}<10 0\fi\arabic{page}}
}
\pagestyle{mystyle} % Aplicar el estilo de numeración de página personalizado
\usepackage[labelfont=bf]{caption} %% Formato de pies de foto
\usepackage[]{hyperref}
% - - - - - COMANDOS - - - - -
\newenvironment{itemizecita}{%
\begin{itemize}
\setlength{\leftskip}{1.27cm}
}{%
\end{itemize}
}
\long\def\citalarga#1{%
\medskip
\begingroup
\parindent 0pt
\leftskip=1.27cm
#1
\par
\endgroup
\medskip
}
\long\def\citalargacontinuacion#1{\medskip
\begingroup
\parindent 1.27cm
\leftskip=1.27cm
#1 \par \medskip
\endgroup
}
\long\def\resej#1{\medskip
\begingroup
\parindent 0pt
\leftskip=1.5em
#1 \par \medskip
\endgroup
}
% - - - - - PORTADA - - - - -
\title{\textbf{\MakeUppercase{text}}}
\author{text}
\date{}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
离题:您确定在页面的两侧都有“BIBLIOGRAFÍA”吗?