meluso / UMich_Dissertation_Template

University of Michigan Rackham Graduate School Dissertation Template (unofficial)
https://www.overleaf.com/latex/templates/university-of-michigan-dissertation-and-thesis-template-unofficial/tpnjzndnrzmf
Creative Commons Zero v1.0 Universal
44 stars 16 forks source link

[FEATURE] Unable to use \ref in appendix chapter and section names #21

Open mc-nya opened 1 month ago

mc-nya commented 1 month ago

Describe the bug I'm not able to use \ref in the appendix section names that refer to the labels in the main context, for example, I have a theorem labeled as "\label{thm}" In the main context. In the appendix I have a section name \section{Proof of \ref{thm}}, the compiler will raise an error and stop generating.

To Reproduce Steps to reproduce the behavior: if replace \chapter{Example Appendix 01} in example_appendix_01.tex with \chapter{Example Appendix 01 of Chpt\ref{chpt:introduction}}, the file will not compile.

Expected behavior I believe it should work and create output as Example Appendix 01 of Chpt1

Additional context I did a short investigation and found the compiler will write a BOOKMARK with \ref in the main.out file, that might raise syntax errors in the compiler? Also, I realized that in thesis-umich.cls, ln.1101, the appendices environment redefines the chapter counter so the label from the main context may not carry over.

meluso commented 1 month ago

Hi there, thanks for finding this and doing some digging! I'll look into this. I'm going to recategorize this to a feature request as it doesn't prevent the template from meeting Rackham's requirements, but thank you for pointing this out!