I am using the scrreprt document class for writing a report for a study course at my university. While writing the appendix I recognized that there seems to be an error caused by the microtype package in combination with roman pagenumbering (independent of using the upper or lower case roman numbering). After changing from arabic to roman numbering it is no longer possible to use the \label{} command without causing the compiler to crash. Specifically, if I add labels after section or chapter commands there are different errors that occur in relation to the .tex and .aux files. Related to the .tex file, where I am using the label commands, the follwing errors are procuced:
Argument of \MT@res@a has an extra }. \label{chapter:MyChapterName}
Paragraph ended before \MT@res@a was complete. \label{chapter:MyChapterName}
Related to the .aux-File the subsequent errors are reported:
Paragraph ended before \@newl@bel was complete. ...T1/LinuxBiolinumT-TLF/b/n/17.28 \def \par
Extra }, or forgotten \endgroup. .../LinuxBiolinumT-TLF/b/n/17.28 \def \par }
Extra }, or forgotten \endgroup. ...1{\fontencoding {T1}\selectfont
Extra }, or forgotten \endgroup. ...1][]\fontencoding {T1}\selectfont i}}}
Since the \MT@res@a error seems to be connected with the usage of microtype (which I load use without any options) I tried out compiling without loading microtype. It worked fine. The problem is also "resolved" by not changing the numbering style from arabic to roman or not using label commands. Neither of the above routes is a nice workaround in my opinion. The problem i have seems to be also reported by the user cfr, who commented on the follwing question and mentioned the same issue. It would be nice to get in contact with this user, but it seems there is no direct message function here (forgive me if I am wrong, I joined the community a few hours ago).
In relation to the problem I also have to state, that I am using utf-8 inputencryption and T1 fontencryption.
I did not build a minimum working example, but since it is highly recommend to discuss the question, I will try to create one and reproduce the error.
Also I can provide the complete log and the sections from the .aux and .tex Files that are reported by TeXstudio to produce the named errors if it is helpful to understand the problem.
I am looking forward to your comments / suggestions / solutions. You may forgive me, if I did not rely in every kind of way on the rules of this board / community and made some formal mistakes while writing the above question.
Sincerely, P. Schweitzer
UPDATE: minimum working example
I am sorry for not posting the minium working example at the beginning. Anyway here it is:
\documentclass{scrreprt}
\usepackage{scrlayer-scrpage} % I left the scrlayer-scrpage package in place to show pagenumbering, deleting does not affect the error
\usepackage[greek,ngerman]{babel} % by deleting the greek option, the error is solved
\usepackage{microtype} % by commenting this command out, the error is solved
\usepackage{cleveref} % by commenting this command out, the error is solved
\cfoot{\pagemark} % I left the pagemark command in place to show pagenumbering, deleting does not effect the error
\begin{document}
\clearpage
\pagenumbering{Roman}
\chapter{Abstract}
\label{chapter:abstract} % by commenting all labels in Roman or roman numbered sections/chapters out, the error is solved
\clearpage
\pagenumbering{arabic}
\chapter{Mainpart}
\label{chapter:mainpart}
\section{Test2}
\label{sec:test2}
\appendix
\clearpage
\pagenumbering{roman}
\chapter{Appendix}
\label{chapter:appendix}
\section{Test3}
\label{sec:test3} % by commenting all labels in Roman or roman numbered sections/chapters out, the error is solved
\end{document}
Please note: I commented on the changes which, if applied, resolve the problem. Especially I noticed, that if I disable the cleveref package the error also disappears, which I did not realize before. Furthermore disabling the greek option of babel resolved the error, too. Nevertheless I need, especially, the greek option, as I am writing a scientific report which uses greek letter a lot. Furthermore, to make the code working after a "failed" run of the compiler, you always have to delete the .aux files. Otherwise the error persists, even if you technically solved it in the code.
If you have a clue, where this error comes from and how to resolve it "correctly", I would be pleased to read your suggestions!
Thank you for your support. Sincerely, P. Schweitzer
.aux
file which appears to be corrupt, see if that fixes things