« first day (3119 days earlier)      last day (1811 days later) » 

12:01 AM
Is anyone familiar with making Beamer presentations in LyX?
I need someone to walk me through some basic things. Like how do you define the end of a frame in a Beamer presentation? And how do you insert a block within a frame, and how do you define the end of a block?
 
12:31 AM
I posted a question on it:
0
Q: How do you delimit Beamer frames and blocks in LyX?

Keshav SrinivasanI’m a new LyX user, and I would like to make a Beamer presentation. But I don’t understand how to perform some absolutely basic functions: inserting a block in a frame that does not have one yet defining the end of a frame so you can type content within the frame defining the end of a block so...

 
 
1 hour later…
1:38 AM
@FaheemMitha Hi! Can you help with ^^ ?
 
 
4 hours later…
6:02 AM
@Pandya Help you with what?
 
6:23 AM
What could be wrong with this? I set TOC for a book to only show part and chapter, but the TOC is still showing everything. I must be doing silly but I do not see.
\documentclass[11pt]{scrbook}%
\begin{document}
\title{A title}
\maketitle

\setcounter{secnumdepth}{1}
\tableofcontents

\chapter{Introduction And Results}
\section{Introduction}
test A

\chapter{Miscellaneous PDE's}
\section{General first order}
\subsection{Linear PDE, the transport equation}
test B
\subsection{Linear PDE}
test C
\end{document}
Is something wrong with the command \setcounter{secnumdepth}{1} I am using?
When I compile it, this is the TOC
Ah, I think I found it. I need to use \setcounter{tocdepth}{1}
 
 
2 hours later…
8:39 AM
@JosephWright is there in the shipout code already something that would allow tex.box["AtBeginShipoutBox"] in some lua code?
 
@UlrikeFischer Not sure about that: I suspect Hans would say do all the stuff from the Lua side (see for example how they handle all the PDF resources)
@UlrikeFischer, @DavidCarlisle I've been thinking again about colour support. I've not covered all of xcolor's expression syntax, but I wonder if that might be best: it's very well-established
 
@JosephWright that's not from the pdf resources but from the tagging code. I need to traverse the box to inject the literals. So I'm doing \AtBeginShipout{\directlua{uftag.func.mark_shipout ()}} and the lua code goes through the box (but I didn't test yet if stuff added also with atbegshi eg. by e.g. eso-pic is missed or not ;-)).
@JosephWright what is the long-time plan here? overwrite xcolor commands?
 
9:05 AM
@JosephWright I had better do some work stuff, just got in (more or less on time:-) after driving up from Surrey:-)
 
 
1 hour later…
10:06 AM
Erhm, what is going on here:
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\newsavebox\dlf
\begin{tikzpicture}
\sbox\dlf{%
\begin{minipage}{65mm}%
test
\end{minipage}%
}
\node[draw] at (0,0) {\usebox\dlf};
\end{tikzpicture}
\end{document}
The contents is missing
It works if I define the box outside the tikz picture, but I need it inside a macro that runs inside a tikz picture.
I'm guessing side effects of the font manipulation that tikz does (text outside \paths are ignored)
 
10:36 AM
@daleif the default font in a tikzpicture is \nullfont I guess the log is telling you that nullfont is missing t e s t ?
why do you need a minipage with that syntax? a tikz node with a width specified is a minipage?
 
10:49 AM
@daleif you can interrupt:
\sbox\dlf{%
\begin{minipage}{65mm}%
\begin{pgfinterruptpicture}
test
\end{pgfinterruptpicture}
\end{minipage}%
}
@daleif or \pgftext{test}.
 
@UlrikeFischer Not sure, I'm just thinking about user expectation
 
@JosephWright I know we discussed this before, but can you remind me of things you didn't support?
 
@DavidCarlisle why is that information only in the log and not the console log? I always compile externally, so I always watch the console log.
@UlrikeFischer thanks, did not know that one.
 
@JosephWright imho xcolor is so widely used in documents and classes and templates and styles, that its syntax should "work".
 
@daleif people have been asking that since 1979.. DEK did it that way and xetex and luatex followed. It's a pain:-)
 
11:04 AM
@DavidCarlisle on another tangent, is there any way to stop \usepckage{doesnotexist} pause execution under -halt-on-error, yes I sometimes type package names wrong, just annoying that I need to manually go and press x or what ever to proceeed
@UlrikeFischer thanks, I knew it had to be something like that, but did not know the remedies.
I did manage to get my application to work without it though
 
@daleif you could redefine it to be a warning, if that's what you mean (latex always avoids the primitive file not found error (which is very hard to get out of) so it is doing IfFileExists{foo.sty}{\input{foo.sty}{\error}` so you could make that a warning
 
@DavidCarlisle it is not because I need to test for it, all of the packages I use already exists on my system. I just do continues compilation, aka runs once I save, that while loop gets interrupted if I make a typo and write say \usepackage{masmath}, under -halt-on-error I'd much rather that it simply stopped execution without user intervention.
 
\gdef\@missingfileerror#1#2{\ERROR} probably works
 
On a different note, is it just me, or is there something wrong with the spacing here
The lunch line is in normal size, and the second line is script size, I find the word spacing way to big for some reason
 
11:23 AM
@DavidCarlisle is it expected that xelatex takes into account an existing bb-file when inputing a png?
 
yo'
@daleif it looks like doubly spaced indeed
 
@yo' it is typeset inside a tabularx with \raggedright in the second column (after the :), I thought it was the font, but it seems to do the same if I remove lato
 
yo'
@daleif no idea there really. Have you tried \tiny? Does the space remain the same?
 
@yo' same, hmm, I'll make some experiments
 
@UlrikeFischer vvv
\def\Gread@@xetex#1{%
  \IfFileExists{\Gin@base.bb}%
    {\Gread@eps{\Gin@base.bb}}%
    {\Gread@@xetex@aux#1}%
 
11:36 AM
@DavidCarlisle oh, is that new? On the xetex mailing someone is complaining about it.
 
@UlrikeFischer as old as xetex I suspect. I did half see some messages go by the other day. (do they have a bb with the wrong size?)
 
@DavidCarlisle as the bb were created from experiments with tex4ht they could imho easily have various size/scalings.
 
@UlrikeFischer well I think the answer is tough. it's a general feature that you can over-ride the image size with bb= 1 2 3 4 or specifying the same in an external file. Admittedly that was specified at a time when the intrinsic size was typically wrong or unreadable by the dvi driver and so manual over-ride was needed, but I think it is what it is and can't change now.
@UlrikeFischer the user can of course specify a \DeclareGraphicsRule that specifies a different (unused) extension rather than .bb if they want to disable this.
 
@DavidCarlisle I guess the main question of the OP is not why the bb are taken into account but why they seem now to scale down the picture. But it is really not clear if they were there also on the previous version (and with the same content).
 
@UlrikeFischer yes but that's why I asked if they are wrong size , if the bb is giving a different natural size than the intrinsic size in the png, then xdvipdfmx will do whatever it does, but the end result looking like a scaling is not impossible I would guess
 
11:55 AM
@yo' There is something wrong. Try this
\documentclass[a4paper]{article}
\usepackage{tikz,tabularx,array}
\begin{document}
\parskip=1em
\newcommand\mysize{\scriptsize}
\newcommand\test{%
\par\medskip
\mysize\itshape
\begin{tabularx}{\linewidth}{@{}l @{\ }
>{\raggedright\arraybackslash}X@{}}
Location: & Aud.~F (building 1534, room 125)\hmmm
\end{tabularx}%
}


\newcommand\hmmm{%
\rlap{\smash{\rule{0.1pt}{10cm}}}%
}

\newcommand\hmm{
\begin{minipage}{65mm}%
test test test
\test
\end{minipage}%
}



Outside tikz:



\hmm


outside tabularx (manually)
 
yo'
@daleif TikZ does some crazy stuff to font selection
 
@yo' I was wondering whether we can detect the space size in \scriptsize to see if there is a difference
 
yo'
@daleif well, it's quite obvious that the space length does not get updated inside TikZ
 
@yo' hmm, inside tikz \spaceskip and \xspaceskip are non zero (no idea what they do, just testing out of, tex.stackexchange.com/a/229642/3929)
 
yo'
\begin{tikzpicture}
\node[text width=70mm,inner sep=0pt] at (0,0)
{%
\mysize\itshape Location:\ Aud.~F (building 1534, room 125)%
};
\end{tikzpicture}

\begin{tikzpicture}
\node[text width=70mm,inner sep=0pt,font=\mysize\itshape] at (0,0)
{%
Location:\ Aud.~F (building 1534, room 125)%
};
\end{tikzpicture}
 
12:11 PM
@daleif they are usually zero everywhere (if they are non zero they are used in place of the font-specified inter word space)
 
@yo' try adding this inside the two nodes
\typeout{font size via node}
\typeout{space skip: \the\spaceskip}
\typeout{x space skip: \the\spaceskip}
font size inside node
space skip: 3.33298pt
x space skip: 3.33298pt
font size via node
space skip: 2.81454pt
x space skip: 2.81454pt
@DavidCarlisle that was what I got from wipets explanation
 
@daleif oh did you link to something, sorry just passing by and saw your comment above:-)
 
yo'
font size via node
space skip: 3.33298pt
x space skip: 5.0pt
font size via node
space skip: 2.01038pt
x space skip: 3.0159pt
 
@DavidCarlisle see chat.stackexchange.com/transcript/message/50312242#50312242, rather nice explanation
 
@daleif oh the link was in the message that I replied to :-)
 
