New answers tagged

2

Replace \mi and \mii with the \directlua calls \documentclass{scrreprt} \usepackage{fontspec} \newcommand\foo[1]{#1} \let\Item\item \renewcommand\item[1][]{\Item[\mi#1\mii]} \def\mi{<m1>} \def\mii{<m2>} \begin{document} \foo{% \begin{itemize} \item[x] hello \item[y] world \end{itemize} } ...


2

You need to delete the lua/luc-file of the font from ...\texmf-var\luatex-cache\generic\fonts\otf. It contains the old path to the font and so confuse luatex. I'm not sure if it is worth if luaotfload adds a check for this case to recreate the cachefile but you could open an issue https://github.com/lualatex/luaotfload/issues.


3

This artifact is visible whenever a non-boxed axis style is used. If a boxed plot is used, the axis box line covers this area, so the clipping is not visible. In addition to the proposed changes by corporal, you can avoid the clipping on a per-axis basis by adding clip=false to the axis options. Beware that this may be unsuitable for plotting certain ...


3

Here are a couple of possible ways to fix the problem. Add enlarge y limits={abs=0.4pt}, after the axis option ytick = \empty, Don't forget the extra comma after \empty. Use abs=0.4pt because this is the line width of the plot, so it removes the truncation or clipping at the top, but also adds a small amount of padding at the horizontal axis. A separate ...


3

You need the code after \draw to expand to tikz syntax: \RequirePackage{luatex85} \documentclass{article} \usepackage{fontspec} \usepackage{tikz,xparse} \usetikzlibrary{quotes,through,calc,intersections,backgrounds} \usepackage{luacode} \usepackage[margin=1cm]{geometry} \luadirect{require "LTG_Droites"} \DeclareExpandableDocumentCommand{\Dt}{% ...


1

If you (a) reduce the values of the length parameters \arraycolsep, \thickmuskip, and \medmuskip and (b) use the bmatrix environment of the amsmath package instead of array environments, the equation and the equation number fit on a single line. \documentclass[12pt]{report} \usepackage{amsmath} \usepackage[vmargin=25mm]{geometry} ...


1

I propose to use the medsize environment (about 80 % of \displaystyle), from nccmath. Also I simplified your code, using the bmatrix environment: \documentclass[12pt]{report} \usepackage{geometry} \usepackage{mathtools, nccmath} \geometry{ top=25mm, bottom=25mm, showframe } \newcommand{\sss}[2]{_{_{#1_{#2}}}} \begin{document} Some text some text some ...


17

The error is due to breqn, of course. Only one definition for an active character can be valid at a given time. Since you have a math comma in the section title, this goes in the header and, with that long verbatim, it gets typeset when verbatim is active, which gives a different meaning to the active comma. Here's a minimal example showing the issue. ...


14

The main problem is the breqn math comma being written to the mark used in headings while verbatim is active. which gives a classic fragile command in moving argument cryptic error. \hbox hides this (a better fix allowing the comma to be used normally may be posted later) The fact that luatex segfaults after the runaway argument is a separate lower level ...


2

Based on egreg's solution, I was able to patch the \SQRT command for slanted root symbol. Before the patch, the code $ \epsilon $ is a small positive quantity. \[ \lim_{n\to +\infty} \SQRT{ \frac{\displaystyle \int_{-\epsilon}^\epsilon \cos^n x \,\diff x} {\displaystyle \int_{-\pi/2}^{\pi/2} \cos^n x \,\diff x}} = 1 \] \[ \PARENS{ ...


3

You have to use Renderer=Basic. There are also far better ways to define the font, with the newer versions of fontspec \documentclass{article} \usepackage[no-math]{fontspec} \newfontfamily{\myswashfont}{Cochineal}[ Style=Swash,NFSSFamily=myswash,Renderer=Basic ] \newfontfamily{\mynonswashfont}{Cochineal}[] % just for testing ...


0

While it is possible to use these fonts with lualatex (by using the correct fontencoding and not using fontspec) I wouldn't recommend it. The hyphenation will be wrong and you will get problems with non-ascii-chars like umlauts. If you want to switch to lualatex do it properly and use open type fonts. If you want to try it out do it like this: ...


0

Turns out that there was still residue from my previous texlive installation that I made via apt repositories. There were texlive directories in /usr/share/texlive/ (from repositories) and /usr/local/texlive/2015/texmf-dist/tex/latex (user installed). The shutdown script apparently called the wrong compiler, which was the one /usr/share. When I uninstalled ...


0

Your tex file looks wired. My code for including fonts did always look different from that. Dante has a good fontspec example on their ftp. ftp://ftp.dante.de/tex-archive/macros/latex/contrib/fontspec/fontspec-example.tex \documentclass{article} \usepackage{fontspec} \setmainfont{TeX Gyre Pagella} \setsansfont{TeX Gyre Heros}[Scale=MatchLowercase] ...


2

Just uninstall the whole MiKTeX package itself (don't touch LyX), download from MiKTeX then do a whole reconfigure from within LyX. It worked. Things are back to normal now.


3

In the first case (an 8-bit engine), the set up \newunicodechar{∫}{\int} uses active characters to make the multi-byte sequence ∫ expand to the control sequence \int. It is that which is therefore important. A quick \show reveals that \int expands to \intop\nolimits and that \intop is defined (\mathchardef) as \mathchar"1352. That's then the 'raw' ...


4

You don't need map, enc, tfm, vf. xetex has the necessary code to extract the information built-in, for luatex you need a fontloader like e.g. luaotfload. You normally also don't need fd-files. fontspec tries hard to guess which font or font feature is needed for some font shape and then builts the NFSS-structure on-the-fly. But it can fail, that's why ...


5

The first thing to note is that the problem really has nothing to do with TikZ. Consider \documentclass{article} \begin{document} العائلة \end{document} which produces a blank page when compiled with LuaLaTeX. This is not surprising: the default configuration supports English and uses fonts with a limited range of characters, all Latin script. To ...


2

It seems indeed that the the cyrillic glyphs were removed from the last available for download on the GUST.org version 2.004. An older version is available for download on fontsquirrel. Original answer, not correct I have recently run into a similar problem. I was surprised to learn from the ArTourter answer that the Cyrillic glyphs were removed due to a ...


6

If you don't trust the manual put print(_VERSION) in v.lua then texlua v.lua will produce something like $ texlua v.lua Lua 5.2 (which was using 0.95 from texlive 2016)


1

\luaexec is not expandable, but \luadirect is: \documentclass{article} \usepackage{luacode} \luaexec{x = 0} \makeatletter \AtEndDocument{% \immediate\write\@auxout{% \noexpand\luaexec{x = \luadirect{tex.sprint(1)}}} } \makeatother \begin{document} x = \luaexec{tex.sprint(x)} \end{document} At the second run, x = 1 is printed.


5

polyglossia loads fontspec (which is recommended if you use lualatex). fontspec changes the font encoding to an encoding suitable for an unicode engine like lualatex but this clashes with minionpro.sty (which is meant for pdflatex). If you want to switch to lualatex you will have to change your font setup - and you should always load polyglossia after ...


4

It is probably related to this reported bug (which does not apply to the windows binaries according to the last message in the thread) http://tug.org/pipermail/luatex/2016-April/005893.html


4

The luacode environment cannot be the argument to another command, similarly to verbatim environment. The reason is the usual one: category codes cannot be changed once the token list has been absorbed as an argument; the culprit here is obviously % that's a comment character when \footnote starts absorbing its argument. It's recommended to have it in the ...


1

beamer has its own methods to set colours. To modify the title colour it is better to use \setbeamercolor{title}{fg=red} instead of messing with the argument of \title{}. \PassOptionsToPackage{unicode=true}{hyperref} \documentclass[xcolor=svgnames]{beamer} \setbeamercolor{title}{fg=red} \title{Example Presentation Created with the Beamer Package} ...


2

Your color in the title triggers the error. Hide it with \texorpdfstring: \title { \texorpdfstring{\color{red}}{}Example Presentation Created with the Beamer Package }


0

Here's a solution that (a) uses \directlua instead of \luaexec and (b) doesn't use [[ and ]] to delimit Lua strings. \documentclass{article} \usepackage{luacode} \usepackage{tabularx} \begin{luacode*} function fline(value) n = tonumber(value) tex.print("\\multicolumn{1}{c}{} & \\multicolumn{1}{c}{1} & \\multicolumn{1}{c}{2} ...


3

\directlua is expandable but \luaexec is defined via > \luacode@execute=\long macro: #1->\begingroup \escapechar 92 \newlinechar 10 \edef \\{\string \\}\edef ~{\str ing ~}\let \%=\luacode@percentchar \let \#=\luacode@sharpchar \expandafter \exp andafter \expandafter \endgroup \luacode@dbg@exec {#1}. so inserts many non expandable tokens before the ...


3

Care needs to be taken when identifying the source/cause of the difference in output. For sure, \documentclass{standalone} \begin{document} $v_{\mathrm{eff}}$ \end{document} can be compiled with both pdfLaTeX and LuaLaTeX. Importantly, it produces identical results with respect of the relative position of the subscript term, irrespective of whether ...


0

Protip: Don't have file names with empty space in them such as "Spider Man" Or "Dolly Parton" For whatever reason XeLatex compiler can't handle them.


0

Here is a patch to modify the font used by url to be configured to use so called base mode in LuaTeX+luaotfload lingua. Indeed by default text fonts are declared using node mode, which (quote) does not work in math mode whatever that means. The patch modifies the font name to replace mode=node if present by mode=base. But... in the example below I get the ...


2

The instruction \the\font produces nothing “visible”, but the control sequence that chooses the current font, in the internal NFSS format. You can produce the string representation of this control sequence by \expandafter\string\the\font. I changed the fonts to some I have. \documentclass[12pt]{article} \usepackage{fontspec} \usepackage{polyglossia} ...


3

Load the luatex85 package: \documentclass[oneside,a4paper, 12pt]{article} \usepackage{luatex85} \usepackage[T1]{fontenc} \usepackage{fontspec} \setmainfont{TeX Gyre Termes} \usepackage{polyglossia} \setdefaultlanguage{english} \usepackage{microtype} \begin{document} challenge is to know whther s \end{document} Then microtype will recognize luatex ...


10

It's a tough problem, unfortunately. The developers of LuaTeX decided to remove several primitives favoring a syntax \pdffeedback <keyword> Some of the removed primitives were expandable: \pdftexrevision \pdfxformname \pdfcreationdate \pdffontname \pdffontobjnum \pdffontsize \pdfpageref \pdfcolorstackinit which means that one expansion step was ...


1

Just for completeness: It is also possible to use the simplified version of the Friggeri CV from my github account. I modified the template so that it works with a regular Texlive installation and pdflatex, without the need for luatex and biber.



Top 50 recent answers are included