1

I' have used Latex to write my M2 Master, and I must say it is a fantastic tool, but as a complete noob I had a lot of hard time finding and understanding which commands I needed for what purpose. Anyway I ended up with something that I liked in the end. Yet just yesterday, checking my bibliography to get a reference for the thesis I am now preparing... I noticed that some references missed at the end of my bibliography, more precisely that my bibliography was interrupted before my Webography began.

See, there's a coma after "2012" and before the webography, which means that there are references missing

So I searched for a little moment, and then I analyzed the code section where the bibliography is supposed to be printed:

\defbibfilter{web}{
    type=misc or
    type=online
}

{\let\newpage\relax
\printbibliography[heading=bibintoc, title={Bibliographie},nottype=misc, nottype=online]}
{\let\newpage\relax
\printbibliography[heading=bibintoc, title={Webographie},filter=web]}

\newpage
\listoffigures

\newpage

At the end of my bibliography print, and just before the print of the webography, I have this \let\newpage\relax command. As I have written this months ago, I didn't remember why I had written that XD, so I replaced by

\newpage

Complied and...pouf! my bibliography wasn't cut anymore.

enter image description here

So yes, basically I have solved my problem alone, but I didn't understand why the command \let\newpage\relax created that bug. Moreover, replacing all occurrences of that command by "\newpage" doesn't change a thing.

So my question: can someone explain me what exactly does \let\newpage\relax do, and why in my case it did cut my bibliography before the end?

Thank you!!

Popi
  • 11
  • Welcome to TeX.SX! Well you are "letting" the macro \newpage do what \relax does... It cannot have good consequences, as you can imagine. I can't explain exactly what goes on there, especially in the absence of the remaining of your code. But I wonder how you came to include that "piece" in your document... – gusbrs Dec 05 '18 at 20:38
  • Hello! Thank you for your answer! By reading it I realize how much of a noob I am, since I don't understand what you mean by "I'm letting the macro \new page do what \relax does. Hem...Do I make a fool of myself if I ask what a macro is...? Maybe we should start with that :/

    As to how I ended up using that piece, it's probably because I looked for a way to force the next section to be on a newpage, and I probably stumbled upon that piece of code somewhere on a forum...!

    – Popi Dec 05 '18 at 20:53
  • Let's call it a "command", that's the unit that passes instructions to LaTeX. Well you have there a command called \newpage, it is easy to assume what it does. \relax is more intricate, but you can also suppose well what it does. \let is a way to define/redefine a command. So, what you are doing there is redefining \newpage to do what \relax does. As you group this with braces alongside your bibliography, that redefinition is local. So, you are sort of saying "While in the bibliography, instead of starting a new page, just relax!" So LaTeX does. ;) – gusbrs Dec 05 '18 at 20:59
  • All right I think I'm starting to understand a little better thank you :) yet it is not that clear for me to suppose what "relax" does. Even reading this post https://tex.stackexchange.com/questions/86385/what-is-the-difference-between-relax-and and others, especially when it's said that it's "unexpandable"... Is it used to "handle"' spaces automatically within a page or something??

    Thanks again !

    – Popi Dec 05 '18 at 21:06
  • Well, you can get from David's answer in that link that \relax "does nothing when executed". That should be enough to understand what goes wrong in your document. But cheers to your curiosity! It seems you "caught the bug". Welcome! – gusbrs Dec 05 '18 at 21:11
  • Yep, but it doesn't explain why it "cut" the bibliography, shouldn't it have just finished the bibliography and added the webography without going to a new page? Thank you for your patience! – Popi Dec 05 '18 at 21:13

0 Answers0