尝试更改书目标题样式,现在 \printbibliography 没有输出

尝试更改书目标题样式,现在 \printbibliography 没有输出

因此,我一直在尝试改变参考文献部分的样式以匹配小节的样式(而不是部分),并且我尝试了几乎所有在这里和在 Google 上可以找到的建议。

我找到了一些代码,可以产生我的视觉的预期输出:

在此处输入图片描述

但这也导致\printbibliography不产生任何输出。

有人可以告诉我我做错了什么吗?

不管怎样,我正在完全使用 Overleaf 工作,并且日志没有显示任何错误。

梅威瑟:

\documentclass[11pt,a4paper]{article}
\usepackage{authblk}
\usepackage[default]{sourcesanspro}
\usepackage[english,brazil]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[authordate,natbib=true,backend=biber,bibencoding=inputenc,doi=false,url=true,isbn=false,footmarkoff]{biblatex-chicago}
\usepackage{csquotes}
\usepackage[usenames,dvipsnames,table]{xcolor}
\usepackage{fancyhdr}
\usepackage{setspace}
\usepackage{lipsum}

\begin{filecontents}{refs.bib}
@techreport{ipea2022,
    author = {Góes, G. and Firmino, A. and Martins, F.},
    title ={{Painel da Gig Economy no setor de transportes do Brasil: quem, onde, quantos e quanto ganham}},
    institution = {IPEA},
    number = {55},
    year = {2022},
    type = {Nota de conjuntura},
}

@techreport{fiocruz2022,
    author = {Carvalho, C. C. and Viacava, F. and Oliveira, R. D. and Martins, M. and Abrahão, L. D.},
    title = {{Internações por Condições Sensíveis à Atenção Primária (ICSAP): análise do quesito raça/cor}},
    institution = {{PROADESS}},
    number = {10},
    year ={2022},
    type = {Boletim Informativo}
}
\end{filecontents}
\addbibresource{refs.bib}


\addto{\captionsbrazil}{%
  \renewcommand{\printbibliography}{\subsection*{\refname}}
  }

% Columns
\usepackage{multicol}
\setlength{\columnsep}{0.25in}

% Define color
\definecolor{IEPS-A}{RGB}{255,194,14}
\definecolor{IEPS-L}{RGB}{247,148,29}

% Section heading styles
\usepackage{titlesec}

\titleformat{\section}
  {\Large\usefont{OT1}{phv}{b}{n}}
  {}
  {0pt}
  {\colorsection}
