俄语文本超越了领域

俄语文本超越了领域

我对俄语文本换行有些问题。如何设置宽度对齐和正确的文本换行?

这是我的尝试

\documentclass[a4paper,14pt,russian]{extreport}
\usepackage[14pt]{extsizes}
\usepackage{cmap} 
\usepackage[T2A]{fontenc}
\usepackage[cp1251]{inputenc} 
\usepackage[russian,english]{babel}
\usepackage{textcomp}
\usepackage{amssymb,amsfonts,amsmath,mathtext,cite,enumerate,float}
\usepackage{graphicx}
\graphicspath{{images/}}
\DeclareGraphicsExtensions{.pdf,.png,.jpg}
\usepackage{ dsfont }
\usepackage{ mathrsfs }

\makeatletter
\renewcommand{\@biblabel}[1]{#1.}
\makeatother

\usepackage{geometry}
\geometry{left=2cm}
\geometry{right=1.5cm}
\geometry{top=1cm}
\geometry{bottom=2cm}
\begin{document}
 Sometexttext Sometexttext Sometexttext Sometexttext Sometexttext Sometexttext Sometexttext Sometexttext Sometexttext Sometexttext Sometexttext Sometexttext Sometexttext Sometexttext Sometexttext Sometexttext Некоторыйтекст Некоторыйтекст Некоторыйтекст Некоторыйтекст Некоторыйтекст Некоторыйтекст Некоторыйтекст Некоторыйтекст Некоторыйтекст Некоторыйтекст Некоторыйтекст Некоторыйтекст Некоторыйтекст Некоторыйтекст Некоторыйтекст
\end{document} 

在此处输入图片描述

答案1

使用该\selectlanguage命令可在连字规则之间切换,例如,如果您的整个章节都使用不同的语言。您还可以使用该命令\foreignlanguage排版单个外语单词或短语:

\documentclass[a4paper,14pt,russian]{extreport}
\usepackage[14pt]{extsizes}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian,english]{babel}
\usepackage{dsfont}
\usepackage[left=2cm,right=1.5cm,top=1cm,bottom=2cm]{geometry}

\begin{document}
Sometexttext Sometexttext Sometexttext Sometexttext Sometexttext
Sometexttext Sometexttext Sometexttext Sometexttext Sometexttext
Sometexttext Sometexttext Sometexttext Sometexttext Sometexttext
Sometexttext
\selectlanguage{russian}
Некоторыйтекст Некоторыйтекст Некоторыйтекст Некоторыйтекст Некоторыйтекст
Некоторыйтекст Некоторыйтекст Некоторыйтекст Некоторыйтекст Некоторыйтекст
Некоторыйтекст Некоторыйтекст Некоторыйтекст Некоторыйтекст Некоторыйтекст

\selectlanguage{english}
Sometexttext Sometexttext Sometexttext Sometexttext Sometexttext
Sometexttext Sometexttext Sometexttext Sometexttext Sometexttext
Sometexttext Sometexttext Sometexttext Sometexttext Sometexttext
Sometexttext \foreignlanguage{russian}{Некоторыйтекст} Sometexttext
Sometexttext Sometexttext Sometexttext Sometexttext Sometexttext
Sometexttext Sometexttext Sometexttext Sometexttext Sometexttext
Sometexttext Sometexttext Sometexttext Sometexttext Sometexttext
\end{document}

输出

相关内容