0

I am using mdframed and defining some environments as follows:

\newmdenv[%
    frametitle=Example,%
    linecolor=ctcolormain,%
    backgroundcolor=ctcolormain!15,%
]{example}

\newmdenv[%
    frametitle=Note,%
]{note}

Now I would like to be able to define the frame titles for other languages too. How can I make the strings be different depending on the selected language (which is set with babel) ?

1

OK, here's the solution:

\addto\extrasenglish{%
    \def\mdexampletitle{Example}
    \def\mdnotetitle{Note}
}
% ...add strings for other languages here...

\newmdenv[%
    frametitle=\mdexampletitle,%
    linecolor=ctcolormain,%
    backgroundcolor=ctcolormain!15,%
]{example}

\newmdenv[%
    frametitle=\mdnotetitle,%
]{note}

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.