\titlespacing*{\section}{0pt}{\baselineskip}{\baselineskip}
\newcommand{\colorsection}[1]{%
  \colorbox{IEPS-A!30}{\parbox{\dimexpr\textwidth-2\fboxsep}{\thesection\ #1}}}

%\titleformat*{\section}{\Large\usefont{OT1}{phv}{b}{n}\color{IEPS-A}}
\titleformat*{\subsection}{\Large\usefont{OT1}{phv}{b}{n}\color{IEPS-L}}
\titleformat*{\subsubsection}{\large\usefont{OT1}{phv}{b}{n}\color{IEPS-A}}

% Section heading spacing (reduced space below headings)
\titlespacing\section{0pt}{3ex plus 7.2ex minus .2ex}{1ex}
\titlespacing\subsection{0pt}{3.5ex plus 1.2ex minus .2ex}{0ex}
\titlespacing\subsubsection{0pt}{3.25ex plus 1.2ex minus .2ex}{0ex}

% Define a title note command
\newcommand\titlenote[1]{\renewcommand\@titlenote{#1}}


\begin{document}

\title{\parbox{\linewidth}{\centering Title}}
\author[1]{}

\maketitle
\thispagestyle{fancy}
\par

\section{Introduction}
\medskip

\lipsum[1-1]  \citep{ipea2022} \citep{fiocruz2022}.

\begin{multicols}{2}

\subsection*{Authors}
\medskip

\textbf{Author 1}\\
\textit{\footnotesize{Affiliation}}\\

\subsection*{Thanks}
\smallskip

So long, and thanks for all the fish!

\printbibliography

\end{multicols}

\vspace{1 cm}

\noindent \rule{\linewidth}{0.25pt}

\vspace{1 cm}

\begin{center}
www.website.com
\end{center}
        
\end{document}

答案1

在此处输入图片描述

您需要编写heading=subbibliography选项,以\printbibliography生成参考书目作为子部分

\documentclass[11pt,a4paper]{article}
\usepackage{authblk}
\usepackage[default]{sourcesanspro}
\usepackage[english,brazil]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[authordate,natbib=true,backend=biber,bibencoding=inputenc,doi=false,url=true,isbn=false,footmarkoff]{biblatex-chicago}
\usepackage{csquotes}
\usepackage[usenames,dvipsnames,table]{xcolor}
\usepackage{fancyhdr}
\usepackage{setspace}
\usepackage{lipsum}

\begin{filecontents}{refs.bib}
    @techreport{ipea2022,
        author = {Góes, G. and Firmino, A. and Martins, F.},
        title ={{Painel da Gig Economy no setor de transportes do Brasil: quem, onde, quantos e quanto ganham}},
        institution = {IPEA},
        number = {55},
        year = {2022},
        type = {Nota de conjuntura},
    }
    
    @techreport{fiocruz2022,
        author = {Carvalho, C. C. and Viacava, F. and Oliveira, R. D. and Martins, M. and Abrahão, L. D.},
        title = {{Internações por Condições Sensíveis à Atenção Primária (ICSAP): análise do quesito raça/cor}},
        institution = {{PROADESS}},
        number = {10},
        year ={2022},
        type = {Boletim Informativo}
    }
\end{filecontents}
\addbibresource{refs.bib}


% Columns
\usepackage{multicol}
\setlength{\columnsep}{0.25in}

% Define color
\definecolor{IEPS-A}{RGB}{255,194,14}
\definecolor{IEPS-L}{RGB}{247,148,29}

% Section heading styles
\usepackage{titlesec}

\titleformat{\section}
{\Large\usefont{OT1}{phv}{b}{n}}
{}
{0pt}
{\colorsection}
\titlespacing*{\section}{0pt}{\baselineskip}{\baselineskip}
\newcommand{\colorsection}[1]{%
    \colorbox{IEPS-A!30}{\parbox{\dimexpr\textwidth-2\fboxsep}{\thesection\ #1}}}

%\titleformat*{\section}{\Large\usefont{OT1}{phv}{b}{n}\color{IEPS-A}}
\titleformat*{\subsection}{\Large\usefont{OT1}{phv}{b}{n}\color{IEPS-L}}
\titleformat*{\subsubsection}{\large\usefont{OT1}{phv}{b}{n}\color{IEPS-A}}

% Section heading spacing (reduced space below headings)
\titlespacing\section{0pt}{3ex plus 7.2ex minus .2ex}{1ex}
\titlespacing\subsection{0pt}{3.5ex plus 1.2ex minus .2ex}{0ex}
\titlespacing\subsubsection{0pt}{3.25ex plus 1.2ex minus .2ex}{0ex}

% Define a title note command
\newcommand\titlenote[1]{\renewcommand\@titlenote{#1}}


\begin{document}
    
    \title{\parbox{\linewidth}{\centering Title}}
    \author[1]{}
    
    \maketitle
    \thispagestyle{fancy}
    \par
    
    \section{Introduction}
    \medskip
    
    \lipsum[1-1]  \citep{ipea2022} \citep{fiocruz2022}.
    
    \begin{multicols}{2}
        
        \subsection*{Authors}
        \medskip
        
        \textbf{Author 1}\\
        \textit{\footnotesize{Affiliation}}\\
        
        \subsection*{Thanks}
        \smallskip
        
        So long, and thanks for all the fish!
        
        \printbibliography[heading=subbibliography]
        
    \end{multicols}
    
    \vspace{1 cm}
    
    \noindent \rule{\linewidth}{0.25pt}
    
    \vspace{1 cm}
    
    \begin{center}
        www.website.com
    \end{center}
    
\end{document}

相关内容