12:15 PM
I'll just manually set both to zero and go back to attempting to get this to look good.
@DavidCarlisle everyone is getting older....
 
@daleif but we are not as old as @egreg
 
@DavidCarlisle Is this issue something that needs addressing (bug report, mention in manual).
 
@daleif sorry I really am only skimming the chat, what manual is this? (oh tikz?)
 
@DavidCarlisle exactly, I'm not sure whether tikz explicitly messes with \spaceskip and/or \xspaceskip
 
12:31 PM
@daleif it does, you can find it in the code (and there are also a number of question about it), but I don't know the reason.
 
@UlrikeFischer do not have time to dig right now, maybe some other time
 
@daleif your test is weird though anyway as \begin{tabularx}{\linewidth}{@{}l @{\ } doesn't do anything that useful why have a one column tabularx, especially with no X column.
@daleif it's just a slow way to add a non-dropped space at the end of the line
 
@DavidCarlisle in the real document it has two rows and there is an X column, though after altering the data I could just have used tabular
 
@daleif et al. -- I ran into this problem with plain tex in the early 1980s; \spaceskip and \xspaceskip are not font/size-specific. I should have followed up with dek at the time; I don't think that is clearly explained anywhere (but I'll be happy to be proved wrong re the explanation; I just don't know where to look).
 
@barbarabeeton @barbarabeeton I half suspected that but tikz doesn't re-instate the plain tex \raggedright (the normal latex one doesn't set \spaceskip)
@daleif ok I was just trying to understand why the tx case was a shorter line than the others, when I noticed that tx was adding \ at the end.
 
