« first day (4099 days earlier)      last day (817 days later) » 

2:31 AM
Hi, so I'm trying to edit a .sty file someone provided me with to add some functionality to a package, but its put together in a way that I don't recognize or understand. I'm not sure if it warrants an actual question on the stackexchange, though, or if, perhaps, I just need to figure out how to manipulate this particular kind of mark up.
 
 
5 hours later…
7:36 AM
@UlrikeFischer I've found a better fix in l3color: I'm not sure whether to adjust the beamer code (it's probably the right thing to do but is risky)
\prg_set_conditional:Npnn \__color_if_defined:n #1 { T, F, TF }
  {
    \prop_if_exist:cTF { l__color_named_ #1 _prop }
      {
        \prop_if_empty:cTF { l__color_named_ #1 _prop }
          \prg_return_false:
          \prg_return_true:
      }
      \prg_return_false:
  }
 
8:08 AM
@UlrikeFischer Could you check this sorts the issue: if it does, I'll do a release later
 
8:52 AM
@JosephWright the expl3 and the article example give then the expected color not defined error. But with beamer it is still not right if one try to use the structure.fg with l3color:
\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{uncompress}
\ExplSyntaxOn
\prg_set_conditional:Npnn \__color_if_defined:n #1 { T, F, TF }
  {
    \prop_if_exist:cTF { l__color_named_ #1 _prop }
      {
        \prop_if_empty:cTF { l__color_named_ #1 _prop }
          \prg_return_false:
          \prg_return_true:
      }
      \prg_return_false:
  }

\ExplSyntaxOff

\documentclass{beamer}

\setbeamercolor*{testcolor}{use=structure,bg=structure.fg}

\begin{document}

%\usebeamercolor{testcolor}
@JosephWright the first patch works better here, it gives the correct error (but naturally at the end we want that color works ...)
 
@UlrikeFischer It's not an uncontrolled error :)
 
@JosephWright regarding adjusting the beamer code: if we are serious with moving to l3color then beamer is quite the test case. This low-level \@namelet{\string\color@ parent.fg}{\string\color@ fg} should be replaced by proper color settings. I could add a beamerbasecolor-tmp-ltx.sty in the pdfmanagement and test new settings with it.
 
@UlrikeFischer I'll mail you about beamer :)
 
@JosephWright oh, I shouldn't have commented the \usebeamercolor{testcolor} line, uncomment it and you will get the ! Missing \endcsname inserted. again.
 
@UlrikeFischer Hmm OK, I was not sure: I'll need to read over all the code to see which parts look directly at the prop for a colour value (I hoped they all used the if_exist test, but clearly not)
 
9:08 AM
@JosephWright this looks like a candidate: \__color_parse_aux:nN #1#2->\tl_if_exist:cTF {l__color_named_#1_prop}
 
9:25 AM
@UlrikeFischer Yes, looks like it: that code was wrong anyway
@samcarter Looks like I'll need to make a risky change to beamer
 
@JosephWright I just tried and made a copy of beamerbasecolor. It seems to work, but I assume that in complicated grouping it could break if there are no longer global colors. Do you have testfiles here that one can use?
 
@JosephWright :thumbsup: beamer colours are a mess :)
Fun with science: astroanimation.org
@AlanMunn Can we sent you a box full of u's which you distribute amongst your neighbours?
@JosephWright When you are done breaking fixing beamer, would it be possible to get a new release?
 
10:23 AM
@JosephWright Speaking about beamer: As a consequence of the fix github.com/josephwright/beamer/issues/362 line endings are no longer automatically protected (see github.com/josephwright/beamer/issues/475). Was this change intended?
 
@samcarter very astute comment someone made on that issue. Almost worthy of @egreg
 
@DavidCarlisle :)
 
10:42 AM
@samcarter I never knew that \includegraphics ate spaces in beamer at some time, but it would have bewildered me quite a bit. Imho leaving the spaces is much more in line with normal documents.
 
@UlrikeFischer It did so since the stone age. In fact I was wondering for years what all this talk about % was about, sounded like non-sense :)
 
@samcarter could you test something for me a bit? I made a changed beamerbasecolor.sty, it is here github.com/latex3/pdfresources/blob/testbeamercolor/firstaid/…. Put it somewhere it can found. And then you can activate it with the following code. The main question is if some colors (foreground/background) are lost or wrong after this.
\makeatletter
\declare@file@substitution{beamerbasecolor.sty}{beamerbasecolor-ltx.sty}
\makeatother
\documentclass{beamer}
 
@UlrikeFischer will do. I'll let you know if I find anything
@UlrikeFischer If I mix in tcolorbox, I get an error
\makeatletter
\declare@file@substitution{beamerbasecolor.sty}{beamerbasecolor-ltx.sty}
\makeatother
% tex.stackexchange.com/a/433507
\documentclass[aspectratio=169]{beamer}
\usepackage[skins]{tcolorbox}
\usecolortheme{rose}

\newtcolorbox{consoleBox}[2][]{%
    colbacktitle=structure.fg!20!white,
    coltitle=structure.fg,
    colback=block title.bg!40!white,
    title=#2,
    boxrule=0pt,
    sharp corners,
    #1
}

\begin{document}
\begin{frame}
\frametitle{Problem}

  \begin{block}{Console}
 
10:59 AM
@samcarter ;-) I knew you have more examples than me ;-). I will check.
 
