# Tag Info

1

This is for XeLaTeX only, as the behavior of LuaLaTeX when inputting — (U+2014) seems satisfactory. We want to allow hyphenation in the word preceding the em-dash, so we can add a zero kern before it, which will make the word end, but doesn't create a line break point. However, we want also to remove the behavior of the em-dash that, for compatibility with ...

2

Your installation was correct. If you try other fonts, you would encounter no problems. You just were unlucky enough to try the Garamond font first. The KPSE* family and the updmap are not the issue here. Apparently, the problem lies with the documentation at the LaTeX font catalog which claims that Garamond is part of TeXLive. Garamond is only partially ...

1

If this is what you expect to see in your LaTeX / XeTeX output … then you may just have to change the name of the font, which may be outdated in the example you got. I modified your example like this (with comments removed): \documentclass{article} \usepackage{fontspec} \setmainfont[Script=Devanagari]{Lohit-Devanagari} % Hindi -> Devanagari ...

6

It looks like it was a bug in luatex. This seems to have been fixed in the latest version of luatex, version 0.80.0, as provided in texlive 2015-pretest. Using these versions, the output is as expected:

4

CW from the comments: luaotfload normalizes all names supplied by the font. Apart from lowercasing you can also leave out spaces if you wish. So, for XeLaTeX, spacing and casing are significant, while for LuaLaTeX, they are not. This is not engine-dependent, just how luaotfload (and, incidentally, ConTeXt) treat things. The rationale is simple: ...

1

In a current miktex and texlive 2014 one can get the search path for font feature files with kpsewhich --show-path="font feature files" and this gives pathes of the type <texmf-tree>/fonts/fea. I tested it with both systems and it worked fine after I updated the fndb/ls-R.

2

Let me present a small snippet in LuaTeX. We pass an argument and selected letters to the Lua core, where the snippet decomposes it at a character level and wraps the preselected letters only by the \malbf command. Words to be marked are tagged, I didn't expect a TeX command, I presumed plain text. I enclose a small example with English (requested letters ...

4

When you are using XeTeX then your task is exactly solved by XeTeX primitives \XeTeXcharclass and \XeTeXinterchartoks. Read the manual of XeTeX. For letters 'a', 'e', 'i', 'o', 'u' the setting looks like: \newXeTeXintercharclass \mycharclassbf \XeTeXcharclass \a =\mycharclassbf \XeTeXcharclass \e =\mycharclassbf \XeTeXcharclass `\i =\mycharclassbf ...

1

As pointed out by Robert in the comments, the problem has nothing to do with Microtype. But by activating Microtype or any other font feature by \setmainfont[Microtype]{Latin Modern Roman} the default font settings get overwritten. Fonts which have a special subfont for smallcaps may not work afterwards. By reinitializing the smallcaps subfont it will ...

3

This is because different fonts are used when compiling using PDFLaTeX or XeLaTeX. Quoting from the style definition file: \ifxetex %% If the document is compiled with XeLaTeX, we load the TU Delft house %% style fonts: Bookman Old Style (serif) for titles and Tahoma (sans-serif) %% for text. Even if the nativefonts option was specified, we ...

5

unicode-math makes only sense if you also have a sensible "unicode math" font that you want to use as base math font. There is no "cm bright math" (sans serif math fonts are sparse ...). So it is better to use for the math setup the non-unicode way: \documentclass[a4paper,12pt]{article} \usepackage{cmbright} \usepackage{amsmath,amssymb} ...

4

Version 2 After reading a recommendation/comment by Khaled Hosny I've changed the core of the snippet, so it's switching font only when needed. There is no font change on purpose if a character is a space. In the previous version, it wrapped every single character (not recommended in general as it breaks up ligatures, kerning pairs and probably other ...

5

Loading a non existent language is useless. Just add a font family for Ethiopic characters (I used Kefa, use whatever you like). \documentclass[a4paper]{scrartcl} \usepackage{fontspec} \usepackage{polyglossia} \usepackage[Latin,Ethiopic]{ucharclasses} \setmainlanguage{english} \newfontfamily{\tigrinyafont}[Script=Ethiopic, Scale=1]{Kefa} ...

4

You have to mark the place where spaced capitals are desired: \documentclass{article} \usepackage{fontspec} \setmainfont{Linux Libertine O}[ SmallCapsFeatures={LetterSpace=7.5} ] \NewDocumentCommand{\allcaps}{m}{% {\addfontfeatures{LetterSpace=7.5}#1}% } \begin{document} Normal text to see what happens \textsc{This is spaced Small Caps} ...

5

In this case, Letters=SmallCaps is irrelevant as Alegreya SC only has small caps. In other cases, when a “normal” font is used, this option will enable the +smcp feature when choosing the font. You have to add suitable declarations also for bold, italic and bold italic. \documentclass{report} \usepackage{fontspec} \setmainfont[ ...

2

The fontspec manual addresses this in section 5.1.2, but I don't fully understand what they're writing there. One way to accomplish what you want is done below, where I've redefined \textsc to a new font family that picks out the Alegreya Small Caps font. \documentclass{article} \usepackage{fontspec} \setmainfont{Alegreya} ...

4

Define an \antiqua command that checks whether the current font family is sans serif. The example features a rather peculiar choice of fonts, which are just used for better showing the effect. So Termes is for normal text, Adventor for standard sans serif, Chorus is the replacement of Antiqua Sans and Cursor the replacement for Antiqua Serif. It's not meant ...

3

Compare the current font family: if it is sans serif, use \antiquasans, otherwise use \antiquaserif. \documentclass[12pt,a4paper,twoside]{scrreprt} \usepackage{pdftexcmds} \usepackage{fontspec} %loads fontspec \setmainfont{Old Standard} % for blackletter \setsansfont{Futura} % for headers, \newfontfamily\antiquaserif{LiberationSerif} %antiqua serif ...

2

Almost three years later, revisiting the same problem I had before in a new document (PhD thesis as opposed to master's thesis, for those interested) and having a lot more time on my hands, I came up with a much nicer hack. I created a new command \antisanssubsection with the following definition: \makeatletter \def\antisans#1{{\antiquafont #1}} ...

2

You can add a definition for \dutchfont: \documentclass{article} \usepackage{polyglossia} \setmainlanguage{english} \setotherlanguage{dutch} \newcommand\dutchfont{} \usepackage{fontspec} \newfontfamily\mono{Latin Modern Mono}[Scale=2] % scaled for visibility \begin{document} foo\mono bar foo\textdutch{bar} \end{document} But I would prefer babel over ...

11

For opentype fonts, luaotfload provide function nodes.simple_font_handler which will take care of all font manipulations like ligaturing and kerning and all other features supported by luaotfload. This function isn't advertised in the manual, I've found it in luaotfload source code. It is called as node callback on normal text, but as you create nodes ...

Top 50 recent answers are included