2

I do have to use a lines of code to mix cyrillic and latin characters, but when using the T2A package the font changes.

I - WOULD LOVE - to have the standard font while using the T2A package,

Example (normal)

            \documentclass[a4paper,oneside,11pt]{book}

               %%%%   packages a introduir   %%%%

                        \usepackage[english]{babel}
                        \usepackage{lipsum}

                        %SPANISH CHARACTERS + LANGUAGE
                        %\usepackage[T2A,T1]{fontenc}
                        %\usepackage[utf8]{inputenc}            
                        %\DeclareTextSymbolDefault{\cyre}{T2A}
                        %\DeclareTextSymbolDefault{\CYRE}{T2A}
                        %\DeclareTextSymbolDefault{\cyrf}{T2A}

            \begin{document}
            \chapter*{The font changes}
            \lipsum[1]
            \end{document}

Example (with cyrillic characters, and the font changes)

            \documentclass[a4paper,oneside,11pt]{book}

               %%%%   packages a introduir   %%%%

                        \usepackage[english]{babel}
                        \usepackage{lipsum}

                        %SPANISH CHARACTERS + LANGUAGE
                        \usepackage[T2A,T1]{fontenc}
                        \usepackage[utf8]{inputenc}         
                        \DeclareTextSymbolDefault{\cyre}{T2A}
                        \DeclareTextSymbolDefault{\CYRE}{T2A}
                        \DeclareTextSymbolDefault{\cyrf}{T2A}

            \begin{document}
            \chapter*{The font changes}
            \lipsum[1]
            \end{document}

Thank you so much!

1

If you do not need accented or additional characters from the T1 encoding, the following permits the use of Cyrillic in T2A with the standard Computer Modern fonts:

\documentclass[a4paper,oneside,11pt]{book}

\usepackage{lipsum}

\usepackage[T2A,OT1]{fontenc}
\usepackage[utf8]{inputenc}
\DeclareTextSymbolDefault{\cyre}{T2A}
\DeclareTextSymbolDefault{\CYRE}{T2A}
\DeclareTextSymbolDefault{\cyrf}{T2A}

\begin{document}
  \chapter*{The font changes}
  \lipsum[1]
\end{document}

However, it is recommended to use T1 and, if you are typesetting Spanish, I assume that you will prefer to use this encoding.

Rather than using CM Super, you might find you prefer to use Latin Modern:

Latin Modern

\documentclass[a4paper,oneside,11pt]{book}

\usepackage{lipsum}

\usepackage[T2A,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\DeclareTextSymbolDefault{\cyre}{T2A}
\DeclareTextSymbolDefault{\CYRE}{T2A}
\DeclareTextSymbolDefault{\cyrf}{T2A}

\begin{document}
  \chapter*{The font changes}
  \lipsum[1]
\end{document}

cfr-lm offers enhanced support for Latin Modern, and should not be dismissed merely on the grounds that I authored it.

  • Thank you so much, works perfectly! I will never thank this forum enough, saves SO MANY hours of frustration <3 – Leo Dec 29 '14 at 19:34
  • @Leo Thanks. Glad it helped! If my answer is satisfactory, please remember to accept it when you have had a chance to test it and consider other answers. [To do this, you click on the greyed out check mark to the top left of the answer you want to accept.] – cfr Dec 29 '14 at 20:48
  • I just noticed that with your code and the Latin modern font, the crylic characters are wierdly print!! Is there a similar font to Latin modern that supports crylic characters in a more pleasure way? 1."thе" 2."the" - 1 contains crylics - 2 doesn't contain crylics – Leo Jan 9 '15 at 11:18
  • @Leo Latin Modern doesn't support Cyrillic, so TeX substitutes Computer Modern i.e. CM Super. So you cannot avoid those fonts in this case, unless you select another font altogether. That is, CM Super is going to be as close to what you are asking for as anything. So if that is not satisfactory, I guess it would make sense to think about a different choice of fonts for your document. – cfr Jan 9 '15 at 21:48
1

In the first case it uses the Computer Modern and in the second case it uses the CM Super. Load always the fontenc package and you'll see no difference:

\usepackage[T2A,T1]{fontenc}
\usepackage[utf8]{inputenc} 

or

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc} 
  • 1
    I don't see how this answers the question which was how to retain the default Computer Modern font while loading the T2A encoding... This just explains how to get the font the OP doesn't want without loading that encoding. ;) – cfr Dec 29 '14 at 19:11

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.