12:44 PM
@DavidCarlisle -- But what I'm trying to say is that if \spaceskip is set to be nonzero, it has to be explicitly reset to zero when the environment requiring the nonzero value is no longer in effect. The immediate problem may well be to determine where the nonzero (re)set is taking place. It also seems to be the case that this setting is global, and isn't amenable to grouping. (Which is really too bad, if true. Something else to check in the TeXbook, and a bug report submitted if true.)
 
12:59 PM
Is it allowable for packages to have a dot in the name? I.e. foo.bar.sty? If not, would foo_bar.sty work?
 
@FaheemMitha Try it out ...
 
@barbarabeeton no, it's local
@FaheemMitha it would sort of half work but be a bad idea (foo_bar would work fine, but may confuse users)
 
@DavidCarlisle -- Thanks. Where is it documented?
 
@barbarabeeton all such things are local unless documented as global
@barbarabeeton the fact that they are not font dependent is very rarely an issue and probably by design: you only set them if you want forced equal word spaces, and usually you set them at same time as you set the main font for that text block.
 
1:17 PM
@DavidCarlisle It's just for temporary/testing use. Not for general use. So foo_bar then.
Thanks.
 
@barbarabeeton which means you almost never need to explicitly set it back to 0
 
@DavidCarlisle -- Thanks. Well, I no longer have access to the project where I encountered the problem, so I'll just figure that I failed to localize things where it was necessary.
 
