« first day (2573 days earlier)      last day (2361 days later) » 

yo'
12:27 AM
@JosephWright A quick question: how do I change all (black) text to different a colour in beamer, please?
 
@yo' put \color{pink} in the preamble ?
 
yo'
@DavidCarlisle unfortunately, not :-(
ok, \colorlet{black}{pink} seems to do the trick, it's dirty but it works.
 
@yo' hmph, that's supposed to set the document default colour, that's what it says in the excellent colour package documentation:(
 
yo'
@DavidCarlisle oh but beamer is not quite a document, I'm sure your code works ... outsize frame (but again, who'd wanna be outside a frame)
 
@yo' well as long as we can blame @JosephWright and not me, I can go to be and sleep easy
 
yo'
12:51 AM
@DavidCarlisle right right
 
 
7 hours later…
7:54 AM
@yo' Depends a lot on your color theme and what exactly you want to change. A start would be \setbeamercolor{normal text}{fg=pink,bg=white}.
 
8:06 AM
user image
2
 
@DavidCarlisle Oh, look! Someone uses the same photo as you do! ;)
 
8:18 AM
@DavidCarlisle Next goal 64,200,246 but, unfortunately, there are commas :)
 
9:07 AM
@DavidCarlisle All achieved with internal knowledge on bugs features ;-)
 
@CarLaTeX On the way there are much nicer palindromes using only the digits 8 and 0. 800 008 is first. By that time, for sure, @DavidCarlisle has badgered the stackexchange staff into getting rid of the comma.
 
In unicode-math (lualatex) I've replaced the latin letters in the math font (XITS) with the italic text font. Works well. But, this does not work well $\hat{l}$ and $\hat{\jmath}$. Works fine on the greek letters as expected. Any ideas on how to adjust this?
 
@daleif still xits, not stix two ?
@daleif \hat is just a \mathaccent even with unicode-math isn't it? It shouldn't care much about its content...
 
@DavidCarlisle sorry, loading XITS Math as main math font. And then replacing some stuff to make it match the text font a bit better.
 
@ChristianHupfer No. For example recent points have included points on teaching Grandmothers about typesetting and about Aircraft design.
 
9:17 AM
^^^ shows the problems with jmath and l
 
@daleif yes that's what I thought you meant, but stix2 is probably better than xits these days (although still not perfect...)
@daleif not that surprising that \jmath needs some tweaks but l is just a letter is it worse than say h ?
 
@DavidCarlisle and how is that loaded? But isn't the problem here that the metrics of the letters are not read correctly (probably not the right names)
 
\begin{luacode}
local adjacc = function (char,adj)
char["top_accent"] = adj*char["width"]
end
local patch_stixmath = function (fontdata)
if fontdata.psname == "STIXTwoMath"
then
adjacc(fontdata.characters[119907],.55)
adjacc(fontdata.characters[119908],.55)
end
end

luatexbase.add_to_callback
(
"luaotfload.patch_font",
patch_stixmath,
"change_stixmath"
)
\end{luacode}
@daleif I used the above to patch some bad accent placements in stix two. It gives you an idea what kind of adjustment is possible, at least.
(My code was indented when I pasted it …)
 
@HaraldHanche-Olsen Does TL provide STIX2 Math? I cannot quite find any intomation. Currently updating.
@DavidCarlisle might be all latin letters
 
@daleif It didn't, last time I looked. I downloaded them and installed as system fonts on my system.
 
9:26 AM
@daleif how did you add the italic? If you drop in the italic glyphs while leaving the accent positioning the same the ^ will be positioned as if for the original upright characters, but I'd have to look up the details so not now...
 
@DavidCarlisle Just used \setmathfont[range=it/{latin,Latin},Ligatures={NoCommon, NoDiscretionary, NoHistoric, NoRequired, NoContextual,}]{KarminaItalic} not sure if it is correct. The manuals are very confusing when you don't know the lingo.
 
