Tag Info

New answers tagged

6

First, you want to concatenate the value of the variable i with the token \hskip1cm, but the expression i\hskip1cm is not a valid lua expression. What you need is to make \hskip1cm a lua string and concatenate it with the value of i. That is: tex.sprint(i .. "\hskip1cm") This, however, won't work either because inside the quotes, the \ is a escape-char ...


2

The issue is due to font features being disabled by default. Enable font features as follows: \starttypescript [serif] [ContentBody] \definefontsynonym [Serif] [name:librebaskervilleregular] [features=default] \stoptypescript \definetypeface[ContentFont] [rm] [serif] [ContentBody] [default] \usetypescript[ContentFont] [ec] \setupbodyfont[ContentFont] ...


14

The function is called fact(#1) without the key word function. Also the result needs to be feed back to TeX, e.g. via tex.write: \documentclass{article} \directlua{dofile("luatest.lua")} \newcommand*{\myluafact}[1]{% \directlua{tex.write(fact(#1))}% } \begin{document} test \myluafact{5} \end{document} Improvement for \myluafact: The lua ...


1

If you try the following code, there is no error: \documentclass{standalone} \usepackage{luatextra} \usepackage[frenchb]{babel} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} \legend{a} \end{axis} \end{tikzpicture} \end{document} Advice: If you compile a document via lualatex with frenchb and tikz, don't add ...


1

I experienced this as well, I had success using TIS-620


1

There are different ways to solve this. Since LuaLaTeX handles unicode quite well, you can redefine the symbol directly in siunitx setup: \sisetup{ text-angstrom={Å}, math-angstrom={\text{Å}}, } Replacing the unicode Å symbol with \AA is not working. That might very well explain why it was not working in the first place.


6

You can explicitly load the glossaries-polyglossia package to fix the problem: \documentclass{article} \usepackage{fontspec} \usepackage{polyglossia} \setdefaultlanguage{german} \usepackage{siunitx} \usepackage[xindy]{glossaries} \usepackage{glossaries-polyglossia} \makeglossaries \newglossaryentry{a}{name = ä, description = A Umlaut} \begin{document} ...


1

You can also use the following hack: use same layer to align horizontally, but also rotate=90 the whole graph, so that horizontal becomes vertical (this does not rotate the node contents, which is perfect for this case): \documentclass[10pt,letterpaper]{article} \usepackage{tikz} \usetikzlibrary{graphdrawing,positioning,graphs} \usegdlibrary{layered,trees} ...


5

The glossaries package will use translator if loaded for translating strings. The translator package requires that the language name is given as a global (class) option (which is usual babel 'best practice'). Unfortunately, polyglossia doesn't use this method as standard, but it will work happily. Try \documentclass[german]{article} ...


5

Like this? \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{graphs} \begin{document} \begin{tikzpicture} \begin{graph}[grid placement,wrap after=2]{ 1 -> 2 -> 3 -> 4 -> 5, 1 -> 3, 1 -> 4, 2 -> 4, 2 -> 5}; \end{graph} \end{tikzpicture} \end{document} More Details You can assign a shift to a node. use / ...


4

With MiKTeX 2.9, your file compiles perfectly. But perhaps you should update your installation: your .log file mention LuaTeX, Version beta-0.70.2-2012060719 (MiKTeX 2.9 64-bit) and the beginning of my .log file is This is LuaTeX, Version beta-0.76.0-2013062821 (rev 4627) (format=lualatex 2013.6.28) 11 SEP 2014 13:54 \write18 enabled. You also can try ...


2

My previous comment seems to solve the question and is posted here now as an answer: I just tried the example using TeX Gyre Pagella, because the Arno font is not available (to me). Microtype was updated 2013/05/23 and I used the the beta7 before that. In both cases you can use letterspacing with LuaLaTeX. The 2nd example works for me on an updated TeXLive ...


6

I find no reason whatsoever for having math in Iwona when the main text font is Minion Pro. However, here's how you can do it: \documentclass[ 12pt, a4paper, twoside, openright, oneside, openany, titlepage, headinclude, footinclude, BCOR5mm, cleardoublepage=empty, tablecaptionabove, ]{scrreprt} ...


2

