1

I'm trying to edit the abnt style so that the printed reference

  1. looses the "<" and ">" around a url
  2. S.l.: s.n. in italic
  3. how can I change citation (Instruments, 2019) to (National Instuments, 2019), like how bibtex is doing with red hat.
  4. when there are two articles with the same author it prints the author's name for each refernce( now the second reference has _______ in place of the authers name) I created a reduced tex file so i could fiddle with the code to find a solution but i wasn't able to here are the tex and bib files I'm working on. thanks for any help.

 \documentclass{article}
 \usepackage[T1]{fontenc}       
 \usepackage[utf8]{inputenc}        
 \usepackage[brazil]{babel}     
 \usepackage{csquotes}

 \usepackage[style=abnt,backend=biber,citecounter=true,backrefstyle=three]{biblatex}
 \DefineBibliographyStrings{brazil}{%
 }

 \bibliography{ref}
 \begin{document}

 \section{Introduction}
 \cite{website:ArduinoLabview}
 \cite{website:OPENSOURCESW}
 \cite{website:OPENSOURCEHW}
 \printbibliography

 \end{document}

and the bib file

@misc{website:ArduinoLabview,
      author = "National Instruments",
      title = "Arduino™ Compatible Compiler for LabVIEW by Aledyne-TSXperts",
      year = "2019",
      url = "https://www.tsxperts.com/arduino-compatible-compiler-for-labview/",
      urldate     = {2019-06-07}
}

@misc{website:OPENSOURCEHW,
      author = "Red Hat, Inc.",
      title = "What is open hardware?",
      %year = "2012",
      url = "https://opensource.com/resources/what-open-hardware",
      urldate = {2019-06-07}
}

@misc{website:OPENSOURCESW,
      author = "Red Hat, Inc.",
      title = "What is open source?",
      %year = "2012",
      url = "https://opensource.com/resources/what-open-source",
      urldate = {2019-06-07}
}
moewe
  • 175,683
  • 1
    Welcome to TeX.se. On question 3, simply wrap the whole name in {...}. author="{National Instruments}" You should actually do that for the Red Hat example too. – Alan Munn Jun 14 '19 at 23:47
  • 1
    Question 1, \DeclareFieldFormat{url}{\bibstring{urlfrom}\addcolon\addspace\url{#1}}. The other two questions require more work. – Alan Munn Jun 15 '19 at 03:38
  • Please note that it is usually preferred to ask only one question per question. Having a question be about one specific issue instead of several (related, no doubt) issues makes it more relevant for other people and does not scare those who know answers to only some of the issues away. See https://tex.meta.stackexchange.com/q/7425/35864 – moewe Jun 15 '19 at 05:02

1 Answers1

1
  1. Should be solved with

    \DeclareFieldFormat{url}{\bibstring{urlfrom}\addcolon\addspace\url{#1}}
    

    the original definition in abnt.bbx is \DeclareFieldFormat{url}{\bibstring{urlfrom}\addcolon\addspace<\url{#1}>}%. See also Alan Munn's comment

  2. You can either add the italics directly to the relevant bibstrings with

    \DefineBibliographyStrings{brazil}{%
      sineloco     = {\mkbibemph{s\adddot l\adddot}},
      sinenomine   = {\mkbibemph{s\adddot n\adddot}},
    }
    

    or you could add emphasis to every call of \bibstring{sineloco} and \bibstring{sinenomine}. Since there are several such calls, the method of adding \mkbibemph to the bibstring directly is quicker. I'm not quite sure if I think adding \mkbibemph to the bibstrings directly is conceptually the best solution, but ...

  3. So-called corporate authors should be wrapped in an additional pair of curly braces to avoid them being parsed and split into family and given names like people's names. See Using a 'corporate author' in the "author" field of a bibliographic entry (spelling out the name in full). You need

    author = "{National Instruments}",
    

    and

    author = "{Red Hat, Inc.}",
    

    if you want to see only "Red Hat" in the citations for the latter, you could add

    shortauthor = {{Red Hat}},
    

    This was also mentioned by Alan Munn in the comments.

  4. Try the option repeatfields=true,. See for example https://github.com/abntex/biblatex-abnt/issues/43. The standard styles and some contributed styles have a similar feature that can be turned on and off with an option called dashed. See for example Get full name twice in Bibliography.

Putting all this together we get

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[brazil]{babel}
\usepackage{csquotes}

\usepackage[style=abnt, backend=biber, 
  repeatfields=true,
  citecounter=true, backrefstyle=three]{biblatex}

\DeclareFieldFormat{url}{\bibstring{urlfrom}\addcolon\addspace\url{#1}}

\DefineBibliographyStrings{brazil}{%
  sineloco     = {\mkbibemph{s\adddot l\adddot}},
  sinenomine   = {\mkbibemph{s\adddot n\adddot}},
}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{website:ArduinoLabview,
  author  = {{National Instruments}},
  title   = {Arduino™ Compatible Compiler for LabVIEW by Aledyne-TSXperts},
  year    = {2019},
  url     = {https://www.tsxperts.com/arduino-compatible-compiler-for-labview/},
  urldate = {2019-06-07},
}
@misc{website:OPENSOURCEHW,
  author      = {{Red Hat, Inc.}},
  shortauthor = {{Red Hat}},
  title       = {What is open hardware?},
  url         = {https://opensource.com/resources/what-open-hardware},
  urldate     = {2019-06-07}
}
@misc{website:OPENSOURCESW,
  author      = {{Red Hat, Inc.}},
  shortauthor = {{Red Hat}},
  title       = {What is open source?},
  url         = {https://opensource.com/resources/what-open-source},
  urldate     = {2019-06-07}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\cite{website:ArduinoLabview}
\cite{website:OPENSOURCESW}
\cite{website:OPENSOURCEHW}
\printbibliography
\end{document}

ABNT modified bibliography without angle brackets around the URL, with italics for "s.l" and "s.n." and repeated author names.

moewe
  • 175,683
  • +1 I resisted mentioning the possibility of adding the formatting to the bibstrings themselves, hence my "more work" comment. :) – Alan Munn Jun 15 '19 at 12:45
  • @AlanMunn I used to dislike adding the formatting to the bibstrings, but when it was discussed in the context of the French localisation module I came to peace with it. When it comes to details like this it gets hard to separate the .bbx/.cbx "style level" from the .lbx "language level". If French typography requires that Latin abbreviations be set in italics all the time, it becomes a bit more attractive to hard-code that directly. – moewe Jun 15 '19 at 12:56