@barbarabeeton can't stix group put stix2 on ctan so it can be in texlive by default ^^^^
 
@HaraldHanche-Olsen :)
 
9:53 AM
@HaraldHanche-Olsen where do we fond the information on which chars that coresponds to? And in this case the issue might be different and we have an accent from STIX acting on a letter from another font.
 
@daleif In the case of w: \showthe\mathcode`w followed by …
; dc
16 o 14799972 p
E1D464
10 o 16 i
1D464 p
119908
@daleif There is also lua code to dump the font tables. Not sure where my copy is at the moment …
@daleif Forgot to mention that 14799972 was the mathcode I received. If you don't know dc, all I am doing is converting to hex, then stripping the first digit, and converting back. I should be doing a modulo operation instead, I suppose. Like so:
; dc
14799972 16 5 ^ % p
119908
 
10:09 AM
@HaraldHanche-Olsen well for now I just need an example where I can see that it actually does something. For example since this is a mixture of fonts, I don't know if it needs to be added to stix (note I'm still just using the stix in TL and is probably not using the right name so the patch is ever applied?
For \showthe\mathcode`w I just get
> 98566263.
l.33 \showthe\mathcode`w
 
@daleif Since this change concerns the character that receives the accent, better modify the font that supplies that character.
 
in the log
@HaraldHanche-Olsen makes sense
I'll try the italic text font instead, though still not sure of the name psname refers to
 
The code you gave reduces to 119 mod 16^5. That would be the ordinary w position, I suppose.
 
@HaraldHanche-Olsen I think my main issue here is that I have no idea if this is being applied or not.
 
@daleif To see if your lua function is being called, insert a call like texio.write_nl("howdy!") in the body of the function.
 
10:24 AM
@HaraldHanche-Olsen ok, so something is being done.
Isn't the question here what exactly we need to change. The hat is that coming from the font for the letters, or from STIX. I'm not sure how these are combined.
 
@daleif I would experiment with a single font first, then see if you can get whatever works to also work when you combine fonts like you are doing.
 
@HaraldHanche-Olsen it was a bit too fast before, the patch is being applied, but my test for the italic text font, never matches. I'll see if I can find the correct psname
 
@daleif What kind of font? otfinfo might help.
 
@HaraldHanche-Olsen thanks, it was with a hyphen
 
Found my otf dumping code, BTW. As it currently looks it must be run with jobname equa to the font file name, without the .otf exension. But you can change that by editing the penultimate line. Code coming up: …
\input  luaotfload.sty
\directlua {
  local jobname
  local dump_font = function (tfmdata)
    io.savedata(jobname..".lua", table.serialize(tfmdata))
  end
  local getjobname = function (j)
    jobname = j
    return nil
  end
  luatexbase.add_to_callback(
    "process_jobname", getjobname, "my_private_callbacks.getjobname")
  luatexbase.add_to_callback(
    "luaotfload.patch_font", dump_font, "my_private_callbacks.dump_font")}
\font  \dumpme  = file:\jobname.otf
\bye
The code also wants to be run in the directory of the font file itself. You can probably just put the full path to the font instead.
 
10:40 AM
My bad the output is a lua file. I'll have a look
hmm, that just broke something in lualatex, and now the file does not compile. argh, no wonder I normally stick to pdflatex. This is not my kind of fun
Hmm, so you are not allowed to have a .tex file with the same name as a otf font fine. That apparently breaks something
 
11:11 AM
@HaraldHanche-Olsen Now I'm just playing with STIXMATH-Regular to see if I can get any affect at all. So far nothing. Apparently I cannot find the connection between say $\hat{a}$ to what ever number is needed in ` adjacc(fontdata.characters[119908],.55) `
 
@daleif Hmm. I'm too tied up in the next two hours to be able to help. Later, perhaps, unless you figure it out or someone else jumps in. Needless to say, @UlrikeFischer knows this stuff way better than I do.
 
@HaraldHanche-Olsen no worries. Am just playing around with it. I'm probably more likely to make a manual tex macro based solution instead.
 
 
2 hours later…
1:20 PM
@daleif Okay. All this OTF font stuff and associated lua tables is quite overwhelming at first; much of what I have done in that regard is just cargo cult programming. But it works, sometimes!
 
@HaraldHanche-Olsen I haven't gotten any of the lua route to work, could not find a single example where the adjustment actually did something. So I ended up matching \str_case_x:nnF with \skew. Works ok. When time permits I'll make a question with a TL usable MWE.
 
1:55 PM
@HaraldHanche-Olsen @daleif I tried a bit. From the documentation I would assume that one need to set the top_accent value for the l. I tried with arial, but I couldn't find a way to *add * this (missing) field through a patch so that it is taken into account.
 
@UlrikeFischer the question is also how much the font mixing interfers with this. BTW: looking at Haralds example from earlier. What is the correct number for l? I was never able to get that luacode to make any visual changes even when just using the STIX math font.
 
@daleif I depends. If you use a normal text font with the range option than the l has the unicode position 108. If you use a math font it is 119897. Normally the index number in the font is identical to the unicode position, but alternative glyphs can have another number. Then one has to check in a fontdump. (I didn't check Haralds code, so don't know if the patch works. To debug such patches: print("XXXXXXX") in sensible places can tell if a patch is called.).
 
@UlrikeFischer @JosephWright we need a new entry in Nicola's perl meta question:
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\\version{ <-- HERE ([^}]*[^}0-9]*)([0-9]+)}/ at /usr/local/texlive/2017/bin/x86_64-cygwin/ctan-o-mat line 414.
 
@UlrikeFischer we have already established that we can access the font (using some print statements). The problem is of course that the top_accent comes from the math font, but the char it is being applied to is a text font, so that probably messes up a lot of things. I more or less ended up implementing the same thing in tex macros ans \skew
 
@DavidCarlisle I get Can't connect to localhost:8080 (Connection refused)
 
2:10 PM
@egreg then it won't run at all and you will get the error about { but the localhost URL is the "helpful" default ctan address so you need to configure a local mirror
 
@DavidCarlisle I'm installing a new one. ;-)
 
@egreg grr edited previous comment meant to be a new one:-)
 
@DavidCarlisle Seems very useful, then
 
@egreg my $CTAN_URL = 'http://localhost:8080/submit/';
 
@DavidCarlisle Yes, I see it. Should a new version be submitted?
 
2:19 PM
@egreg I thought it was just a default but I don't see any way of setting that via a commandline option so it seems like a bug, wait for @JosephWright to rewrite in lua as part of l3build...
@egreg I'd already mailed Gerd about the unquoted brace, I suppose I could mail again but the ctan url
@egreg ctan-o-mat --init works if I edit that line to say my $CTAN_URL = 'https://www.ctan.org/submit/';
 
@DavidCarlisle Yup: that's in a sense part of the plan!
 
Gerd writes : thanks for your feedback. Unfortunately an old development version has made it to CTAN. It contains code and settings which are history and gone. I will submit an update soon. In the mean time you might want to take the version from the GitHub repository.
 
2:40 PM
@UlrikeFischer @HaraldHanche-Olsen @DavidCarlisle I made a real question with a real MWE showing the problem. Of course, our use case is probably not "normal", but what is.
0
Q: Fontspec/unicode-math mixing fonts: math accents

daleifIn a project we're using a commercial text font. The project is not a math related project but has some math in it here and there. The text font of course does not have a direct math font. But the XITS Math font (which is a part of standard LaTeX, at least TeX Live) seems a good enough match. I ...

 
2:58 PM
@daleif @HaraldHanche-Olsen Well I got as far as the following. Which looks as if a question on the luatex list is needed. I don't know why the displacement doesn't work, and why it doesn't work at all for a text font.
 
@daleif Playing with it a bit, I see what @UlrikeFischer also found: These characters have no top_accent, an setting it has no effect. I also found, by the way, that the lua code to patch the font must be run before \setmathfont, or it has no effect. (If you load it after, it still gets run a number of times, but then it has no effect.)
 
\documentclass{article}

\usepackage{luacode}

\begin{luacode}

local patch_arial = function (fontdata)
 if fontdata.psname == "ArialMT"
 then
   fontdata.characters[108]["top_accent"]=300380
  -- fontdata.characters[108]["width"]=3300380 -- to test patch
 end
end

local patch_stix = function (fontdata)
 if fontdata.psname == "STIXTwoMath"
 then
  fontdata.characters[108]["top_accent"]=300380.16
 end
end


luatexbase.add_to_callback
 (
  "luaotfload.patch_font",
  patch_arial,
  "change_arial"
 )
^^^^result with stix + cambria.
 
3:56 PM
@DavidCarlisle It doesn't seem so useful anyway
 
I am so disappointed with FF Quantum on Fedora. There are font rendering problems with some websites. Now I don't know if it's Mozilla or Fedora to blame...
 
@egreg it does less than I expected:-)
 
4:28 PM
@DavidCarlisle me too. But imho it is the answer to a request some days ago. Someone wanted a scripted way to avoid the form on the website.
 
4:38 PM
@DavidCarlisle Still trying to explain to some people how GitHub issues work ...
@DavidCarlisle You'd think it was a system no-one else was using!
 
5:03 PM
@JosephWright yes I knew I was oversimplifying:-) (making the template longer seemed to be going in the wrong direction though, I accept things can be edited later but I'd probably have it down to a couple of lines if it were me:-)
@JosephWright everyone else uses svn
 
@DavidCarlisle The entire 'it's a fill-in-the-blanks template, not a webpage' concept seems to pass some people by
@DavidCarlisle Probably Bugzilla/Jira/... (not Gnats!), but I take your point
 
@DavidCarlisle ooh
 
@PauloCereda someone gets an honourable mention in the tex.sx answer referenced there, it seems.
 
@DavidCarlisle a well deserved mention. :)
 
5:39 PM
@DavidCarlisle -- i can suggest it, but have very little influence there these days.
 
5:58 PM
@DavidCarlisle And the tick goes to…
 
6:31 PM
@egreg me?
 
@DavidCarlisle No, blame Bruno. :-)
 
7:24 PM
@egreg oh that one. We should have asked Bruno how you ask a question.
 
 
1 hour later…
8:26 PM
\begin{minted}{python}
for(i in range(10))
\end{minted}
I don't understand this error, or how to trouble shoot it :/
 
@baxx delete your minted cache directory and try again if it's the same what does the pygments latex output in that directory look like
 
i'll try deleting _minted-main in the dir now, cheer
ok that seems to have worked @DavidCarlisle ! thanks >.<
 
 
2 hours later…
10:33 PM
@egreg but not this :(
 
@DavidCarlisle I know we've talked about this before, but is there a reason \textsuperscript and \textsubscript aren't something akin to
\documentclass{article}


\begin{document}
a%
\setbox0=\hbox{\scriptsize b}%
\raise0.86\fontdimen5\font\box0

a%
\setbox0=\hbox{\scriptsize b}%
\lower0.44\fontdimen5\font\box0


\end{document}
 
@JosephWright more exclamation marks....
%    This command provides superscript characters in the current text
%    font. It's implementation might change!!!
@JosephWright I think the change we had in mind was basically what you suggest, but can't recall why we didn't do that at the time.
@JosephWright well arguably it avoids your magic numbers of .86 and .44 but even if you wanted to get the superscript height from the math setup could get the relevant font param without actually using math mode much.
 

« first day (2573 days earlier)      last day (2361 days later) »