Loading iwona before fontspec (with the no-math option). Removing anything related to unicode-math. And commenting the packages arsclassica and classicthesis (there should be an option not to override the font, but I don't know right know, read the documentation, may be loading them before all the font packages is enough?). And then it compiles with XeLaTeX ...


5

I can make it work with some small adjustments, but only with XeLaTeX: Remove \usepackage[T1]{fontenc} Remove \usepackage[utf8]{inputenc} (but make sure your files are UTF-8 encoded) Remove the eulermath option to classicthesis Add the following before \usepackage{bookmark}: \usepackage{unicode-math} \setmainfont{TeX Gyre Pagella} \setsansfont{Iwona} ...


1

I have the same problem. In addition, I saw that lualatex does not produce a synctex.gz file. therefore, the forward search commando can not be executed. I was able to solve the problem, by changing the Option "Command line arguments to pass to the compiler" (On the tab (La)Tex of the profile) to -interaction=nonstopmode --synctex=1 "%Wm" especially, ...


4

File hsrm-beamer-demo.tex loads package dtklogos, which contains in lines 138 to 147: \ifluatex \RequirePackage{fontspec} \newfontface\DANTEFONT{DANTE} \providecommand*\DANTE[1][]{\DANTEFONT DANTE} \else \providecommand*\DANTE[1][]{% \begingroup \usefont{OT1}{dante}{m}{n}\selectfont DANTE% \endgroup} \fi DANTE is a special font ...


5

A single call to tex.print produces a single line of input, so you must call it once per line. For instance, to get two newline markers, do Here is a Lua paragraph\directlua{tex.print("") tex.print("")}And here is another one. Issuing \tracingall before these lines shows that indeed there is a single \par, and not two. The same is true for the table: ...


9

Instead of \scantokens\expandafter{\code@temp}, you can pass the string to Lua, let it split the string at new lines, and tex.print each line. Calling tex.print only once would result in a single line of input, and no amount of catcode trickery would make TeX behave as if there were multiple lines. I thus use the following Lua code in the full example ...


6

Since you're loading the luacode package, you could make use of its macro \luastring. (Yes, the name of the tex file in this example really is uvw.) % !TEX TS-program = lualatex \documentclass{article} \usepackage{fontspec} \usepackage{luacode} \begin{luacode} function foo(s) -- "s" is a variable tex.sprint( s ) end \end{luacode} ...


7

You have some macros outside of \psgraph, the reason why they are not known for the lualatex run. Use the environment postscript to encapsulate the complete PSTricks stuff: \RequirePackage{ifluatex} \documentclass{article} \ifluatex \usepackage{fontspec} \setmainfont{TeX Gyre Pagella} \else \usepackage{tgpagella} \usepackage{pst-plot} ...


3

A figure environment is never split across pages. If you want that something doesn't float, don't make it into a floating environment. Also, anything repetitive should be compressed into a new command. \documentclass{report} \usepackage[textwidth=15cm]{geometry} % 6+1+8=15 \usepackage[demo]{graphicx} \usepackage{adjustbox} \usepackage{lipsum} % just for ...


1

On OSX, I was able to get things working in the following way: Install to default user location (/Users/john/Library/Fonts) mkluatexfontdb --force --verbose=-1 -vvv That's all it took!


4

You can use a separate figure for each image and to make sure the order is not altered you need only to specify the location options for each figure environment [!htb]. Also use \vspace{-0.25cm} to align text and figures correctly. No need for a minipage at all. See this modified code: \documentclass[letterpaper]{report} \usepackage[demo]{graphicx} ...


3

the \begin{minipage}{\textwidth} is not doing anything as the figure environment is already effectively a minipage. minipages and floats never break over a page. You could use a longtable for a multipage table or simply place each image and text in a paragraph outside any table or float: \includegraphics[width=8cm]{name1} \parbox[t]{6cm}{some text} ...


3

Well, according to what you have explained, what you need is not really translate, simply adapt your code to use XeLaTeX instead of pdflatex that is according to what I see, most affordable and easy to do. Remember that the charm of XeLaTeX resides in to use true type fonts and especially open type easily in LaTeX. So you can bring together the best of both ...


9

I think the problem arises because when the sprial changes direction two squares are drawn at each corner. For example, if the spiral is moving right, when the x < x_max condition is not met the direction is changed but the y coordinate is not moved up so the next square is drawn in the same place as the last square. I've corrected this in the code below ...


2

There are many, many options for the placement of graph nodes. These are covered in-depth in Section 19.9 of the current (v3.0) pgfmanual. I assume your actual use case is more complex than this, so it's worth examining the options to choose the best one for your situation. But for this simple example, grow right sep=1cm should show the behavior you ...


7

My development version of fontspec might be out of sync with the current TeX Live version on this matter — I know I recently fixed an issue that involved \addfontfeatures incorrectly creating new font families. In my development version, the 2nd use of \addfontfeatures line in the log file doesn't lead into the ‘Font Family (…) created’ message. However, I ...


2

As noted by Seb, the fontspec package is often used for handling (OpenType) fonts in LuaLaTeX. However, loading the package is not mandatory (but there are benefits to using OpenType fonts). According to the libertine manual, there is a package option type1 (or nofontspec) for reverting to Type 1 fonts, as used by pdflatex. The option is relevant when ...


4

This is because LuaLaTeX handles fonts in a different way. The equivalents to your working PDFLaTeX options are \usepackage{fontspec} % Font handling \setmainfont[]{Linux Libertine O} % Main font is Linux Libertine \setmonofont[]{CMU Typewriter Text} % Monospace font is Computer Modern Typewriter For deeper understanding of what is going on with fonts in ...


4

Just following up on the great comments by @Aditya and @phg, I did the following: I created a test suite using the really cool lunatest framework. It is trivial to set up because one only needs to require('lunatest'), and there is a helpful set of examples in test.lua. Once I have created my own my_tests.lua I run it with: context my_tests.lua --purgeall ...



Top 50 recent answers are included