@UlrikeFischer I might have a few files at github.com/samcarter/beamer_testfiles/tree/main/testfiles :) The difficult part is which files to test? It got a bit too large to just run all.
@UlrikeFischer This one also fails:
\makeatletter
\declare@file@substitution{beamerbasecolor.sty}{beamerbasecolor-ltx.sty}
\makeatother
% tex.stackexchange.com/a/351051
\documentclass[]{beamer}
%% Set up as beamerposter
%\usepackage{grffile}
%\usepackage{hyperref}
\usepackage{calc}
%\usepackage{tcolorbox}
%\usepackage{lmodern}% ctan.org/pkg/lm


%\ProvidesPackageRCS $Header: /Users/joseph/Documents/LaTeX/beamer/base/themes/theme/beamerthemeSingapore.sty,v d02a7cf4d8ae 2010/06/17 09:11:41 rivanvx $
\DeclareOptionBeamer{compress}{\beamer@compresstrue}
 
11:25 AM
@UlrikeFischer Another fail:
\makeatletter
\declare@file@substitution{beamerbasecolor.sty}{beamerbasecolor-ltx.sty}
\makeatother
% tex.stackexchange.com/a/281694
\documentclass{beamer}

\setbeamercolor{invert block body alerted}{fg=block body alerted.bg, bg=block body alerted.fg}

\begin{document}

    \begin{frame}

\begin{beamercolorbox}[center,wd=\paperwidth]{block body alerted}
    blub
\end{beamercolorbox}

\begin{beamercolorbox}[center,wd=\paperwidth]{invert block body alerted}
    blub
\end{beamercolorbox}

    \end{frame}
 
@samcarter I added @JosephWright smuggle code and your first example passes now, but the second and third still miss a color. I will try to look in the afternoon.
 
@UlrikeFischer I think am through all the tests which obviously mess with colours (e.g. grepping for .bg and .fg). I'm sure the users will find much more :)
@UlrikeFischer great!
 
 
2 hours later…
cis
1:00 PM
Hey, I got an arara-error:

`C:\texlive\2021\bin\win32\runscript.tlu:935: C:\texlive\2021\bin\win32\runscript.tlu:902: program not found (not part of TeX Live): java.exe`

Does this mean, I have to install Java (at Windows 10)?
 
> The application is written using the Kotlin language, so arara runs on top of a Java virtual machine, available on all the major operating systems – in some cases, you might need to install the proper virtual machine.
 
