Tag Info

Hot answers tagged

5

You shouldn't modify a file in the main distribution tree: if there is an update to the package, your modification will be lost. In section 4.19 of the manual it is said that listings will load a file called lstlocal.cfg if it exists in a directory read by TeX. (Thanks to Paul Gessler for the hint.) Strategy 1: create a new lstlocal.cfg in the “local tree” ...


4

You have: \endinput \input{listings-java.prf} in listings.cfg but \endinput tells TeX to stop reading from that file. Nothing after that will be read. So you need to move your \input command before the \endinput command: \input{listings-java.prf} \endinput


4

\usepackage[english,ngerman]{babel} Then ngerman is active at the begin of the document and you can switch to english. If you cannot change the package, then write before \documentclass: \PassOptionsToPackage{english}{babel} \documentclass{whatever} ...


4

Here is a full example using XeLaTeX: % !TEX program = XeLaTeX % !TEX encoding = UTF-8 \documentclass{article} % Setting up Latin and Cyrillic fonts \usepackage{fontspec} \setmainfont{CMU Serif} \setsansfont{CMU Sans Serif} \setmonofont{CMU Typewriter Text} % Setting up Japanese fonts \usepackage{xeCJK} \setCJKmainfont{ipam.ttf} \setCJKsansfont{ipag.ttf} ...


4

I just ran into the same issue with the Noto Sans Traditional Chinese font (except with plain xetex) and google brought me here. The next thing I tried was luatex (with luaotfload) which works fine. So this appears to be a bug in xetex. EDIT: Per Khaled's suggestion above, this is an issue with CID keyed fonts. I have no idea what they are, but installing ...


4

On Windows 8, Malgun Gothic supports combining Hangul Jamo ("Old Hangul" hereinafter). On Mac which you seem to be using, however, there's no font bundled that supports Old Hangul. Noto Sans or Source Han Sans, actually exactly same fonts with different names, cannot be used on XeTeX for the time being, as discussed in the thread linked at Khaled's comment ...


3

To change the labels for your figures, tables etc. use the \mainlnguage command, this will also load the right hyphenation patterns for the requested language. You have to change also the for of your document, one font which has support for cyrillic is Linux Libertine which can be loaded with \setupbodyfont[libertine]. \useMPlibrary[dum] ...


3

Try this: \documentclass{article} \usepackage{listings} \usepackage{xcolor} \begin{document} \lstdefinelanguage{Test} { comment=[s][\color{blue}]{\#}{\#}, comment=[l][\color{red}]{\#} } \begin{lstlisting}[language=Test] #comment foo # comment # bar baz # comment #comment# qux \end{lstlisting} \end{document} It seems that you have to be ...


2

run with xelatex or lualatex: \documentclass[12pt]{article} \usepackage{fontspec} \setmainfont{Arial Unicode MS} \begin{document} कुछ पाठ उम्मीद है, हिंदी में लिखा. \end{document}



Only top voted, non community-wiki answers of a minimum length are eligible