0

I tried to compile my latex document and I am getting an undefined control sequence error, but I dont know where it comes from. I get this error message in line 13:

! Undefined control sequence.
l.13 \newblock {\em \aap
}, 229:441--451.
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
) [24  

And this is my code at line 13 (hidelinks line) and I have no idea what could be the problem (line 13 is:

\usepackage[
pdftitle={Bestimmung kinematischer Parameter von elliptischen Galaxien},
pdfsubject={},
pdfauthor={Valentin Reichel},
pdfkeywords={},
hidelinks
]{hyperref}

Maybe the error is for a different file, but how do I know which file the error message is generated for ?

moewe
  • 175,683
trynerror
  • 133
  • 5
  • 3
    The error message is telling you that the command \aap is unknown. It wasn't defined by you or by any of the packages you use. And the string \newblock gives it away: it is a biblatex-related error. I assume you, or whoever created the bibliographic entry, expects \aap to print (the title of the journal) Astronomy and Astrophysics? – marquinho Jul 25 '22 at 10:17
  • But I didnt even use the comment \aap in this file ? Maybe its connected to my bibtex file ? But shouldnt the mistake show of the line where it is, and its clearly not in line 13 ? – trynerror Jul 25 '22 at 10:23
  • Based on https://tex.stackexchange.com/questions/375332/horizontal-spacing-between-chapter-and-chapter-number-in-table-of-content, there could be other bib/bibtex-related commands that will need to be defined. Depends where you got your code from. – Cicada Jul 25 '22 at 10:28
  • 1
    I'd say the compilation error is on line 13 of the file with extension .bbl that is generated when bib(la)tex compiles, not on l. 13 of your main .tex file. And the root cause is most definitely the entry for "Astronomy and Astrophysics" in the .bib file. (Did you write that entry yourself, or get the .bib from another source?) // The abbreviation \aap and others are defined by the aastex class: https://journals.aas.org/aastexguide/, but unless you are writing your text as \documentclass{aastex631} or the like, you'll have to define \aap yourself, or just get rid of it. – marquinho Jul 25 '22 at 10:30
  • 1
    Line number relates to file where the logic/syntax error could no longer "make sense": e.g., if I leave out a }, the processing could fail at the next line, or 10k lines later. Depends on the code. – Cicada Jul 25 '22 at 10:32
  • 1
    it is line 13 of your bbl file, \newblock {\em \aap not line 13 of your document (I would guss you are using bibtex, not biblatex, despite the question having a biblatx tag) – David Carlisle Jul 25 '22 at 11:17
  • As David says: This error comes from your .bbl file. The line number refers to line 13 of your .bbl file and not of your .tex file. You can trace back which file the line number refers to by counting round brackets in the log output (TeX opens a round bracket for each file it opens and closes the bracket if the file is closed). See e.g. https://tex.stackexchange.com/q/32213/35864. The snippet also shows that you are using classical BibTeX and not biblatex (as the tag suggested, I've retagged), though that is not really relevant to the issue. ... – moewe Jul 25 '22 at 15:58
  • 1
    ... Your problem is that your are using AASTeX macros for journal names in your .bib file (possibly because you get your entries from the ADS), but you do not have suitable definitions for those macros. See https://tex.stackexchange.com/q/366618/35864 for a duplicate question with help for that issue (use AASTeX, load aas_macros.sty linked in the answer or get rid of the macros in your .bib file). – moewe Jul 25 '22 at 16:00

0 Answers0