@samcarter I do not know if it's relevant here, ignore me if not, but there was a thing that puzzled me in beamer with color. If you define a color scheme or change color in the preamble, then before you can use the color "raw" you have to use it --- I'll copy an excerpt of my cheatsheet:
% for using colors of the theme:
%
    % null text with desired color
    {\usebeamercolor[bg]{block body}}% retrieve the color (maybe you never used a block)

    % now you can do
    \begin{tabular}{...
    \rowcolor{block body.bg}
    ...
 
cis
@samcarter Mmmh, is there maybe a arara-config-file, where I can set the path to my java.exe?
 
@Rmano yes, that's one of more annoying properties of beamer colours. I can't count how many times I already fell into this rabbit hole :)
@cis the important question: do you have java installed?
 
@cis No, Java has to be in the PATH. You can write your own wrapper batch script that sets the PATH just for an arara call.
 
cis
1:14 PM
@samcarter Yes, but it seems, I have to call it with the complete path.... So I will look to add the path-variable.
 
1:24 PM
@JosephWright You get a out of jail card to break LaTeX ^^
 
cis
@samcarter @TeXnician I know you will kill me for that, but I am a trickster: I set C:\Program Files (x86)\JDownloader2.0\jre\bin as a system-path, because there is a java.exe - now arara seems to work...
 
@PauloCereda Following the links of the public lectures lead me to youtube.com/user/kgnang/videos -- I love how this looks like the beamer theme matrix :)
 
@samcarter ooh
 
cis
@PauloCereda I run arara with dirty-tricks... stealing JAVA from somewhere....
 
@cis your warranty is long void
:)
 
1:34 PM
@cis You are using windows, you can't make it any worse with hacks :)
 
cis
@PauloCereda Very good, that means I can do what I want....
@samcarter True
@samcarter @TeXnician @PauloCereda I think, this is a small version of JAVA which the programm JDownloader includes in its path.
But if arara works with that for the first... why not....

I do not like to install so much programms....

Another example: I steal ghostscript from TeXLive itself...
I am only sad becaus of ImageMagick... I could have stolen it from TeXLive and had to install it....
 
@cis If you would install them yourself, it would be easier for you to make sure that they are kept up-to-date.
 
@UlrikeFischer I've been in talks all morning: I hope to have a look over lunch
 
@cis java in particular has a long history of vulnerabilities. Stability is usually more important for me than having the bleeding edge newest versions, but for java I would try keep reasonable up-to-date
 
cis
@samcarter The only thing that bothers me is that Java then runs permanently from every system start; and feels like it consumes a lot of resources.
...
...........
My next criminal act:

I'll try to conjure up the files needed for the TeXworks spell check somewhere else.

But I have to understand all that again.

Because typically these files are already stored somewhere in another program (e.g. LibreOffice) and it would be a waste of disk space to have them twice.
 
1:54 PM
@samcarter that is probably the problem why the example fails.
 
@UlrikeFischer it worked fine before :)
 
@UlrikeFischer, @samcarter Can I just catch up: exactly what is working and what is failing?
 
@samcarter yes, but now xcolor detects that the color is not defined as I use \colorlet to copy it and not a low-level \@namelet ...
@JosephWright I made a copy of beamerbasecolor in the pdfresources, removed the low-level code and we are testing it. @samcarter found a few example where it errors as colors are not defined properly anymore.
 
@cis Switch to texstudio :) this simply let's you specify the path to the dictionaries from libreoffice
 
cis
Ah interesting. But, you are forgetting my philosophy:
if possible, do not install a new program....

And TeXworks comes with TeXLive by default.
 
2:07 PM
@cis yes, but texstudio comes with build in ducks - this trumps every other argument tex.stackexchange.com/questions/332307/…
 
2:28 PM
@UlrikeFischer On mathcolor, when I get a moment I'm hoping to add something to expl3 directly .... perhaps next week
@UlrikeFischer Ah, so you've done more than just add my 'no globals' code?
 
@JosephWright I tried to remove the low-level let commands so that it is no longer dependant on a concrete color implementation.
 
@UlrikeFischer Ah, that might be it
@UlrikeFischer I doubt we'll need to first-aid this, as once we know what to do I can sort a beamer release (and keep @samcarter happy)
 
@JosephWright /happy quacking noises :)
 
