# Tag Info

4

\directlua does expansion, so you are doing if U01 == ("U01") that clearly returns false. You have to quote the string: \documentclass{article} \begin{document} \newcommand{\testmacro}{U01} \directlua{ if "\testmacro" == "U01" then tex.print ("testmacro equals U01") elseif "\testmacro" == "U02" then tex.print ("testmacro not equal") else tex.print ...

4

Here's a comparison of the kappa in some freely available Greek fonts in TeX Live: \documentclass{article} \usepackage[LGR,T1]{fontenc} \usepackage[utf8]{inputenc} \newcommand{\test}[1]{% #1: {\fontencoding{LGR}\fontfamily{#1}\selectfont κ}% } \begin{document} \test{cmr} \test{artemisia} \test{gfsbaskerville} \test{bodoni} \test{complutum} ...

3

Here are two approaches. The first does not solve your particular case, but can help in a number of situations. The second shows how to change the overall style of the drawing to avoid overlap. You can adjust the placement of a final node by adding a nudge argument, e.g. B [probability=0.4,nudge up=2mm], will place the node B a little higher than the ...

4

It all depends... luatex is a two-language system and a lualatex package can use either language. You could write a package written just as a classic latex package but using some of the extended tex commands available in luatex, such as \umathchar etc. You could write code that is almost all Lua, with just a very thin TeX wrapper mypackage.sty that just ...

2

You need an expandable command here. the LuaTeX \directlua gives expandable access to lua so: \documentclass{article} \usepackage{siunitx} \newcommand\proc[1]{% \num{% \directlua{tex.sprint(#1)}% }% } \begin{document} \proc{2+3} \end{document}

2

Note the code as posted generates an error as luacode reads its content verbatim so % <- simpliest ? is passed to Lua and generates a syntax error. But I don't think you need luacode here. You could just make the call to math.random directly inside the expansion of \sqrt. Then I'd normally use a TeX loop around the outside, but here I've used ...

1

Using test releases of luatex 0.85 and the luatotfload from github sources, I get So this should work in texlive 2016.

1

Section 6.1 of the manual tells how to set the features for specified families declared with \setmainfont or \setsansfont: \documentclass{article} \usepackage{fontspec} \defaultfontfeatures[\rmfamily,\sffamily,\ttfamily]{} \setmainfont{Linux Libertine O} \begin{document} force "x y Fx Fy" -- ---  '' \end{document}

4


7

As a work-around you could switch locally to ansinew reading with luainputenc: (edited a bit to reset the catcodes afterwards and also removed the write call back so that the toc now contains again real utf8). \documentclass{article} \usepackage{fontspec} \usepackage{luatexbase} %not needed now, but probably in the future. \PushCatcodeTableNumStack ...

13

The problem is not in mixing Icelandic and German. A smaller example shows the issue in all document classes. \documentclass{article} \usepackage[icelandic]{babel} \begin{document} Test \end{document} Running this through LuaLaTeX produces the same error you see (and similar ones later on): ! String contains an invalid utf-8 sequence. l.144 ...

2

You should upgrade your latex system then the problem would go, I don't recall that error but the only way that I can see it could occur is if \e@alloc@ccodetable@count has the incorrect definition (\relax most likely) It should go if you add this \newcount line at line 140 of ltluatex.tex immediately before the existing line \e@alloc@ccodetable@count=\z@ ...

3

Using the test release of luatex 0.85 I get from \tracingoutput1 \tracingonline1 \showboxdepth1000 \showboxbreadth1000 abc\begingroup\hyphenpenalty -10001\discretionary{d}{e}{f}\endgroup ghi\begingroup\hyphenpenalty 10001\discretionary{d}{e}{f}\endgroup \bye and a log Completed box being shipped out [1] \vbox(667.20255+0.0)x469.75499, direction TLT ...

4

This seems to be a bad interaction between luatex's file logging and LaTeX's definition of input. It isn't related to the error callback, status.filename gives the wrong file even if called directly. Trying with the latest test release of luatex 0.85 (and a test release of latex 2016/01/01) I get result that matches the result you show with latex, but not ...

3

The same workaround as for package clash fontspec eulervm amsmath applies, both for XeLaTeX and LuaLaTeX. \documentclass{article} \usepackage[libertine]{newtxmath} \usepackage[no-math]{fontspec} \setmainfont{Linux Libertine O} \DeclareSymbolFont{operators}{\encodingdefault}{\familydefault}{m}{n} \begin{document} 123 $123$ --- \emph{a} $a$ \end{document} ...

3

You haven't exactly provided a lot of details about the table you wish to create. In the following example, a table environment is set up to house a \caption (along with a \label so that the table may be cross-referenced elsewhere in the document) as well as a two-column tabular environment. The macros \toprule, \midrule, and \bottomrule -- all provided by ...

3

It seems that when i is the first node in a horizontal list some “contextual” is activated and luaotfload substitutes the i with the character in position 984069, that's indeed a dotless i (it's in the Private Use Area). Looking in the Lua table for EBGaramond, I find this description for the glyph 105 (that is, the “i”): [105]={ ["anchors"]={ ...

3

The problem turns out to be in the way LuaTeX is compiled when it is distributed. All the symbols are stripped out of the binary, so dynamically linked .so libraries can’t locate the symbols they need. See the discussion on LuaTeX mailing list: http://tug.org/pipermail/luatex/2015-November/005440.html The alternative is to compile your own LuaTeX binary ...

2

The fromjapanese and langjapanese keys are missing from the list in biblatex2.sty. Add them, I think the issue will be fixed soon. \documentclass[final,a4paper]{article} \usepackage{fontspec} \usepackage{polyglossia} \usepackage{libertine} \setdefaultlanguage[babelshorthands=true]{russian} \setmainlanguage{english} \usepackage{biblatex} % compiles if ...

3

Among the available free Unicode math fonts there are just a few possibilities. \documentclass{article} \usepackage{fontspec} \usepackage{unicode-math} \setmainfont[Ligatures=TeX]{TeX Gyre Pagella} \setmathfont{TeX Gyre Pagella Math} \begin{document} Pagella:\par $\mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ \medskip Bonum:\par \setmathfont[range=\symcal]{TeX ...

2

This appears not to be an issue with mathastext but rather one of lualatex in math mode. Here is some code to exhibit the font used for digits by mathastext in math mode. The output looks correct for both xelatex and lualatex but for the latter the figures are oldstyle despite what I understand of the font descriptor. \documentclass[9pt,fleqn]{extarticle} ...

8

This is imho due to the problem described here Ligatures are not used in OpenType maths families?. Ligatures and kernings of open type fonts are not used in math mode. You can as suggested by egreg switch to "classical" math fonts. With luatex you can also load the operator font in base mode: \documentclass{scrartcl} \usepackage{amsmath} ...

8

You should load fontspec with the no-math option. And yes, you should also load lmodern for using the Latin Modern (legacy) math fonts. Without it the math fonts would be the usual Computer Modern ones. \documentclass{scrartcl} \usepackage{amsmath} \usepackage{lmodern} \usepackage[no-math]{fontspec} \usepackage{microtype} \begin{document} ...

3

You can traverse the linked list of lua nodes that make up a TeX box. texdoc luatex should show you the manual, there are several examples on this site as noted in comments for example PDF page references in TeX4ht generated html?

1

So I ended up with adapting this answer. I just added a custom function for printing to latex in Lua: function texsprint(text) for line in unicode.utf8.gmatch(text, "[^\r\n]+") do tex.sprint(line) end end

2

As mentioned by others in the comments, I found the macports installed binaries port provides /opt/local/bin/latex Then simply uninstall it sudo port uninstall --follow-dependents texlive-bin Now if you do which lualatex it shows /usr/texbin/lualatex The other shortcut I realised could be directly accessing the mactex binaries by ...

4

The symbol is not gone, but the interface of unicode-math has changed a bit. \documentclass{scrartcl} \usepackage{amsmath, amsfonts, amsthm} \usepackage{fontspec} \usepackage{unicode-math} \setmainfont[Ligatures=TeX]{TeX Gyre Pagella} \setmathfont{TeX Gyre Pagella Math} \begin{document} mathbf: $\mathbf{\chi}$ symbf: $\symbf{\chi}$ \end{document} ...

7

Let's try simplifying the example. \documentclass{article} \usepackage{fontspec} \setmainfont{Latin Modern Roman} \begin{document} \addfontfeatures{LetterSpace=30.0} AB CD EF \showoutput \end{document} This is the relevant part from the log file when compiling with LuaLaTeX: ....\hbox(0.0+0.0)x15.0, direction TLT ....\EU2/LatinModernRoman(1)/m/n/10 A ...

0

Too long for a comment and partially an answer: I'm using this MWE for Emacs: \documentclass[a4paper]{article} \usepackage{fontspec} \begin{document} Hi, I want to use characters like : é, à, è, ï, î. \end{document} %%% Local Variables: %%% TeX-master: t %%% TeX-PDF-mode: t %%% TeX-engine: luatex %%% TeX-command-extra-options: "-shell-escape" %%% ...

4

I guess your question is "What's going on here?" Loading fontspec changes the current font from Computer Modern to Latin Modern. And the length governing the width of the page number in the ToC, given by \@pnumwidth, is defined in terms of the font using ems. To isolate the problem, compile the following document with either XeLaTeX or LuaLaTeX: ...

3

The same patch I proposed for the LuaLaTeX problem (LuaLatex and large braces with MathTime Professional 2) seems to give good results: \input amstex \input mtp2 \catcode`@=11 \def\PEX@#1{\setbox\Pbox@\vbox{$$\left.\vcenter{\copy\prePbox@}\right)$$}% \setbox\Pbox@\vbox{\unvbox\Pbox@\unskip\unpenalty \setbox\Pbox@\lastbox ...

1

unicode-math is already checking to see if \npropto is defined (it is not, in this case) and only falls back to overprinting if it is not defined. It uses the original definition (saved as \__um_oldnot:) which isn't really appropriate here, rather than redefine \not to do something else as a fallback, cheat a bit and redefine the saved \__um_oldnot: to ...

4

ConTeXt needs to redefine some of the definitions of graph module. To use these redefinitions, you have to use MP instance graph. To do so, Add \usemodule[graph] in your preamble. If you are using the MPcode environment, use \startMPcode{graph}. If you are using MPpage environment, use \startMPpage[instance=graph]. You do not need to add begingraph(..) ... ...

6

This seems to be fixed in the current 0.80 release This is LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238) restricted \write18 enabled. (./gg384.tex---- looking at table char 50 table: 0x60106f270 depth = 0 used = false width = 327681 expansion_factor = 333 ...

Top 50 recent answers are included