LaTeX forum ⇒ BibTeX, biblatex and biberFormat specific words in citations and bibliography in Bibtex

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Diogo Remoaldo
Posts: 26
Joined: Mon Apr 06, 2015 8:24 pm

Format specific words in citations and bibliography in Bibtex

Postby Diogo Remoaldo » Mon Jan 21, 2019 8:15 pm

Hi, I have the following Latex code

  1. \documentclass[openright,a4paper,12pt,twoside]{report}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage[portuguese]{babel}
  4. \usepackage[T1]{fontenc}
  5. \usepackage{amsmath}
  6. \usepackage{amsfonts}
  7. \usepackage{amssymb}
  8. \usepackage{epstopdf}
  9. \usepackage{float}
  10. \usepackage{graphicx}
  11. \usepackage[hidelinks]{hyperref}
  12. \usepackage{url}
  13. \usepackage[all]{hypcap}
  14. \usepackage{caption}
  15. \usepackage[paper=a4paper,top=2cm,bottom=2cm,right=2.5cm,left=2.5cm,twoside ,bindingoffset=1cm,marginparwidth=0in,marginparsep=0in]{geometry}
  16. \usepackage{array}
  17. \usepackage{booktabs}
  18. \usepackage{tabularx}
  19. \usepackage{indentfirst}
  20. \usepackage[export]{adjustbox}
  21. \usepackage[font=small,labelfont=bf]{caption}
  22. \usepackage{enumitem}
  23. \usepackage[titletoc]{appendix}
  24. \usepackage{titlesec}
  25. \usepackage{multirow}
  26. \captionsetup[table]{position=above}
  27. \usepackage{siunitx}
  28. %\usepackage[stretch=10,shrink=10]{microtype}
  29. \newcolumntype{C}{>{\centering\arraybackslash}m}
  30. \sisetup{per-mode=symbol}
  31. \usepackage{hhline}
  32. \captionsetup[table]{position=above}
  33. \setcounter{secnumdepth}{4}
  34. \DeclareSIUnit{\year}{ano}
  35. \titleformat{\paragraph}
  36. {\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
  37. \titlespacing*{\paragraph}
  38. {0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
  39. \usepackage{eurosym}
  40. \usepackage{makeidx}
  41. \usepackage{subcaption}
  42. \usepackage{afterpage}
  43. \usepackage{booktabs}
  44. \usepackage{longtable}
  45. \usepackage{placeins}
  46. \usepackage{appendix}
  47.  
  48. \addto\captionsportuguese{
  49. \renewcommand\appendixname{Anexo}
  50. }
  51.  
  52. \usepackage[square,authoryear]{natbib}
  53. \bibliographystyle{dinat}
  54.  
  55.  
  56.  
  57. \setcitestyle{aysep={:}}
  58. \setlength{\belowcaptionskip}{-2pt}
  59.  
  60. \setlist{itemsep=2.0pt}
  61.  
  62. \setlength{\textfloatsep}{10pt plus 1.0pt minus 2.0pt}
  63.  
  64. \setlength{\floatsep}{5pt plus 1.0pt minus 2.0pt}
  65. \setlength{\intextsep}{5pt plus 1.0pt minus 2.0pt}
  66.  
  67. \setlength{\parindent}{2.0em}
  68. \setlength{\parskip}{0.5em}
  69.  
  70.  
  71. \usepackage{fancyhdr}
  72. \usepackage{lastpage}
  73.  
  74. \fancypagestyle{style1}{
  75. \fancyhead{}
  76. \fancyhead[LO,LE]{\nouppercase{\leftmark}}
  77. \renewcommand{\headrulewidth}{0.4pt}
  78. \fancyfoot{}
  79.  
  80. \fancyfoot[RO,LE]{\thepage}}
  81.  
  82. \fancypagestyle{plain}{%
  83. \fancyhf{}%
  84. \fancyfoot[RO,LE]{\thepage} %of \pageref{LastPage}}%
  85. \renewcommand{\headrulewidth}{0pt}}% Line at the header invisible
  86.  
  87.  
  88.  
  89.  
  90. \pdfinclusioncopyfonts=1
  91. \newcommand\blankpage{%
  92. \null
  93. \thispagestyle{empty}%
  94. \addtocounter{page}{-1}%
  95. \newpage}
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102. \begin{document}
  103.  
  104. \section*{Introdução}
  105. \pagestyle{style1}
  106.  
  107. A atitude consumista da sociedade, é visível através dos consumos energéticos excessivos a nível mundial, comportamento que se reflete na utilização de elevadas quantidades de energia proveniente de fontes não renováveis, ou de origem fóssil prejudiciais ao meio ambiente.
  108.  
  109. Os elevados consumos de energia, acarretam portanto grandes preocupações a nível ambiental para o nosso planeta, sendo os edifícios um dos sectores que mais energia consome. As primeiras preocupações relativamente ao excesso de energia consumida por este sector, remontam à primeira crise petrolífera em 1973 \citep{Sousa2012}. Nos Estados Unidos da América (EUA), os edifícios consomem quase 40$\%$ da energia primária do país e quase 70$\%$ da energia elétrica consumida, sendo expectável que os consumos aumentem até 2025 mais do que 50$\%$ \citep{Sousa2012}.
  110.  
  111. Na Europa estima-se que os edifícios consomem 40$\%$ do valor total da energia consumida pela União Europeia \citep{Sousa2012}, sendo assim responsáveis por uma significativa parcela dos \textit{greenhouse gas} (GHG) emitidos e que de acordo com muitas diretivas, prevê-se o seu aumento até 2050 \citep{Eu2010}. Para além da elevada quantidade de energia consumida, a nível mundial, este sector consome cerca de 30$\%$ dos materiais usados, 25$\%$ dos resíduos sólidos, 25$\%$ da água utilizada para as mais variadas atividades, 12$\%$ dos terrenos ocupados pela população e são responsáveis por 33$\%$ das emissões de $CO_2$ \citep{Chau2015395}.
  112.  
  113. A diretiva 2002/91/CE (\textit{EPBD - Energy Performance of Buildings Directive}) \citep{ComissaoEuropeia2003}, foi a primeira legislação Europeia, criada para a análise da performance energética dos edifícios. Esta diretiva, definiu os procedimentos que devem ser tomados por cada Estado Membro e os critérios que permitem estabelecer os requisitos de performance energética dos edifícios, tendo em vista a redução dos consumos energéticos deste sector. Em Maio de 2010, a diretiva da União Europeia (EU), 2010/31/EU , definiu como objetivo reduzir até 2020 em 20$\%$ as emissões de \textit{GHG} e em 80$\%$ até 2050 \citep{Eu2010}, em relação aos valores registados em 1990 e de modo a cumprir as metas definidas pelo protocolo de \textit{Kyoto} \citep{kyoto}.
  114.  
  115. Com vista à diminuição dos consumos energéticos neste sector, surgiram vários conceitos para obtenção de edifícios com consumos de energia reduzidos, nomeadamente os \textit{Passivhaus} (em 1988) e os \textit{nearly Zero Energy Building} (\textit{nZEB} em 2010), quer a nível Europeu, quer a nível Mundial.
  116.  
  117.  
  118. \pagestyle{plain}
  119. \bibliography{projetobibf}
  120. %\printbibliography
  121. \addcontentsline{toc}{chapter}{Bibliography}
  122.  
  123. \end{document}


And the following bibtex code

  1. @Misc{Sousa2012,
  2. Title = {{Energy Rehabilitation of Portuguese Residential Building Stock Through its Transformation into NZEB}},
  3. Author = {Sousa, Joana and Silva, Sandra},
  4. Year = {2012},
  5. Publisher = {Tortellini 2006},
  6. Pages = {41--48},
  7. }
  8.  
  9. @Misc{kyoto,
  10. author = {{United Nations}},
  11. title = {{KYOTO PROTOCOL TO THE UNITED NATIONS FRAMEWORK CONVENTION ON CLIMATE CHANGE}},
  12. year = {1998}
  13. }
  14.  
  15. @Article{Chau2015395,
  16. Title = {A review on Life Cycle Assessment, Life Cycle Energy Assessment and Life Cycle Carbon Emissions Assessment on buildings },
  17. Author = {C.K. Chau and T.M. Leung and W.Y. Ng},
  18. Journal = {Applied Energy },
  19. Year = {2015},
  20. Number = {0},
  21. Pages = {395 - 413},
  22. Volume = {143},
  23.  
  24. Abstract = {Abstract This paper provides a review on three streams of life cycle studies that have been frequently applied to evaluate the environmental impacts of building construction with a major focus on whether they can be used for decision making. The three streams are Life Cycle Assessment (LCA), Life Cycle Energy Assessment (LCEA) and Life Cycle Carbon Emissions Assessment (LCCO2A). They were compared against their evaluation objectives, methodologies, and findings. Although they share similar objectives in evaluating the environmental impacts over the life cycle of building construction, they show some differences in the major focuses of evaluation and methodologies employed. Generally, it has been revealed that quite consistent results can be derived from the three streams with regard to the relative contribution of different phases of life cycle. However, discrepancies occur among the findings obtained from the three streams when different compositions of fuel mixes are used in power generation, or when the overall impacts are not contributed mostly by greenhouse gases emissions. The use of different functional units in different studies also makes it difficult to compare results with benchmarks or results from previous studies. Besides, there are drawbacks in boundary scoping, methodology framework, data inventory and practices which impair their usefulness as a decision making support tool for sustainable building designs. },
  25. Doi = {http://dx.doi.org/10.1016/j.apenergy.2015.01.023},
  26. ISSN = {0306-2619},
  27. Keywords = {Life Cycle Assessment},
  28. Url = {http://www.sciencedirect.com/science/article/pii/S030626191500029X}
  29. }
  30.  
  31.  
  32. @Misc{Edifeenergia,
  33. author = {Filipa Cardoso},
  34. title = {NZEB: Uma definição incompleta para um conceito em evolução},
  35. howpublished = {Edifícios e Energia},
  36. month = {Julho},
  37. year = {2016},
  38. note = {Acedido em: 2019-01-18},
  39. url = {http://www.edificioseenergia.pt/pt/noticia/nzeb-uma-definicao-incompleta-para-um-conceito-em-evolucao2607},
  40. }
  41.  
  42. @Article{ComissaoEuropeia2003,
  43. Title = {{DIRECTIVA 2002/91/CE do Parlamento Europeu e do Conselho de 16 de Dezembro de 2002 relativa ao desempenho energ\'{e}tico dos edif\'{\i}cios}},
  44. Author = {{Comiss\~{a}o Europeia}},
  45. Journal = {Jornal Oficial das Comunidades Europeias},
  46. Year = {2003},
  47. Number = {11},
  48. Pages = {65--71},
  49. Volume = {L 1},
  50.  
  51. Abstract = {A reformula\c{c}\~{a}o da Directiva 2002/91/CE do Parlamento Europeu e do Conselho, de 16 de Dezembro de 2002, relativa ao desempenho energ\'{e}tico dos edif\'{\i}cios1, a seguir denominada “EPBD”, tem por objectivo clarificar e simplificar algumas disposi\c{c}\~{o}es, alargar o \^{a}mbito da directiva, refor\c{c}ar algumas das suas disposi\c{c}\~{o}es a fim de aumentar a efic\'{a}cia do respectivo impacto e prever o papel de lideran\c{c}a do sector p\'{u}blico. Com esta reformula\c{c}\~{a}o ser\'{a} facilitada a transposi\c{c}\~{a}o e a aplica\c{c}\~{a}o da EPBD e ser\'{a} utilizada uma parte significativa do potencial ainda por explorar em condi\c{c}\~{o}es de rentabilidade econ\'{o}mica no sector dos edif\'{\i}cios. Ao mesmo tempo, mant\^{e}m-se os objectivos e princ\'{\i}pios da actual directiva e, tal como antes, cabe aos Estados-Membros determinar os requisitos concretos e as formas de os aplicar.},
  52. File = {:C$\backslash$:/Users/Diogo Remoaldo/Desktop/Directiva\_200291CE\_Edificios.pdf:pdf}
  53. }
  54.  
  55. @Article{Eu2010,
  56. Title = {{Directive 2010/31/EU of the European Parliament and of the Council of 19 May 2010 on the energy performance of buildings}},
  57. Author = {EU},
  58. Journal = {Official Journal of the European Union},
  59. Year = {2010},
  60. Pages = {13--35},
  61.  
  62. Abstract = {An efficient, prudent, rational and sustainable utilisation of energy applies, inter alia, to oil products, natural gas and solid fuels, which are essential sources of energy, but also the leading sources of carbon dioxide emissions. Buildings account for 40\% of total energy consumption in the Union. The sector is expanding, which is bound to increase its energy consumption. Therefore, reduction of energy consumption and the use of energy from renewable sources in the buildings sector constitute important measures needed to reduce the Union’s energy dependency and greenhouse gas emissions},
  63. Doi = {doi:10.3000/17252555.L\_2010.153.eng},
  64. File = {:C$\backslash$:/Users/Diogo Remoaldo/Desktop/EPBD2010.pdf:pdf},
  65. ISBN = {<null>},
  66. ISSN = {17252555}
  67. }


I would like to do the following corrections:

- Change the "und" to "e" that appear in both citations and bibliography;

- Change the "In" that appears in some bibliography to "Em".

I am writting a bachelor thesis and I would really appreciate if someone could lend me a hand in formatting my bibliography :D

I also sent and attachment highlighting some fields I want to be changed.



Best regards,

Diogo Remoaldo
Attachments
2.png
2.png (174.72 KiB) Viewed 231 times
1.png
1.png (155.71 KiB) Viewed 231 times

kaiserkarl13
Posts: 617
Joined: Tue Mar 25, 2008 5:02 pm

Postby kaiserkarl13 » Tue Jan 22, 2019 8:50 am

You're using dinat.bst, which is a "Bi­b­li­og­ra­phy style for Ger­man texts"; there is a similar one called "spain.bst" that is for Spanish texts a level or two up in the same CTAN directory tree.

One (hack-ish) way is to make a copy of dinat.bst and change the functions at the top (push.und and push.in) to the things you want them to be. A better way would be to use a style file for the language you're using, or to generate one with "latex makebst" (I don't know how well that works with non-English bibliographies).

Good luck!

Diogo Remoaldo
Posts: 26
Joined: Mon Apr 06, 2015 8:24 pm

Postby Diogo Remoaldo » Tue Jan 22, 2019 3:21 pm

Hi, mister kaiser how can I locate the dinar.bst on my pc. After that I just have to copy it and modify it in other folder right? I am using windows. Best regards


Return to “BibTeX, biblatex and biber”

Who is online

Users browsing this forum: No registered users and 5 guests