@JosephWright yes, but I needed a place for the code and in this way I can test it both with the pdfmanagement and without.
 
@UlrikeFischer :)
@UlrikeFischer I'll probably try by taking @samcarter's examples and updating beamer locally, but it will not be until a bit later today
 
2:46 PM
@UlrikeFischer btw, this file-replacement thingy made testing really convenient. No need to move or edit files, one can just add it to the latex call. Very nice feature!
 
@samcarter It's a clever idea, isn't iut
 
@JosephWright Indeed!
 
@samcarter yes it really helps in testing variants. But typos can give puzzling error messages. Try \declare@file@substitution{beamerbasecolor.sty}{beamerbasecolor-xxxxx.sty}
 
3:06 PM
  \begingroup%
    \global\@namelet{\string\color@ #2.fg}{\string\color@ temp@fg}%
    \global\@namelet{\string\color@ #2.bg}{\string\color@ temp@bg}%
  \endgroup%
@samcarter, @UlrikeFischer ^^^ Any idea what Till was up to here
@samcarter, @UlrikeFischer If I take out all of the other \@namelet usage, things seem to be fine (with no other changes): correct?
 
@JosephWright I think yes. Imho the main problem is to get the fg/bg colors defined on the fly even if you are in some group.
 
@UlrikeFischer I'm working on it: this is a long-standing issue
@UlrikeFischer I'll check in this first change, then: I'm confident it's right
 
@JosephWright I'm wondering why the fg/bg are not defined directly. Perhaps to save memory? Or can they change later?
@JosephWright If I use your smuggle command it works:
 \begingroup%
    %\global\@namelet{\string\color@ #2.fg}{\string\color@ temp@fg}%
    %\global\@namelet{\string\color@ #2.bg}{\string\color@ temp@bg}%
    \beamer@smuggle@color{#2.fg}{temp@fg}
    \beamer@smuggle@color{#2.bg}{temp@bg}
  \endgroup%
@JosephWright but better without the spurious spaces ;-)
 
3:36 PM
@UlrikeFischer Thought it might, haven't added the smuggling code just yet
 
@JosephWright I uploaded a new version in the pdfresources, testbeamercolor branch.
 
@UlrikeFischer I'd seen: all working?
 
@JosephWright The examples from @samcarter passed. But I don't know if they cover everything.
 
@UlrikeFischer That will do me: I'll be stripping out globalcolor this evening :)
 
yo'
You gotta love when a class file generates an error on itself :)
 
3:53 PM
@JosephWright Le me add my little M(N)WE: it would be nice if beamer would work without the hack...:
\documentclass{beamer}
\usepackage[T1]{fontenc}
\usetheme{Madrid}
\begin{document}
\begin{frame}
    \frametitle{Test}
    {\usebeamercolor[fg]{block body}}% if you remove this it doesn't work
    \textcolor{block body.fg}{This is it!}
\end{frame}
\end{document}
 
@Rmano That's a different issue, but I see why it comes up
@samcarter, @UlrikeFischer github.com/josephwright/beamer/commits/main Please check :)
 
cis
4:27 PM
I did this by hand using TikZ.

Is there a package that can do this more easily?

Getting a bit difficult to come up with a command that shows the moves (before / move arrow / after); for 3 separate images.
 
@JosephWright do I still need ulrikes replacement file for the new code?
@JosephWright With the new code, I get a tikz error for github.com/samcarter/beamer_testfiles/blob/main/testfiles/…
@JosephWright The block body colour for the lower box is invisible: github.com/samcarter/beamer_testfiles/blob/main/testfiles/…
 
@samcarter where is the Aalborg theme?
 
@JosephWright Empty background of the blocks: github.com/samcarter/beamer_testfiles/blob/main/testfiles/…
@UlrikeFischer I'll sent you an mail - I don't remember were I found it
 
@JosephWright you should smuggle the color here too:
\def\beamer@thc@usecolor#1{%
  \begingroup%
    \beamer@thc@prepcolor%
    \beamer@thc@docolor{#1}%
    \ifx\beamer@thc@fg\@empty\def\beamer@thc@fg{fg}\fi%
    \ifx\beamer@thc@bg\@empty\def\beamer@thc@bg{bg}\fi%
    \global\let\beamer@thc@gfg\beamer@thc@fg%
    \global\let\beamer@thc@gbg\beamer@thc@bg%
    \beamer@smuggle@color{#1.fg}{\beamer@thc@gfg}%
    \beamer@smuggle@color{#1.bg}{\beamer@thc@gbg}%
  \endgroup%
}
 
cis
4:44 PM
@UlrikeFischer Is it easy to put the dead skull into chessboard.sty? \char"2620
 
@cis there is an interface to add new pieces, see the documentation.
 
cis
@UlrikeFischer I see.
 
@samcarter hm, that could be a hard one. @JosephWright
 
5:30 PM
@JosephWright I think the smuggling code disturbs parsing in some places. The math is the one case but tikz gets confused too:
\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node{\usebeamercolor{subsection in sidebar}blub};
\end{tikzpicture}
\end{document}
 
cis
I think it is better to use chessboard.sty But I think I will have to solve many questions.

Should that have any font-effect:
% arara: lualatex
\documentclass[margin=5mm, varwidth]{standalone}
\usepackage{fontspec}
%\setmainfont{DejaVu Sans}

\usepackage{chessboard}
\usepackage{skak}
\setchessboard{
boardfontfamily={DejaVu Sans}% want another font for the pieces
}
\begin{document}
\newgame
\chessboard[]
\end{document}
 
@cis no "DejaVu Sans" is not a font family name.
 
cis
Oh, but at other places

\usepackage{fontspec}
\setmainfont{DejaVu Sans}

has worked....
@UlrikeFischer And what can I do now?
 
@cis read the documentation of chessfss.
 
@UlrikeFischer Hmm, OK, so it looks like I need to think of an alternative plan
 
cis
5:40 PM
@UlrikeFischer Aha, it seems to me that I married three packages here. I just wanted to book chessboard.
 
@JosephWright I still wonder if colors should simply be always global.
 
@UlrikeFischer Might work for colours with a 'physical' name, or even a 'globally semantic' one ('MyEmployerRed'), but I don't see how that works for structurally-semantic ones ('foreground' for example)
@UlrikeFischer My impression was that \globalcolors is there to support the way xcolor wants to do series-in-tables (generating in the table body), whereas I simply wouldn't do that - colours should be defined in the preamble and then uses in a step fashion
 
cis
Ehh, ok... a font is named 'DejaVu Sans'.

What is the general methode to determine the 'font family name' that is another, I heared?
 
@UlrikeFischer I guess we need more thought: that I know of, the only use case for global colour is in beamer
@UlrikeFischer I see ConTeXt does have something for global colours ...
 
@JosephWright but this what I mean with "always global". And even in the case of "foreground": if you reset it somewhere, in the way colors work you have to switch it back after the group anyway.
 
5:48 PM
@UlrikeFischer You mean 'always top-level'? Not the same thing :)
@UlrikeFischer I suppose I'm imagining people wanting to adjust semantic colours in a scope: \color{Semantic} Stuff\begingroup \definecolor{Semantic}{Semantic!50} More text\endgroup even more text
@UlrikeFischer You switch the low-level driver colour back, but not the macro-level name, I think
@UlrikeFischer I am working out what we might do :)
 
@JosephWright I'm not sure if that happens often. But in view of the test we made now I think either always global colors or we need both as xcolor does it. I think there are too many beamer examples around where color creation is hidden in some groups but wants to escape.
 
6:03 PM
@UlrikeFischer I guess I'm wary as for new code we should be aiming for the best approaches, and I'm not really sure that beamer has things right here. Internally it's 'interesting': very different to the experience as a user
 
@JosephWright but can you correct beamer without breaking everything? It would certainly be better if one wouldn't have to do this color smuggling.
 
@UlrikeFischer I guess I'm thinking slightly differently :) 'Could a replacement for beamer which was better-structured internally work without global colours?'
 
I am apparently a robot who cannot identify pictures of stairs. Oh dear.
 
6:20 PM
@JosephWright I'm not thinking differently ;-). That is my question. I tried to remove all the smuggling and grouping, but the problem is that you end in various places with missing "somecolor.fg" colors quite similar to Rmano's problem.
 
cis
6:44 PM
@UlrikeFischer et all
I asked a question at chessboard.sty, but I am not allowed to link that here...
 
@cis not allowed to link?
 
cis
Yes ok if you allow that.... I got into a lot of trouble for linking questions posted in the main-page here.


---_>
0
Q: chessboard: creating and positioning a red king (new piece)

cis I need a red king here in the middle, that means a black king figure (piece), but in red color. He should have his own character, like 'R' (if possible). This is normally \char"2654 The handbook shows me a "hardcore method", which does not work for me. What do I have to do? BTW: Saw no whay t...

 
@cis oh I think if there's a discussion here and you want to move it to the main site, that is fine. What isn't so good if people post a question then come here and link to it with "please answer my question" as that's unnecessary as anyone here sees the main site when they want to see it
 
7:43 PM
@samcarter STATUS BYDESIGN
 
8:11 PM
@JosephWright too bad, the old behaviour was so convenient :)
 
@samcarter Yes, I see that, but one of Till's more questionable differences from standard LaTeX
 
@JosephWright Till the \end.
 
@StefanKottwitz Barcelona?
 
@JosephWright Rammstein.
 
8:16 PM
Now post the Rammstein video.
 
@StefanKottwitz That one I don't know
 
@JosephWright Nobody knows it here ;-) so post it :-D
 
@JosephWright ... maybe the real problem is that beamer claims to be a latex class -- it should just claim that's it's own thing and could do what it wants :)
 
