Hot answers tagged

11

It happens when latex tries to typeset the page heading. This happens at page shipout time; if the CJK* environment has ended before the last page ships out, the necessary definitions for doing the typesetting are gone, and you get this error. You see this clearly if you add \errorcontextlines=99 to your document (outside the CJK* environment please). Also, ...


9

The problem is that the section command sets a header. The problem is that the the CJK environments ends before the header is typeset and so the chinese chars are no longer set up. Using \clearpage makes the CJK-environment span two pages so that is is active when the header is typeset, but is clearly only a work-around. The second problem is that the book ...


9

If a TeX engine is used with Unicode/OpenType font support, then it is just a matter to find a font that contains the Unicode code point U+2400, e.g.: % lualatex or xelatex \documentclass{article} \usepackage{fontspec} \begin{document} \def\test#1{#1:&\fontspec{#1}\symbol{"2400}\\} \begin{tabular}{l@{ }l} \test{FreeMono} \test{FreeSans} ...


9

If the engine is Unicode aware and a font is used, which contains the glyph for the private Unicode code point: ^^^^e25f See: The ^^ notation in various engines. This is TeX's method to encode non-ASCII characters with ASCII and can also be used inside command tokens. There are also commands to select a character by slot in the current font: LaTeX ...


7

cmss10 is not a Unicode font unfortunately - you need to use a font which implements Unicode maths - the TeX Gyre collection is probably a good starting point. Here is an example: \documentclass{article} \usepackage{unicode-math} \setmainfont{TeX Gyre Schola} \setmathfont{TeX Gyre Schola Math} \begin{document} Some Unicode maths: $x ∈ β„•$ \end{document} ...


7

I can get most of them e.g. with DejaVu Sans (but some are missing): %compiled with lualatex \documentclass{report} \usepackage{fontspec} \setmainfont{DejaVu Sans} \begin{document} How would I go about adding the large range of emotions (πŸ˜€ 😁 πŸ˜‚ πŸ˜ƒ πŸ˜„ πŸ˜… πŸ˜† πŸ˜‡ 😈 πŸ˜‰ 😊 πŸ˜‹ 😌 😍 😎 😏 😐 πŸ˜‘ πŸ˜’ πŸ˜“ πŸ˜” πŸ˜• πŸ˜– πŸ˜— 😘 πŸ˜™ 😚 πŸ˜› 😜 😝 😞 😟 😠 😑 😒 😣 😀 πŸ˜₯ 😦 😧 ...


5

Load inputenc before titling, to make it aware about the unicode settings etc, otherwise it uses the wrong encoding for \author{ÀÀÀ} etc. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{titling} \author{ÀÀÀ} \date{\today} \title{üüüü} \RequirePackage[pdfencoding=unicode, psdextra]{hyperref} \AtBeginDocument{ \hypersetup{ ...


4

Since you are using XeLaTeX you should use the fontspec package instead of the fontenc package. In other words the following code should produce the desired result. \documentclass{article} \usepackage{fontspec} \begin{document} \thispagestyle{empty} \pagestyle{empty} ÀÀ--llll \end{document}


3

If you are on pdflatex, you can use the ascii package: \documentclass{article} \usepackage{ascii} \begin{document} Is this it? \NUL \end{document} You can also input the symbol directly as Unicode, so the code can be portable to XeLaTeX or LuaLaTeX. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{ascii} \usepackage{newunicodechar} ...


3

If you're using xelatex, you should load fontspec that allows you to set the main font with \setmainfont{} and you can choose any font you have in your own OS. This should be the font of the main part of your document. If you're writing primarily using the Latin alphabet, then you should choose an appropriate font. As far as the languages are concerned, I'd ...


2

If you wanted it to conform to the current font, both in size and style, you could build your own: \documentclass[a2]{article} \usepackage{stackengine,scalerel} \newcommand\NUL{\scalerel*{$\Shortstack[l]{N \phantom{N}U \phantom{NU}L}$}{X}} \begin{document} \LARGE This is \NUL \normalsize This is \NUL \itshape This is \NUL \upshape\ttfamily This is \NUL ...


1

After lot's of searching I managed to get full support with a twitter based emoji set from here: https://github.com/alecjacobson/coloremoji.sty


1

There are several parts to your question. How to use XeLaTeX ? In order to compile a unicode document using XeLaTeX, you first need to write a unicode document. So you will have to make it an UTF-8 document. Once this is done, it is very easy. You write your document as if you were using PDFLatex, but instead, you will compile it using xelatex.exe. As ...



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