Good morning,

I want to add the source to figures in my beamer document, so I found online people are doing:


\newcommand{\source}[1]{\caption*{Source: {#1}} }

However, once I include the package in even a minimal beamer scripts, I get an error of undefined control sequence as below:

enter image description here

Does anyone have similar problem before?

Many thanks!!

  • According to this ansewr (its edit): tex.stackexchange.com/a/155740/120578 you could risk and use it with: \usepackage[compatibility=false]{caption} ... (Related question) – koleygr Mar 9 at 16:48
  • Thank you @koleygr! Sadly it looks like caption package is no longer compatible with beamer... – Tian Mar 9 at 16:51
  • Welcome... But next time keep in mind that you don't help people to test and find solution to your problem without adding a full code but code parts and screenshots... The screenshot here shows the code but nobody can copy it... It was easy for you to copy it... Of course shows the error too... But we would believe you if you had just copy paste the error message :P... Happy TeXing! – koleygr Mar 9 at 16:54
  • 1
    Ohh this makes sense. Thank you for the tip, @koleygr! I will keep this in mind and include the complete code and error message next time (although hopefully no error shows up again too soon...lol) Happy Saturday! – Tian Mar 9 at 16:57
  • 2
    This bug has been fixed some time ago. Your example works fine for me, but beside this: tex.stackexchange.com/a/426090/2388 – Ulrike Fischer Mar 9 at 17:17

As mentioned by Ulrike, these issues no longer appear in MiKTeX or package updats via Tex Live / W32Tex and will be cleared next month when MacTeX / Tex Live 2019 is released so ensure either your current Distro is up to date or Pre-order the DVD before the rush

enter image description here

  • Thank you very much for the explanation @KJO! This is all very helpful. However, it is very weird - the same code works on MacPro but not on a MacAir... Do you know what might be the error? – Tian Mar 15 at 0:52
  • Sorry I do not use Mac so do not know if the two may be using a different version of OS (Operating System) which may affect the default locations on one compared to another. If a number of applications on one are noticeably different in terms of updates etc It may be worth searching or asking a new question about the best way to configure MiKTeX for that specific version of Mac Air system and you could also look at both the open and closed issues at the MiKTeX support site in case your system has been queried by others github.com/MiKTeX/miktex/… – user170109 Mar 15 at 1:38
  • Thank you @KJO for the suggestion! Yeah it looks like the two Mac OS are different.. By the way, I have Texmaker and MacTex on my laptop, because I was told one is editor and the other is distributor. However I don't have MiKTeX you mentioned many times above. Is this a problem? I don't have MiKTeX on the laptop that does work though... – Tian Mar 15 at 13:05
  • Sorry MiKTeX is one of the core TeX systems that I use most frequently with many editors thus I asumed (my bad). The main system is TeX Live and many oriental windows users favour W32Tex whilst for Mac there is MacTeX and there are a few other variants. The choice of those underlying TeX engines can be just as important as the user preference for an editor to change the TeX files however you almost certainly would benefit from the same on both machines thus MacTeX as the compiler with Texmaker as the means to edit the files for input to MacTeX would ensure they should work equally efficiently – user170109 Mar 15 at 13:16
  • This makes a lot of sense - thanks a lot for all the patient explanations @KJO! Yeah I am using the same MiKTeX and Texmaker on both machines... – Tian Mar 15 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.