@barbarabeeton blame @UlrikeFischer
 
@DavidCarlisle what did I do??
 
@DavidCarlisle -- sounds unfair to me.
 
1:23 PM
@UlrikeFischer volunteered to take blame?
 
@DavidCarlisle -- hmmmmph.
 
1:35 PM
@DavidCarlisle oh general blame - for that I have my shirt ;-)
 
I was looking at LuaTeX. A couple of questions. First, does TeX Live 2019 use Lua 5.3? I'm using a prerelease with 5.2 (it's LuaTeX 1.07 in this prerelease) . More importantly, it seems that LuaTeX links to something that isn't regular Lua, but a modified version?
Unfortunately, it looks like Debian Buster will ship with the prerelease, which isn't ideal. I'm wondering whether it makes sense to upgrade to TeX Live 2019 proper.
 
@FaheemMitha luatex uses 5.3 since 1.9.x (I forget exactly) so yes that is what you get in tl2019, it is more or less a stock lua but with some modules pre loaded (it doesn't link to a system installed lua, but has the lua sources compiled in to the executable)
 
@DavidCarlisle Ok, thank you. Are there problems with using stock Lua?
 
@FaheemMitha you can not use a different Lua with luatex other than the one it is compiled with it basically us lua, try calling it as texlua rather than luatex
 
@DavidCarlisle In the sense of version, or in the sense of the specific binary?
 
1:43 PM
@FaheemMitha it just is not a possibility, as I say it basically is a lua executable so there isn't an option to call a different lua, other than than the general ability to shell out and call any operating system installed command,
 
@DavidCarlisle Ok.
texlua --version
This is LuaTeX, Version 1.07.0 (TeX Live 2019/dev/Debian)
Hmm, texlua is just a symlink to luatex.
 
@FaheemMitha yes as is lualatex dviluatex and several other things
@FaheemMitha texlua acts like lua, luatex acts like tex, but they are the same program.
 
@DavidCarlisle Oh.
@DavidCarlisle But the plan is to remain compatible with regular Lua modules, correct?
I believe this is currently the case. And my minimal experimentation with LuaTeX suggests that it works with regular Lua modules corresponding to the correct version.
 
1:59 PM
@FaheemMitha As I say they don't touch the Lua sources (much) so it is Lua, but of course the pre-loaded modules may affect things
 
@DavidCarlisle Ok.
 
@FaheemMitha in texlua form it is pretty standard Lua, the most notable restriction of the lua accessed via luatex is that it obeys the texlive security settings so can not write to external directories by default and can not execute other commands unless --shell-escape is used to allow it.
 
 
1 hour later…
3:21 PM
@DavidCarlisle I see. Also, the places is searches for things is governed by kpathsea.
 
@FaheemMitha that's user settable from lua
 
@DavidCarlisle What is?
the places is -> the places it. Sorry.
Also, idle curiosity, but the LuaTeX FAQ vaguely says that other languages were much too big. Was there actually some kind of resource or other show stopper issue in using, say Python instead of Lua?
Or Scheme? Some Scheme dialects are quite small, I believe.
 
@FaheemMitha the lua search path to use or not use kpse
@FaheemMitha I doubt it but lua is much much smaller than python and designed for embedding, there are of course pythontex (and perltex) projects but they are ar less integrated than luatex
 
3:38 PM
:50315801
@FaheemMitha Python is massive, and you have all the compilation business: Lua is much more relasitic
 
@DavidCarlisle I've used pythontex. It's basically just a way to call Python from TeX. Not integrated at all, as far as I can tell.
@JosephWright Compilation business? Isn't Lua a C program too?
@DavidCarlisle I wasn't aware of that. I thought it was hardwired. There's an option?
 
@DavidCarlisle ooh blame
@FaheemMitha Yes, like most interpreters. :)
 
How can I improve this graph? At the moment I'm using subcaption and import the graphs and the legend as PDFs.
 
@FaheemMitha section 4.2.2 (Integration in the TDS ecosystem, in case it has a different number in your version)
@PauloCereda the best ones are written in TeX
 
@DavidCarlisle :)
 
