0

I have problem on how to make the bibliography items left-aligned.

My current bibliography output is below:

enter image description here

@misc{Steven,
  author = {{Berkeley - School of Information}},
  title = {{Steven Weber}},
  howpublished = "\url{https://www.ischool.berkeley.edu/people/steven-weber/}",
  year = {2019}, 
  note = "[Online; acessado em 25-fev-2019]"
}

@misc{AnnaLee,
  author = {{Berkeley - School of Information}},
  title = {{AnnaLee Saxenian}},
  howpublished = "\url{https://www.ischool.berkeley.edu/people/AnnaLee-Saxenian/}",
  year = {2019}, 
  note = "[Online; acessado em 25-fev-2019]"
}

As you can see, the reference item code is currently right-aligned, and I need it to be left-aligned. Any idea on how to achieve that?

My current code for the bibliography is:

\documentclass[tikz,table,border=2mm,12pt]{article}

\usepackage{sbc-template}
\usepackage{graphicx}
\usepackage{url}
\usepackage[brazil]{babel}   
\usepackage[utf8]{inputenc}  
\usepackage{xcolor}
\usepackage{tabu}
\usepackage{colortbl}     
\usepackage{PTSansNarrow}
\usepackage[T1]{fontenc}
\usepackage{array,tabularx}
\usepackage[most]{tcolorbox}
\usepackage[colorlinks,citecolor=black,urlcolor=blue]{hyperref}
\usepackage{multirow}
\usepackage{threeparttable}
\usepackage{enumitem}
\newlist{steps}{enumerate}{1}
\setlist[steps, 1]{label = Passo \arabic*:}
\usepackage{indentfirst}
\usepackage{textgreek}

\bibliographystyle{unsrt}
\bibliography{sbc-template}

\end{document}
  • 3
    Welcome to TeX.SE! Please do not include code as image, we can not copy it and test it on our computers. In your case please add a minimal working example with bibliography (MWEB) – Kurt Apr 23 at 18:38
  • 1
    @Mico it seems come from sbc.org.br/documentos-da-sbc/summary/… (see the old URL displayed in this question: tex.stackexchange.com/q/98982/132405, before my edit, currently in queue for peer review) – quark67 Apr 23 at 19:45
  • 1
    @Mico The old URL looks like this (archived by archive.org): web.archive.org/web/20140701053656/http://www.sbc.org.br/… so I'm confident the new correct URL is sbc.org.br/documentos-da-sbc/summary/… – quark67 Apr 23 at 19:54
  • 1
    @quark67 - Thanks. (Aside: I've gone ahead and "approved" your edit of the earlier posting.) Let's wait and see if the OP is willing to provide some additional highly useful pieces of information, such as the bibliography style that's in use. For all we know, the style might be sbc, but it might just as well be some other bib style. – Mico Apr 23 at 19:55
  • 1
    Please check the link I gave you in the first comment: we need an compilabe tex code, starting with \documentclass and ending with \end{document} building the bibliography in your shown image. If your used package sbc-template is relevant for your issue please add a link to it into your question! – Kurt Apr 24 at 19:25
1

The sbc package has a strange redefinition of thebibliography, undoing it partially:

\documentclass[tikz,table,border=2mm,12pt]{article}

\usepackage{sbc-template}
\usepackage{graphicx}
\usepackage{url}
\usepackage[brazil]{babel}   
\usepackage[utf8]{inputenc}  
\usepackage{xcolor}
\usepackage{tabu}
\usepackage{colortbl}     
\usepackage{PTSansNarrow}
\usepackage[T1]{fontenc}
\usepackage{array,tabularx}
\usepackage[most]{tcolorbox}
\usepackage[colorlinks,citecolor=black,urlcolor=blue]{hyperref}
\usepackage{multirow}
\usepackage{threeparttable}
\usepackage{enumitem}
\newlist{steps}{enumerate}{1}
\setlist[steps, 1]{label = Passo \arabic*:}
\usepackage{indentfirst}
\usepackage{textgreek}
\usepackage{ragged2e}


\makeatletter
\renewenvironment{thebibliography}[1]
     {\section*{\refname
        \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}}%
      \list{\@biblabel{\@arabic\c@enumiv}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \leftmargin\labelwidth
            \advance\leftmargin\labelsep
            %% changed!
%               \itemindent -\leftmargin
               \itemsep 6pt
            %%%%%%%%%%%
            \@openbib@code
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c@enumiv}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}
\makeatother


\begin{document}

test

\nocite{*}

{
\RaggedRight
\bibliographystyle{unsrt} 
\bibliography{sbc-template}
}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.