@samcarter To some extent, yes
@samcarter I guess if I was starting from scratch, I would stick to the usual conventions: I don't think it would be bad, just a bit different from the current code
 
@JosephWright Starting from scratch would certainly have the advantage that one could avoid some annoying baggage like \frame{...}
 
8:21 PM
@samcarter Yes, indeed
 
@UlrikeFischer "I think there are too many beamer examples around..." I only ran 32 test of 1777 and you are already complaining about too many :)
 
@samcarter It's a concepts thing: I'm working out whether @UlrikeFischer is right on the principle
 
@DavidCarlisle What is the easiest way for Asymptote support on texlive.net? latexmk, %! TeX asy, or the asymptoteB package? sourceforge.net/p/asymptote/discussion/409349/thread/e417b003
 
@JosephWright Even if @UlrikeFischer is not be right, doing what she says has the advantage that one could blame her for all future problems
 
8:37 PM
@StefanKottwitz so far I have avoided allowing shell-escape,but could potentially integrate an automatic asy run similar to the way the script calls makeindex or bibtex if needed
@samcarter you can do that anyway
 
@DavidCarlisle An asy run if detected would be great!
 
@StefanKottwitz ok I'll add it to the list of jobs to do....
 
@DavidCarlisle FIFO, right?
 
@StefanKottwitz In my experience issue handling is often more stack based in practise.
 
@MarcelKrüger Stacks overflow.
@DavidCarlisle No worries and no hurry, just I and a few would like it.
 
8:41 PM
@StefanKottwitz as Marcel indicates LIFO more likely although at present weighted by payment, the day job keeping me busy:-)
 
@StefanKottwitz That leads to undefined behavior in the maintainer which might be an explanation for certain recent events
 
@MarcelKrüger that npm story was much more fun than log4j :-)
@DavidCarlisle FIFO is future safe (also I got 20 more)
@DavidCarlisle Ooh, the day job. Deal: I attend an hour for you in job zoom/teams meetings, and you attend an hour for mine? Camera on of course.
Confusion is creative.
 
 
2 hours later…
11:02 PM
@samcarter, @UlrikeFischer I'll mail about colours tomorrow: have been working through in detail what beamer is up to
 
@JosephWright and now you have a plan?
 

« first day (4099 days earlier)      last day (817 days later) »