3:52 PM
@DavidCarlisle Which document?
 
@FaheemMitha luatex manual
 
@DavidCarlisle Ok. Thank you. I'll take a look.
 
@UlrikeFischer will be proud of me for referencing a manual.
 
@DavidCarlisle as long as you don't blame me for the errors you find there ...
 
@DavidCarlisle Do you work on LuaTeX?
 
3:55 PM
@FaheemMitha no
@UlrikeFischer well if it's font related, it may be that you really are to blame:-)
 
I see that section in the manual, but it's very sketchy.
 
@FaheemMitha that applies to all sections of the manual
 
Fortunately, luapackageloader has done the work, so we don't have to. And I see he's using the API that section describes (at the Lua end) in luapackageloader.lua.
I'm not sure why PATH and CPATH are set in LuaTeX though. Given that it ignores those settings by default.
 
 
1 hour later…
5:19 PM
hello
please what is the problem with this
\begin{figure}[h]
\begin{center}
\includegraphics[width=10cm]{image2}
\end{center}
\caption{تابع الوحدة الدرجي
$\epsilon(t)$
و
$\epsilon(t) e^t$.
}
\begin{center}
\includegraphics[width=10cm]{image3}
\end{center}
\caption{التوابع
$\epsilon(t)\sin(t)$
و
$\epsilon(t)t^2$.
}
\end{figure}
it is not in the good place
I make [h]
but it appear in the top of the page
 
5:38 PM
please I resolve the problem of the place
but
I still have a problem with \label
\begin{figure}[h]
\begin{center}
\includegraphics[width=8cm]{image2}
\label{2}
\end{center}
\caption{تابع الوحدة الدرجي
$\epsilon(t)$
و
$\epsilon(t) e^t$.
}
\begin{center}
\includegraphics[width=8cm]{image3}
\label{3}
\end{center}
\caption{التوابع
$\epsilon(t)\sin(t)$
و
$\epsilon(t)t^2$.
}
\end{figure}
 
@Vrouvrou -- A \label must appear after the caption of the float.
 
The h designation only tells TeX that the float can be placed in line, it doesn't force it to be in a position. See this very extensive answer for an explanation of how things work: tex.stackexchange.com/questions/39017/…
@Vrouvrou And for somewhat more practical advice: tex.stackexchange.com/q/2275/2693
 
oh thank you
that's ok
 
 
3 hours later…
8:59 PM
Fairly trivial scoping question about LuaTeX.
I have the following code.
\documentclass{article}
\usepackage{luacode,booktabs}
\usepackage{luapackageloader}
\newcommand{\foo}{foo}
\begin{document}
\begin{luacode*}
package.cpath="/usr/lib/x86_64-linux-gnu/lua/5.2/?.so;"..package.cpath
tex.sprint([[\newcommand{\barxx}{barxx}]])
tex.sprint([[\barxx]])
\end{luacode*}
%\barxx
\end{document}
But after the end of the luacode block, \barxx is not recognized.
 
@FaheemMitha luacode is a normal LaTeX environment, so it forms a group: you'll want \gdef or (better) put the Lua code in a separate file and require() it
 
@JosephWright Would that fix the scoping issue?
 
@FaheemMitha Yes
 
@JosephWright Ok, Thank you.
Worth putting on the site, or too trivial?
 
@FaheemMitha We've probably already got a question
 
9:03 PM
So \gdef is global, but I suppose there's a reason is not generally used.
@JosephWright I didn't find anything, but I believe you.
I guess I've never done a macro definition in an environment. It normally comes in the preamble.
 
4
Q: token.set_macro: \directlua vs. luacode*

