0

I tried by the middle of the following questions:

But all these commands do not work in BibLaTeX. They work only in BibTeX.

I use the package biblatex-abnt and the class abntex2, based on memoir. I run XeLaTeX.

Here is the small MWE code:

\documentclass[11pt, article, a4paper, oneside, sumario=tradicional, chapter=TITLE, section=TITLE, subsection=Title, subsubsection=title, subsubsubsection=title, english, german, greek, portuguese]{abntex2}

\usepackage{babel}
\usepackage[autostyle]{csquotes}
\usepackage[backend = biber, dateabbrev = false, giveninits, ittitles, justify, language = brazil, sorting = nyt, style = abnt, url = true]{biblatex}
\usepackage{parskip}
\usepackage{setspace}

\addbibresource{referencias.bib}

\begin{filecontents}{referencias.bib}
@article{antonioleitao,
    Address = {Campinas},
    author = {Antonio Leitão},
    date = {1996-10-08},
    Publisher = {UNICAMP},
    title = {Funções Recursivas},
    url = {http://www.dca.fee.unicamp.br/courses/EA072/lisp9596/node17.html},
    urldate = {2018-11-03}
}
\end{filecontents}

\local{Brasil}
\data{2018}

\begin{document}

\titulo{Teoria da Computação}
\tituloestrangeiro{}
\autor{Gustavo Costa}

\frenchspacing 
\maketitle

\renewcommand{\refname}{BIBLIOGRAFIA}

\makeatletter
\renewcommand\bibsection{%
  \section*{{\normalsize\underline{\refname}}\@mkboth{\MakeUppercase{\refname}}{\MakeUppercase{\refname}}}\vspace*{-10mm}%
}%
\makeatother

\cite{antonioleitao}

\printbibliography

\end{document}
Oo'-
  • 269
  • 2
    The MWE as posted produces no output at all: It is again missing citation commands (and a .bib file) so that the bibliography comes out as non-empty. This makes me suspect that you did not run the code shown in the answer to verify that it reproduces the problem. Since I strongly urged you to test the code you submit in your last question just a few hours ago, I am going to downvote this question. I will happily retract the downvote once you provide a usable minimal example (see https://tex.meta.stackexchange.com/q/228/35864 and https://tex.meta.stackexchange.com/q/4407/35864). – moewe Dec 13 '18 at 07:32
  • 1
    The updated code includes a .bib file now (good), but it still does not \cite anything. That still means that there is no output. Please note that I'm not asking you to add stuff to your MWE because it does not work for me: I'm asking you to make sure that the MWE shows the issue you are asking about. The fact that the MWE does not compile to any output clearly proves that you did not test that it shows the issue (or if you did, ignored that fact that it did not). The code you show in the question must always reproduce the issue and you must always very that before you submit it. – moewe Dec 13 '18 at 07:41
  • The MWE compiles now. Thank you. I trust that you did run the exact code as posted on your machine in a new, empty folder to verify that it reproduces the issue, so I retracted the downvote. The space between the bibliography heading and the bibliography body seems to be the same as the space between any other \chapter* and the text body. Apparently your class enforces this excessive space. Do you want to change this (i) only for the bibliography, (ii) for all unnumbered \chapter*s or (iii) for \chapter and \chapter*. – moewe Dec 13 '18 at 07:49
  • I want only (i). – Oo'- Dec 13 '18 at 07:51
  • 1
    That will make things terribly inconsistent though, are you sure? – moewe Dec 13 '18 at 07:52
  • Yes, @moewe. OK for long code! – Oo'- Dec 13 '18 at 07:53
  • @moewe, inconsistent and uglier. But as the saying goes, "the client is always right". –  Dec 13 '18 at 23:40

1 Answers1

2

abntex2 is based on memoir and the memoir class controls the space between \chapter and the following text (amongst others) with \afterchapskip. The default value of \afterchapskip is 40pt, but we can reduce that for the bibliography heading.

\documentclass[11pt, article, a4paper, oneside, sumario=tradicional,
               chapter=TITLE, section=TITLE, subsection=Title,
               subsubsection=title, subsubsubsection=title,
               english, german, greek, portuguese]{abntex2}

\usepackage{babel}
\usepackage[autostyle]{csquotes}
\usepackage[backend = biber, style = abnt, sorting = nyt, ittitles, justify, 
            dateabbrev = false, giveninits, url = true]{biblatex}
\usepackage{parskip}
\usepackage{setspace}

\makeatletter
\defbibheading{bibliography}[\bibname]{%
  \begingroup
  \setlength{\afterchapskip}{0pt}
  \chapter*{#1}%
  \if@twoside
    \markboth{\abx@MakeMarkcase{#1}}{\abx@MakeMarkcase{#1}}%
  \else
    \markright{\abx@MakeMarkcase{#1}}%
  \fi
  \ifmemoirbibintoc
    {\phantomsection
     \addcontentsline{toc}{chapter}{#1}}
    {}
  \endgroup}
\makeatother


\addbibresource{biblatex-examples.bib}
\local{Brasil}
\data{2018}

\begin{document}
\chapter{Lorem}
Lore ipsum

\chapter*{Dolor}
Dolor sit

\cite{sigfridsson}

\printbibliography
\end{document}

The MWE shows one <code>\chapter</code> and one <code>\chapter*</code> both with large vertical distance between heading and text. It also shows the bibliography with no space between heading and text.

moewe
  • 175,683
  • 2
    For a pure memoir version of this question (without biblatex interfering) see https://tex.stackexchange.com/q/318038/35864. – moewe Dec 13 '18 at 15:27
  • Thank you for the indication. I have bookmarked. – Oo'- Dec 13 '18 at 18:00