# Tag Info

2

A similar question was asked in How to make the url package respect fontspec font options (stylisticset) with LuaLaTeX, and egreg's answer with a following comment provide the solution for this as well. \documentclass{article} \usepackage{url} \urlstyle{same} \usepackage{fontspec} \setmainfont{Libertine Serif}[Numbers = {OldStyle, Proportional}] ...

1

The code of the Maxima output is dead ugly. The $$can be stripped by reading the file in a macro first (package catchfile) and removing the$$ via package regexpatch. Also the equation can be squeezed into the line via package resizegather. But because of the lengthy equation, the equation is decreased much too much: \documentclass[fleqn]{amsart} ...

1

You can get breaking at binary operations at the top level with some tricks. In the equation environment open a minipage Neutralize \$ so it's not interpreted any more The minipage contains an inline formula in \displaystyle, with a \raggedright setting \documentclass{amsart} %{standalone} \usepackage{amsmath} \newcommand{\maximainput}[1]{% ...

2

As Joseph said in the comments there are no fixed rules to decide on an engine. I tend to use pdflatex in most cases but switch to xelatex if I want to use an OpenType font that is not available for pdflatex. An argument to use pdflatex might be that microtype has more power on that engine (as far as I know). While an argument for xelatex (or latex) is the ...

8

I don't know how is this feature implemented in the font, but I guess that Luaotfload is missing support for it. The following code is just quick fix for this issue, it should be fixed in Luaotfload ideally. The full code follows, some explanation is provided bellow: \documentclass{article} \usepackage{fontspec} \usepackage{luacode} \begin{luacode*} local ...

1

Here's how to do it (with the help of answers 1 and 2): Obtain Adobe's AFDKO font tools and install them. Put the font file into an empty directory. Run tx -pdf -1 YOUR_FONT.otf > YOUR_FONT.pdf to map the glyphs of font. Open YOUR_FONT.pdf, search for the wanted glyph and its glyph tag (the upper left number, we will name it GLYPH_TAG). Create a dummy ...

9

You can use the LetterSpace option in fontspec. It preserves kerning as you can see if you compare it with the output of Renderer=basic: \documentclass{article} \usepackage{microtype} \usepackage{fontspec} \setmainfont{LinLibertine_R}[% Extension = .otf, SmallCapsFeatures = {% LetterSpace = 10, Letters = SmallCaps}] ...

1


5

There is no general answer to this question, nor could there be. It’s not just that some designers misuse calt and other features, or disagree in their interpretation of the specification. Even if they all used features as they were meant to be used, fonts would still exhibit different behaviors. Imagine that everyone agreed to use ss01 for Q, and ss02 for ...

5

Remove (or fix) [Custom Preamble for Articles!] if that optional argument is used, it must start with a latex-style date, such as [2015/08/23 v1.0 Custom Preamble for Articles!]

6

There is function unicode.utf8.char for direct unicode character inserting in Lua functions: % !TEX TS-program = lualatex \documentclass{article} \usepackage{fontspec} \setmainfont[Ligatures=NoCommon]{Latin Modern Roman} \usepackage{luacode,luatexbase} \begin{luacode} local uchar = unicode.utf8.char function dosub ( s ) s = string.gsub ( s , 'ff', ...

3

If you are using graph syntax, directed edges are specified within the tree specification itself. For example, { r -> a } indicates a directed edge from r to a. The whole point of the graph drawing libraries is that you specify the relationships and let Lua figure out the detailed structure. Using this syntax, the directed edges are no problem. And, ...

1

The LaTeX file generated by this program runs in 4.3 seconds in pdflatex and 13.1 seconds in lualatex. #include <stdio.h> #include <stdlib.h> #include <limits.h> int main() { FILE *fl=fopen("try.tex","w"); long x,y; ...

8

For comparison, in ConTeXt the penalty is similar. Test file (13 pages) \starttext \dorecurse{50}{\input knuth \par} \stoptext System details Macbook Pro with ConTeXt standalone. LuaTeX time context --noconsole --runs=1 test.tex 0.96s user 0.08s system 97% cpu 1.069 total Pdftex time texexec --noconsole --runs=1 test 0.40s user 0.13s system 83% ...

6

In my case, the speed difference was entirely attributable to the microtype package. documentclass{article} \usepackage{lipsum} \usepackage{charter} \usepackage{microtype} \begin{document} \lipsum \end{document} shows a factor 3 speed difference. some other features of my document (probably tabulars) managed to worsen this by a further factor 2 for a ...

15

I believe the question "which is slower" depends on more than just the preamble. As you noted, it may make sense to postpone speed penalties until they are actually used. This answer is just a partial answer within my scope and interest, so you may need further input regarding the "factor 6 speed penalty" for your example preamble. In the following ...

3

I have no problem with lualatex from up-to-date TL 2015 (I used "..." for some Japanese characters which the editor of SX doesn't allow.) \documentclass[a4paper]{article} \usepackage{fontspec} \setmonofont[ BoldFont = Source Han Code JP B, Scale=0.9 ]{Source Han Code JP L} \setmainfont{Source Han Sans Regular} \begin{document} This is Source Han ...

4

Here is a list of context modules that fulfill tasks of LaTeX packages: Annotation for todo notes like todonotes ConTeXt Lettrines for lettrine Gantt for drawing Gantt charts like pgfgantt simpleslides for the beamer class Letter module for writing letters like letter There are also a few direct ports of LaTeX packages to ConTeXt: Algorithmic AMS-LaTeX ...

4

Imho it is a problem of the implementation in polyglossia: the space is lost inside some boxes: \documentclass{article} \usepackage{fontspec, polyglossia} \setdefaultlanguage{french} \begin{document} \begin{tabular}{l} \today{} here: should have been a space before those two dots! \end{tabular} \mbox{\today{} here: should have been a space ...

1

The problem is \directlua{Semaine("\unexpanded{#1}")} At least it prevents, that #1 is expanded too early. But #1 is user contributed content, which might contain anything, including quotes, which would break the intended Lua syntax. Therefore LuaTeX provides \luaescapestring, which can be used as \luatexluaescapestring in LuaLaTeX. It automatically ...

2

You can use a refcontext: \documentclass[]{scrartcl} \usepackage[utf8]{inputenc} \usepackage[sorting=none]{biblatex} \addbibresource{biblatex-examples.bib} \begin{document} \cite{shore}\cite{aksin} \printbibliography \begin{refcontext}[sorting=nty] \cite{shore}\cite{aksin} \printbibliography \end{refcontext} \end{document}

8

With the advent of MacTeX2014 and continuing in MacTeX2015 -- and likely to persist into the indefinite future :-( -- Lua(La)TeX can no longer directly access certain font features, such as ligatures, if the font is a system font whose ligature-related properties are AAT-encoded and not OpenType-encoded. Hoefler Text, Didot, and Baskerville are three such ...

2

It is rather unclear what you actually want. But here two suggestions: You could still use SourceSerifPro as main font and fake a slanted font: \documentclass[]{scrartcl} \usepackage{fontspec} \defaultfontfeatures{Ligatures=TeX} \setmainfont{SourceSerifPro}[ ItalicFont = SourceSerifPro, ItalicFeatures={FakeSlant=0.2}] \begin{document} This is a ...

6

The luacode environment works by changing catcode codes to make in the input easier to pass to Lua. That can't work inside a macro: the input is already tokenized. In that sense luacode is similar to a verbatim environment. For any long block of Lua code you are best having it in a separate file, whilst for short blocks I'd stick to \directlua and be aware ...

Top 50 recent answers are included