One of my professors in CS have made us use his template to write our master thesis in Software Engineering.

When I use \ref{...} it only appears the number, which is a problem because I have multiple subsystems and each one has their own list (eg. one is SGPA1 and other is SGU1). I've been trying to change it using this question (\ref should use enumerate label name), and it hasn't worked.

Is there any solution so when I use \ref{an item of the environment} it also shows the characters (SGPA in this example)?

  \typeout{Begining enumeration}
    \@enumdepth >3 \@toodeep
    \advance\@enumdepth \@ne
    \list{\csname label\@enumctr\endcsname}
      \advance\topsep by .3\myem
      \advance\itemsep by .15\myem
      \labelsep=1\myex \labelwidth=3\myex
        \typeout{Ending enumeration}

1 Answer 1


You adjusted
\theenumi, \theenumii, \theenumiii
\labelenumi, \labelenumii, \labelenumiii.

I think you need to also adjust
\p@enumi, \p@enumii, \p@enumiii.

These macros deliver prefix/postfix to \the⟨counter⟩ when \refstepcounter stores cross-referencing-data used by \label as macro \@currentlabel.

I don't know what \myem, \myex and \@listinterlined are, but I assume they are some units/lengths and I defined them on my own, with weird values. ;-)

Does the example deliver the output you desire?






  \typeout{Begining enumeration}%%%%%%%%%%%%
  \advance\@enumdepth \@ne
    \@enumdepth >4 \@toodeep
    \list{\csname label\@enumctr\endcsname}%%%%
      \advance\topsep by .3\myem\relax
      \advance\itemsep by .15\myem\relax
%      \renewcommand*{\p@enumii}[1]{##1.--}%%%%
%      \renewcommand*{\p@enumiii}[1]{##1.--}%%%%
%      \renewcommand*{\p@enumiv}[1]{##1.--}%%%%
%      \renewcommand*{\labelenumii}{\textbf{\theenumii.--}}%%%%
%      \renewcommand*{\labelenumiii}{\textbf{\theenumiii.--}}%%%%
%      \renewcommand*{\labelenumiv}{\textbf{\theenumiv.--}}%%%%
          \@enumdepth >4 
        \typeout{Ending enumeration}%%%%






\item An item
\item\label{AnotherItem} Another item
\item Yet another item
\item A nested item
\item\label{AnotherNestedItem} Another nested item
\item Yet another nested item
\item A nested nested item
\item\label{AnotherNestedNestedItem} Another nested nested item
\item Yet another nested nested item
\item A nested nested nested item
\item\label{AnotherNestedNestedNestedItem} Another nested nested nested item
\item Yet another nested nested nested item
%\item A nested nested nested nested item
%\item\label{AnotherNestedNestedNestedNestedItem} Another nested nested nested nested item
%\item Yet another nested nested nested nested item


enter image description here

  • \def\listinterlined#1{\def\@listinterlined{#1}} \listinterlined{0.1\myem} is the list interlined, and yes, it is what I'm looking for but it doesn't work in my template :/ It doesn't compile the document, so I think at this point is a template issue, thank you anyway Jul 13, 2021 at 17:56
  • I honestly can't. The template is an absolute mess and when I tried to copy paste your code it just explode. It says No PDF, something went wrong , and no matter how many times I try to recompile it's always the same. Thank you so much for your effort, I really appreciate it :-) Jul 13, 2021 at 20:15
  • My bad!! I have just tried it again and it worked!!! I may have copied it wrongly or something. Thank you so so much Jul 13, 2021 at 20:24
  • You're the best, I swear this was driving me insane Jul 13, 2021 at 20:37
  • @SugarG.García I know these situations: Time pressure, you want to get the job done, and then you find yourself spending hours trying to trace what's going wrong... In between, you get bile up, because you actually have something better to do... :-) Jul 13, 2021 at 20:41

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.