Fonts & Character SetsItalic bold cyrillic

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
solunac
Posts: 5
Joined: Thu Dec 17, 2009 8:58 pm

Italic bold cyrillic

Post by solunac »

Hi!

I have a problem putting Cyrillic words in bold and italic. In way I manage with cyrillic fonts, I provide code that I use (and the problematic spot too):
\documentclass[a4paper, 12pt, leqno]{report}
\usepackage[utf8]{inputenc}
\usepackage[OT2,OT1]{fontenc}
\usepackage[english]{babel}

\newcommand{\dzh}{\symbol{'12}} %some letter
\newcommand{\Dzh}{\symbol{'2}}

\renewcommand\rmdefault{wncyr}%
\renewcommand\sfdefault{wncyss}%
\renewcommand\encodingdefault{OT2}%
\normalfont
\selectfont

\newenvironment{lat} % command for latin environment
{\fontencoding{OT1}\fontfamily{cmr}\selectfont}{}

\begin{document}

Something, something, something...\\ % word "something" transliterated in cyrillic

something\\ % normal
\textbf{something}\\ % bold
\textit{something}\\ % italic
\textit{\textbf{something}} % bold and italic, but not working (same thing with \bf,\em)

\end{document}
Thanks in advance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
solunac
Posts: 5
Joined: Thu Dec 17, 2009 8:58 pm

Italic bold cyrillic

Post by solunac »

Excuse me, but... nobody to answer? This is the warning that I get:
LaTeX Font Warning: Font shape `OT2//wncyr//bx//it' undefined
(Font) using `OT2//wncyr//bx//n' instead on input line 25.
[1] (novo.aux)
LaTeX Font Warning: Some font shapes were not available, defaults substituted.
(see the transcript file for additional information)
)
Is there anything other than wncyr, or something needs to change to get it italic and bold (maybe not OT2, but something else)?
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Italic bold cyrillic

Post by frabjous »

For me, it's enough to include russian in the options for babel, and then use the unicode characters in my source file (with utf8 for inputenc) -- I don't need to do anything else.

Code: Select all

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english,russian]{babel}
\begin{document}
\textit{\textbf{Все люди рождаются свободными и равными в своем достоинстве и правах. Они наделены разумом и совестью и должны поступать в отношении друг друга в духе братства.}}
\end{document}
Your mileage may vary.

I'd really have no clue how to do it if I had to use the transliterations instead. You are already loading "\usepackage[utf8]{inputenc}", however, so I take it that your editor can handle unicode/utf-8 encoding, right?
solunac
Posts: 5
Joined: Thu Dec 17, 2009 8:58 pm

Re: Italic bold cyrillic

Post by solunac »

Thanks frabjous.

Indeed if I use utf8 for inputenc it could be easier for me to write, but my editors support for Unicode (utf8) isn't working or something else is the problem.

I am using WinXP platform, and few editors that I red that they support Unicode format letters - lED (lED doesn't support Unicode), WinShell, Texmaker. But nether of them do the job correctly. I am able to write in editors in cyrillic (or something else), but the output is something like "???? ??? ???? ???". I hope you understand.

The only way I can fully use Unicode is to write my LaTeX text in Notepad (or something similar) and to create output file (correctly) within Command Prompt. That is what's bothering me.

Any suggestions what to do? Maybe some other editor, or setup of the existing editors, ...
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Italic bold cyrillic

Post by phi »

solunac wrote: I am using WinXP platform, and few editors that I red that they support Unicode format letters - lED (lED doesn't support Unicode), WinShell, Texmaker. But nether of them do the job correctly. I am able to write in editors in cyrillic (or something else), but the output is something like "???? ??? ???? ???". I hope you understand.
Make sure that you load the inputenc package and that the file is indeed saved as UTF-8. Perhaps you must tell the editor manually to use UTF-8.
The only way I can fully use Unicode is to write my LaTeX text in Notepad (or something similar) and to create output file (correctly) within Command Prompt. That is what's bothering me.

Any suggestions what to do? Maybe some other editor, or setup of the existing editors, ...
Complain to the programmers of these editors. Unicode has been the native character set of Windows (NT) as early as 1993. A Windows application that does not support Unicode in the year 2010 is nearly inexcusable.
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Italic bold cyrillic

Post by frabjous »

I don't use Windows anymore (thank goodness), but the newest Alpha version of TeXnicCenter supports UTF-8, as does TeXworks. You could try one of those.
Post Reply