I'm new to this whole latex thing and I'm having trouble understanding and defining the order in which my references appear after being compiled. I would like them to be sorted alphabetically based on the first entry in the "author" field; however, the order in which they are appearing in the PDF seems to be entirely random. What am I doing wrong?
Here's how a section of my .bib file is written as of right now:
@online{plano_diretor,
author = "Belo Horizonte",
title = " Lei nº 11.181, de 8 de agosto de 2019, aprova o Plano Diretor, em consonância com o disposto no Estatuto da Cidade",
url = "https://www.cmbh.mg.gov.br/atividade-legislativa/pesquisar-legislacao/lei/11181/2019",
addendum = "(acesso em: 02/09/2023)",
keywords = "plano_diretor,11.181"
}
@online{bh_map,
author = "Prefeitura de Belo Horizonte",
title = " BH Map - Mapa Oficial da Prefeitura de Belo Horizonte",
url = "https://bhmap.pbh.gov.br/v2/mapa/idebhgeo#zoom=4&lat=7796893.0925&lon=609250.9075&baselayer=base",
addendum = "(acesso em: 02/09/2023)",
keywords = "BH_Map,bh map"
}
@online{PMSBH,
author = "Prefeitura de Belo Horizonte",
title = "Plano Municipal de Saneamento de Belo
Horizonte 2020/2023 (PMS 2020/2023).",
url = "https://prefeitura.pbh.gov.br/sites/default/files/estrutura-de-governo/obras-e-infraestrutura/2021/_pms2020-2023_texto_completo.pdf",
addendum = "(acesso em: 02/09/2023)",
keywords = "pmsbh"
}
@article{starling2015risco,
title={O risco geol{'o}gico como justificativa para remo{\c{c}}{~o}es for{\c{c}}a-\das no Aglomerado Santa L{'u}cia e na Vila Bandeirantes em Belo Horizonte},
author={Starling, Paula Miller},
year={2015},
publisher={Universidade Federal de Minas Gerais}
}
@article{PRAD_ICMbio,
title={Roteiro de Apresentação para Plano de Recuperação
de Área Degradada (PRAD) Terrestre},
author={Instituto Chico Mendes da Conservação da Biodiversidade - ICMbio},
year={2013},
publisher={Ministério do Meio Ambiente}
}
@article{Unidades_Geotecnicas,
title={Caracterização das unidades geotécnicas da porção leste da região metropolitana de Belo Horizonte–MG},
author={dos Reis Junior, Walter and Parizzi, Maria Giovana},
year={2018},
publisher={Geonomos}
}
@article{areas_inundacao,
title={Áreas de risco município de Belo Horizonte},
author={PRODABEL},
year={2022},
publisher={Prefeitura de Belo Horizonte}
}
@article{NBR12216,
title={NBR 12216: Projeto de estação de tratamento de água para abastecimento público},
author={Associação Brasileira de Normas Técnicas},
year={1992},
publisher={ABNT}
}
@article{Abastecimento_agua,
title={Abastecimento de Água para Consumo Humano},
author={Heller, Léo and de Pádua, Valter Lúcio},
year={2006},
publisher={Editora UFMG}
}
here's how my main.tex file looks like:
\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
%\usepackage[sorting=nyt]{biblatex}
\usepackage[
backend=biber,
style=numeric,
sorting=nyt
]{biblatex}
\addbibresource{biblio.bib}
\input{00_config}
\onehalfspacing
\usepackage[nottoc]{tocbibind}
\belowcaptionskip=10pt
\newtoggle{beforesection}
\preto\section{\toggletrue{beforesection}}
\preto\subsection{\toggletrue{beforesection}}
\preto\subsubsection{\toggletrue{beforesection}}
\preto\table{\iftoggle{beforesection}{\togglefalse{beforesection}}{}}
\newtoggle{captionedtable}
\preto\caption{\toggletrue{captionedtable}}
\AtEndEnvironment{table}{\iftoggle{beforesection}{\iftoggle{captionedtable}{\togglefalse{captionedtable}}{\vspace{-30pt}}}{\iftoggle{captionedtable}{\togglefalse{captionedtable}}{\vspace{-15pt}}}}
\AtEndEnvironment{figure}{{\vspace{-10pt}}}
%começa cada seção em uma nova pagina
%\let\oldsection\section
%\renewcommand\section{\clearpage\oldsection}
\begin{document}
\input{titlepage}
\clearpage
\newpage
\input{folharosto}
\clearpage
\newpage
\tableofcontents
\clearpage
\newpage
\listoffigures
\listoftables
\clearpage
\newpage
\input{01_intro}
\input{02_objetivos}
\input{03_diag_area}
%\input{04_sistema_de_transportes}
\input{05_abastecimento_de_agua}
\input{06_esgotamento_sanitário}
\input{07_drenagem_de_águas_pluviais}
\input{08_aterro_sanitario}
\input{09_projeto_estrutural}
%\input{10_Conclusão}
\clearpage
\newpage
\printbibliography[heading=bibintoc]
\clearpage
\newpage
\nocite{*}
\end{document}
and i will attach an image to show how my compiled file looks like
I wanted my references with authors whose names start with the letter "A" to appear first and so on.
I am definitely not a programmer and I am writing this document with five other colleagues, none of whom are programmers either, so I apologize for this messy code.


\inputting, so we cannot run your example or even be sure that we see all the code we need to see to diagnose the problem. From what I can tell from the code so far you are missing curly braces around "corporate" authors (https://tex.stackexchange.com/q/10808/35864): It needs to beauthor = "{Prefeitura de Belo Horizonte}",, notauthor = "Prefeitura de Belo Horizonte",, otherwise Biber tries to split the name into family and given name and sort it that way, which goes wrong for non-person names. ... – moewe Nov 09 '23 at 06:04.bibfile you have shown does not explain. Some names are separated withe, some with&. This shouldn't happen and I can only presume this is because you used the wrong input format. The correct format is explained in https://tex.stackexchange.com/q/557/35864, https://tex.stackexchange.com/q/36396/35864. It looks like you're trying to manually imitate ABNT style, in which case you should probably just load https://www.ctan.org/pkg/biblatex-abnt instead. – moewe Nov 09 '23 at 06:07