rolfnIf I compile the following code with LuaLaTeX I get the word "RED" as output. The call of token.set_macro inside of luacode* seems to be noneffective. \listfiles \documentclass{minimal} \usepackage{luacode} \newcommand*\foo{RED} \iftrue \begin{luacode*} token.set_macro('foo', 'GREEN') \end{l...

 
I take it, then, if I didn't use the luacode environment, it would not be in a group?
 
@FaheemMitha Environments are groups in LaTeX, that's totally general
@FaheemMitha \directlua isn't a group
 
@JosephWright I realise that. So if I used just \directlua, this scoping issue wouldn't appear?
 
@FaheemMitha Exactly
@FaheemMitha Like I say, for any significant code put it in a separate file and load that using require(...)
 
9:09 PM
@JosephWright Ok. Thank you.
I take it \directlua isn't suitable for a lot of complicated lua code?
 
@FaheemMitha the issue is that it means typing Lua inside the tex document so you have to get past tex first which means using % or \ in Lua commands trickier
 
@DavidCarlisle You mean with \directlua it's inside the TeX document?
If I understand correctly, luacode* will shield me from that stuff.
 
@FaheemMitha well yes of course as you can see, \directlua is a (lua)tex command that you place in a (lua)tex file
 
@DavidCarlisle Yes, I see.
 
@FaheemMitha to an extent but it is simpler (and clearer and faster) to put the Lua in a separate Lua file. (and it introduces a tex group that you might not want)
 
9:13 PM
@DavidCarlisle Ok. Will do. Except that lots of other people aren't. I suppose that filecontents would work?
 
@FaheemMitha Yes, but at the cost of not being expandable, and of course the grouping you've seen
 
@FaheemMitha examples of lua code in this site are often inline as it is convenient, just as examples of tex code are often inline in \makeatletter \makeatother but in both cases it is better in production code to put the lua in a lua file and the tex in a separate package file
 
@DavidCarlisle Ok. Well, people could use filecontents even in an MWE.
Trying it with a separate file now.
 
@FaheemMitha no it just makes it look more complicated and confuses the person asking the question , but for real use look at for example find /usr/local/texlive/2019/texmf-dist/scripts -name \*.lua (159 files in my tl2019)
 
Is LaTeX 3 using LuaTeX then?
 
9:20 PM
@FaheemMitha you can use expl3 with pdftex, luatex and xetex
 
@FaheemMitha Not in the way ConTeXt is: we have not gone 'Lua only'. At present, there are lots of things that Lua does not help with
@DavidCarlisle And (u)pTeX ;)
 
@JosephWright and etex
 
@DavidCarlisle Yes, I'm aware. I meant to ask whether LuaTeX is actually used in writing LaTeX 3.
 
@FaheemMitha I don't understand that question.
 
@DavidCarlisle Um. Is any part of LaTeX 3 written in LuaTeX? I.e. using Lua code?
 
9:21 PM
emacs is used for writing tex code.
 
@DavidCarlisle No
 
@DavidCarlisle Yes, I use Emacs too. But why is that relevant?
 
@DavidCarlisle No \pdfstrcmp
 
@FaheemMitha since it works in xetex and pdftex then clearly not in general except some small bits where lua is used to provide features built in to pdftex and xetex
 
@DavidCarlisle Oh. Right.
 
9:23 PM
@FaheemMitha No, although Frank has some interesting code for galley work that is Lua-only (if we could only get him to release it)
 
@FaheemMitha because editors are used to write code, the code then runs on one of the engines, so I struggle to understand your question of asking if luatex is used to write expl3 code (that runs on xetex for example)
 
So LuaTeX code by definition will not work with pdfTeX?
 
@FaheemMitha yes of course if it has any lua in it or uses any tex commands that are only available in luatex.
 
@DavidCarlisle Ok. I thought maybe it could be preprocessed or something.
 
@FaheemMitha even if you use no lua most luatex documents use opentype fonts that can not be used with pdftex
 
9:26 PM
@DavidCarlisle I see.
 
 
2 hours later…
11:24 PM
@JosephWright Do you remember where \input| is documented?
@JosephWright Never mind, found it.
 
11:40 PM
Question: How on earth would I go about diagnosing this problem? Its from the touchy as heck RSC template, and seems related to images, but of course I can't make a MWE as anything I change will change the layout, and that might not actually fix the problem so much as just rearrange things so that it goes away for a little while. (ie, I already thought I had fixed it, but nope)
ARG
FOund it
They used the outdated \usepackage{times,mathptmx}

I swapped in \usepackage{newtxtext,newtxmath} years ago, thinking they'd be identical or at least close enough, but look nicer.

SOmehow they decided to break things, despite the fact its worked fine for years
 

« first day (3119 days earlier)      last day (1811 days later) »