grattan / grattex

7 stars 6 forks source link

Competency issues #113

Closed wfmackey closed 3 years ago

wfmackey commented 6 years ago

A running list of competency issues raised by people.

HughParsonage commented 6 years ago

Lucy encountered a difficult problem. pdflatex reported an error suggesting a problem with the bibliography.

...

(Report.bbl)
Runaway argument?
{100\field {year}{2017} \field {dateera}{ce} \endentry \entry {2017_N\ETC.
! File ended while scanning use of \field.
<inserted text>
                \par
l.45 \begin{document}

The solution was quite involved. First I checked all entries that look like 2017_N where the error message ends:

@TechReport{2017_NEG_Advice,
  author       = {{COAG Energy Council}},
  title        = {Energy Security Board: Advice - The National Energy Guarantee},
  date         = {2017-11-20},
  url          = {http://www.coagenergycouncil.gov.au/sites/prod.energycouncil/files/publications/documents/Report%20on%20the%20National%20Energy%20Guarantee.pdf},

Note that the url contains % signs, but this is acceptable inside URLs within .bib files. Lucy tried hypercorrecting them to \%, which is not correct (the URLs in the PDF would break).

The next step was to look at the previous entry:

@TechReport{Aoude2016ElectricityFuturesMarkets,
  author       = {Sami Aoude and Lurion De Mello and Stefan Trueck},
  title        = {Electricity Futures Markets in Australia -- An Analysis of Risk Premiums during the Delivery Period},
  year         = {2016},
  institution  = {Centre for Financial Risk},
  note  = {Working Paper 16-03},
  url          = {http://www.businessandeconomics.mq.edu.au/research/financial_risk/working_papers/working_paper_16-03.pdf},
}

That looks fine.

The next step was to look at the auxiliary files that link the bib file to LaTeX. This file is mentioned in the original error message: Report.bbl. Searching for text mentioned in the error message lead me to this chunk

      \field{labeltitlesource}{title}
      \field{day}{15}
      \field{journaltitle}{Energy}
      \field{month}{8}
      \field{title}{100% renewable electricity in Australia}
      \field{year}{2017}
      \field{dateera}{ce}
    \endentry
    \entry{2017_NEG_Advice}{report}{}
      \name{author}{1}{}{%
        {{uniquename=0,uniquepart=base,hash=d27d34950fc989eeb05748941c4e9eed}{%
           family={{COAG Energy Council}},
           familyi={C\bibinitperiod}}}%
      }
      \strng{namehash}{d27d34950fc989eeb05748941c4e9eed}

Eyeballing it, the % jumped out and this was the problem: the title field in that entry was not escaped:

@Article{BlakersLuStocks2017,
  author  = {Andrew Blakers and Bin Lu and Matthew Stocks},
  title   = {100% renewable electricity in Australia},
                ^
  journal = {Energy},
  date    = {2017-08-15},
}

Changing this to 100\% renewable electricity in Australia fixed the problem.

HughParsonage commented 6 years ago

Greg reported an issue with the following entry:

@article{grasic2015england,
   author = {Gra\u{s}i\u{c}, Katja and Mason, Anne R. and Street, Andrew},
   title = {Paying for the quantity and quality of hospital care: the foundations and evolution of payment policy in England},
   journal = {Health Economics Review},
   volume = {5},
   number = {15},
   ISSN = {2191-1991},
   DOI = {10.1186/s13561-015-0050-x},
   url = {https://doi.org/10.1186/s13561-015-0050-x},
   year = {2015},
   type = {Journal Article},
}

with the obscure error

image

The problem was a linguistic issue: the first author's name was subtly misspelled. First as Greg entered it, then correctly:

image

The accents in the first line are called breves; in the second, carons. Breves do not exist in Croatian. A discussion on tex.stackexchange identified the mistake: https://tex.stackexchange.com/questions/170562/why-is-caron-treated-differently-than-breve/170589#170589

Fixing the \u's to \v's solved the issues.