{"id":1332,"date":"2016-07-29T12:30:05","date_gmt":"2016-07-29T11:30:05","guid":{"rendered":"http:\/\/www.sharonmurphy.com\/wordpress\/?p=1332"},"modified":"2016-07-29T12:50:37","modified_gmt":"2016-07-29T11:50:37","slug":"cyrillic-characters-in-latex","status":"publish","type":"post","link":"https:\/\/www.sharonmurphy.com\/wordpress\/2016\/07\/cyrillic-characters-in-latex\/","title":{"rendered":"Cyrillic characters in LaTeX"},"content":{"rendered":"<p>This one caused some headaches here, so recording the solution in case it&#8217;s useful to anyone else.<\/p>\n<p>I wanted to include a Cyrillic string (copied and pasted from an email) in a LaTeX document whose default fonts didn&#8217;t support Cyrillic, but when I saved and compiled the file it was replaced by a string of question marks instead. After much poking around and experimentation, and with some assistance from Dave who is even more proficient in LaTeX than I, this solved it:<\/p>\n<ol>\n<li>First off, make sure you&#8217;re saving your document in UTF-8. (In WinEdt, this is set under <b>Document > Document Settings&#8230; > Format<\/b>.)<\/li>\n<li>In the document preamble, define the font family for cyrillicfont to one that matches your main package&#8217;s font (or that is close enough, but supports Cyrillic):\n<p><code>\\usepackage[utf8]{inputenc}<br \/>\n\\usepackage[T2A,T1]{fontenc}<br \/>\n\\usepackage{polyglossia}<br \/>\n\\setdefaultlanguage{english}<br \/>\n\\setotherlanguages{russian}<br \/>\n\\newfontfamily{\\cyrillicfont}{Times New Roman}<\/code><\/li>\n<li>In the document body, add your Cyrillic content in the second pair of curly brackets of:\n<p><code>\\foreignlanguage{russian}{}<\/code><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>This one caused some headaches here, so recording the solution in case it&#8217;s useful to anyone else. I wanted to include a Cyrillic string (copied and pasted from an email) in a LaTeX document whose default fonts didn&#8217;t support Cyrillic, but when I saved and compiled the file it was replaced by a string of &hellip; <a href=\"https:\/\/www.sharonmurphy.com\/wordpress\/2016\/07\/cyrillic-characters-in-latex\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Cyrillic characters in LaTeX&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31,6],"tags":[37,60,57,40],"class_list":["post-1332","post","type-post","status-publish","format-standard","hentry","category-tech","category-tech-writing","tag-font","tag-latex","tag-markup-languages","tag-pdf"],"_links":{"self":[{"href":"https:\/\/www.sharonmurphy.com\/wordpress\/wp-json\/wp\/v2\/posts\/1332","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sharonmurphy.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sharonmurphy.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sharonmurphy.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sharonmurphy.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1332"}],"version-history":[{"count":6,"href":"https:\/\/www.sharonmurphy.com\/wordpress\/wp-json\/wp\/v2\/posts\/1332\/revisions"}],"predecessor-version":[{"id":1338,"href":"https:\/\/www.sharonmurphy.com\/wordpress\/wp-json\/wp\/v2\/posts\/1332\/revisions\/1338"}],"wp:attachment":[{"href":"https:\/\/www.sharonmurphy.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1332"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sharonmurphy.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1332"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sharonmurphy.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1332"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}