« first day (3559 days earlier)      last day (1373 days later) » 

8:23 AM
@DavidCarlisle Thanks for him!
 
spot the open with overleaf button
 
@DavidCarlisle ;-). What renders the script on the button? Harfbuzz probably?
 
@UlrikeFischer yes in firefox at least, incidentally I think that sort of thing is one reason why they try to force the indic scripts to have metrics that match the latin as far as possible. In pure text you can fiddle with the line spacing, but in translating an existing UI you have less flexibility.
 
quack
 
@PauloCereda Have you seen today's Non Sequitur?
 
8:37 AM
@HaraldHanche-Olsen ooh
 
@PauloCereda न्याहारी
 
@DavidCarlisle oh no
 
@HaraldHanche-Olsen ooh a new milestone
 
@DavidCarlisle yes, but imho one should try to adapt in both directions. E.g. for the malayam in the talk one could also think about how to design a latin font with larger descender which fits visually better to the script.
 
8:47 AM
@UlrikeFischer quack, miss you <3
 
8:58 AM
@UlrikeFischer sure but if you have visually laid out your page with everything aligned then changing the grid to accommodate one translation may be tricky
 
@DavidCarlisle yes, for a gui this is quite right. I was more thinking about printing.
 
9:56 AM
@UlrikeFischer My first answer uising hooks
 
@JosephWright L3 goes fishing
:)
 
cis
In this table, the 3rd column indicates a color.

How can I do that the previous color is kept as long as no new one is defined?
\documentclass[a4paper]{article}
\usepackage{pgfplotstable}
\pgfplotsset{compat=1.17}
\begin{document}
\pgfplotstableread[col sep=comma, header=false]{
a, 1, blue
b, 2, cyan
c, 3,
d, 3,
e, 5, red
f, 6,
g, 7,
h, 8,
i, 9,
j, 10,
k, 11,
}\mydata

\pgfplotstablegetrowsof{\mydata}
\pgfmathtruncatemacro{\RowsNo}{\pgfplotsretval-1}

Actual:
\pgfplotsinvokeforeach{0,...,\RowsNo}{%%
\pgfplotstablegetelem{#1}{[index] 2}\of{\mydata}
\pgfplotsretval,
%\colorlet{barcolor#1}{\pgfplotsretval}
}%%

Target:
blue, cyan, cyan, cyan, red, red, red, red, red, red, red,
 
@cis not sure of best pgf syntax but keep a global variable of the colour you want and in each cell set the colour to that, then your colour switch doesn't actually change the colour directly just globally change the variable.
 
cis
@DavidCarlisle
I don't want to have to write the color everywhere. Only once, for example red, then red should be kept until e.g. yellow stands.
 
@cis yes as I said, set up your table so that it sets the colour at the start of every cell.
 
cis
10:08 AM
@DavidCarlisle @DavidCarlisle Yikes, I don't understand that.
0
Q: pgfplotstable: Read out and define colors from table

cisIn a table, the 3rd column indicates a color. \pgfplotstableread[col sep=comma, header=false]{ a, 1, blue b, 2, cyan c, 3, d, 3, e, 5, red f, 6, g, 7, h, 8, i, 9, j, 10, k, 11, yellow }\mydata How can I do that the previous color is kept as long as no new one is defined? I don't want to have...

 
@egreg Life is nice and easy with the new hooks
 
10:37 AM
@JosephWright I'm sure of!
 
11:32 AM
@egreg, @UlrikeFischer, @DavidCarlisle I'm thinking of a blog post on using xparse: try to give some guidance on good interfaces (as opposed to 'random collection of arg types')
 
11:54 AM
@JosephWright nice ;-). I tried (while updating the latex-dev answer) to add a tcolorbox frame to a figure and that didn't work - we need more hooks ;-)
 
 
1 hour later…
1:14 PM
@JosephWright we could consider learnlatex.org/xparse-and-expl3/en/lesson-01
 
@JosephWright you mean \foo<abc>(def){ghi}_{jkl}^{mno}right_delimited|is not good?
 
@Skillmonlikestopanswers.xyz Yup :)
@Skillmonlikestopanswers.xyz I will of course mention no names
@DavidCarlisle Yes, or en/expl3/lesson-01 or en/expl3-01?
@DavidCarlisle Depends on the scope we want, but all doable yes
 
@JosephWright can we also get hooks in tabular at the start of lines, end of lines, and start of cells as well?
@JosephWright I forgot the most important argument type in that example! \foo{optional_argument_in_braces}.
 
@Skillmonlikestopanswers.xyz One for LaTeX-L
@Skillmonlikestopanswers.xyz :)
 
@JosephWright Don't forget to mention tex.stackexchange.com/q/470819/4427
 
1:23 PM
@Skillmonlikestopanswers.xyz We are actually not loading all of xparse in the upcoming changes
 
@JosephWright I know :) But this might add to the confusion of some users (just so you're warned)
 
@Skillmonlikestopanswers.xyz I have a working title: g falls under 'the ugly' (I'll let you guess the full title!)
 
@JosephWright ooh and the good and the bad
@egreg ^^
 
@PauloCereda +and
 
@Skillmonlikestopanswers.xyz ooh
 
1:28 PM
@PauloCereda Indeed
 
@Skillmonlikestopanswers.xyz you got a secret duck message :)
 
@Skillmonlikestopanswers.xyz not easily actually unless you only allow expandable code in the hook. If code needs to be at the start of a cell but two packages add to the hook the second set of code isn't at the start any more if the first does anything non expandable.
 
@DavidCarlisle that's what the end of row hook is for, unexpandable code does no harm there. And if one needs to do something unexpandable in the start of line hook, one could put it in \noalign (at least most of the time/the unexpandable part of it).
@DavidCarlisle and I know, but currently I maintain a custom tabular environment which got those hooks (not at the start of each cell, though, that's one for >{<stuff>} in most cases anyways).
 
@Skillmonlikestopanswers.xyz yes if it's your hook and your package it's not an issue but the general hooks are supposed to allow multiple packages to hook there and (while we insist on using \halign) it's just hard to do anything sensible until tex has stopped looking for \omit
 
@DavidCarlisle I auto-style the headrows with those hooks, works pretty well so far (there is one minor bug: if the last line of the tabular is a headline, one needs to end it with \\ ).
 
1:38 PM
@Skillmonlikestopanswers.xyz for start of row there are actually two places that make sense, in a custom \noalign so safer but inside a group, or at the start of the first cell in the row, just before the hook for that cell.
 
@DavidCarlisle and I know what the purpose of those hooks is. I'd argue that the hook-mechanism for tables should be different: Create custom tabular environments in which the hook contents are set, such that a nested tabular can have empty hooks (that last one is important)
@DavidCarlisle I created just a single hook which injects after the effects of \\ for the start of line hook.
 
@Skillmonlikestopanswers.xyz yes been there:-) blockarray, colortbl, tabu, ... all essentially have a package maintained hook for doing similar things with row-scope, but how feasible it would be for them to share a common row-scope hook I do not know
 
@DavidCarlisle neither do I, would have to test things.
 
@Skillmonlikestopanswers.xyz so is it expandable content? what do you do about \multicolumn in the first cell?
 
@DavidCarlisle the things I inject expandably test for the current row number and inject rules and rowcolors based on this, so \multicolumn is no problem here. But that's just my small use-case, of course others could have other use-cases, I can only guarantee that my current use-case isn't doing very bad things :)
The interesting thing is that this way my environment works for both ordinary tabular and longtable without changing anything from the users point of view, except for using the long key in an optional argument. The style of the table will look identical.
 
1:44 PM
@Skillmonlikestopanswers.xyz longtable is tabular by the time you get that far in by design most tabular extension packages should "just work" with longtable
 
@DavidCarlisle longtable is awesome
 
@Skillmonlikestopanswers.xyz yes so if that was a general hook and someone used it to inject x at that point the code \hline that you try to add in the same hook will fail. It doesn't encourage you to want to share a common hook:-)
 
@DavidCarlisle For my environment, \begin{CustomTable}[head=2,caption={stuff}]This & is & the & head \\ This & is & the & head \\ This & is & the & body \\ This & is & the & body\end{CustomTable} will look exactly the same without any user change except long in the key=val argument.
@DavidCarlisle if someone adds a hook that gets somehow executed before mine, I can't do anything about it either. Still I'd argue that not having to hook into the code for each package would be beneficial (the same way as you got auto-ordering in the current hook mechanism).
 
Jan 7 '14 at 13:21, by David Carlisle
@egreg like its author, probably
 
@DavidCarlisle ooh
 
2:12 PM
Can someone who knows about math more than me check the math setup I've recommended here tex.stackexchange.com/q/555446/2693. I've adapted it from something I've used which is appropriate for linguistic semantics, but may not be for regular math. Corrections welcome.
 
@AlanMunn possibly Stix Two Math (ie the official release, a decade late, not xits-math Khaled's unofficial version to fill that time gap)
or of course the OP could not load unicode-math and use newtxmath (or even mathptmx) math fonts
 
@DavidCarlisle No, in fact that's the problem. The clones are being rejected out of hand by the submission system. I hadn't realized that there's now an official Stix release.
 
@AlanMunn I presumed if it uses a real times roman for text that box would be ticked, if it allows xits-math font in addition I don't see why it wont allow mathptmx font
 
@DavidCarlisle Actually that's probably true. So the need for unicode math is maybe overkill.
 
@AlanMunn wikipedia says stix 2 was released in 2016 doesn't time fly:-)
 
2:24 PM
@DavidCarlisle I didn't get the memo. :)
 
@AlanMunn quite possibly you could have the original document and just set a full stop in white somewhere on the first page in real times roman and the checker will be happy
 
@DavidCarlisle ooh
 
@DavidCarlisle Yeah, that's probably true, but I guess gaming the system isn't the best answer to give.
 
@AlanMunn :-)
 
@AlanMunn ooh video games
@DavidCarlisle nookipedia.com/wiki/Tex
 
2:31 PM
@PauloCereda how much of a load on the system is it to add a four more lines of javascript test to the runlatex.js used at learnlatex.org
if one of the lines is 5576 characters long
 
@DavidCarlisle oh my
 
@DavidCarlisle Thanks, I've updated the answer to include both the unicode-math and newtexmath setup.
 
if(t.indexof("{marathi}" != -1) {
    addinput(fm,"encoded_snip[]","%%\n%% This is file `marathi.sty',\n%% generated with the docstrip utility.\n%%\n%% The original source files were:\n%%\n%% marathi.dtx  (with options: `package')\n%% \n%% -------------------------------------------------------------------------\n%% आज्ञासंच:      marathi\n%% लेखक:       निरंजन\n%% आवृत्ती:      १.२  (१६ जून, २०२०)\n%% माहिती:  लुआ-लाटेक् व झी-लाटेक् ह्यांच्यासह मराठीचा सुलभ वापर करण्यासाठी.\n%% दुवा:   gitlab.com/niranjanvikastambe/marathi\n%% अडचणी:  gitlab.com/niranjanvikastambe/marathi/-
 
@PauloCereda Smug seems very appropriate for the TeX crowd.
 
@AlanMunn :)
 
cis
2:54 PM
Should the second value have any effect?
{\fontsize{73pt}{91.25pt}\selectfont abc  \\ cde}

{\fontsize{73}{5191.25pt}\selectfont abc  \\ cde}
I don't see any effect.
 
@cis Have you tried actually ending the paragraph?
2
 
@cis You need \par to see the effect.
 
cis
@TeXnician This way?

{\fontsize{73}{5191.25pt}\selectfont abc \par cde}
 
@cis Alternatively {\fontsize{73pt}{91.25pt}\selectfont abc \\ cde\par}
 
@cis No, {\fontsize{73pt}{91.25pt}\selectfont abc \\ cde\par}
 
cis
2:58 PM
Ahh, I think, I have to test:

uvw {\fontsize{73}{5191.25pt}\selectfont abc \par cde \par} pqr
@AlanMunn @TeXnician @AlanMunn ok, thx.
 
@cis par or a blank line (there are loads of answers on site about that) a paragraph is broken into lines based on the settings at the end of the paragraph so if you end the group early you get the changed font but the normal paragraph settings
 
cis
@DavidCarlisle I do not check this. It should be

\fontsize{<y>pt}{1.1 ... 1.3 * <y> pt}\selectfont

I think. But looks strange all.

So I do not know, whether this is correct, what I have done here:
\documentclass[a4paper]{article}
\usepackage{lmodern}
\usepackage{tikz}

\pgfkeys{/cis/.is family,  /cis/.cd,% ==================
/cis/.search also={/tikz,/pgf},
% Fontsize =============================
     bskipratio/.initial=1.25,
     bskipratio/.get=\bskipratio,
     bskipratio/.store in=\bskipratio,
     fontsize/.initial=,
     fontsize/.get=\myfontsize,
     fontsize/.store in=\myfontsize,
     fontsize/.code={%
     \pgfmathsetlengthmacro\bskip{\bskipratio*#1}%
     \fontsize{#1}{\bskip}\selectfont%
 
3:15 PM
what do you want uvw {\fontsize{73pt}{3pt}\selectfont abc \par cde \par} pqr to do??:-)
@cis why don't you put a \par after #2 in the definition before you close the group?
 
cis
@DavidCarlisle I don't know if I always want to have a \par there.
 
3:48 PM
Sometimes, George loves to scare Peppa with Mr. Dinosaur!
- Grrrrrr
- Eek! 'Tis scary!
WAIT A MINUTE
@JosephWright ^^
 
4:19 PM
@cis you should probably not be setting the font size in that case.
 
@PauloCereda Grr, dine-o-saw
 
@JosephWright ooh
 
4:43 PM
@DavidCarlisle what was the magic command to get learnlatex to run xelatex-dev and show the log??
Ah found it.. %!TEX xelatex-dev and %!TEX log
 
5:28 PM
There is a package for ComicSans as maths font in LaTeX !!!11!1!!1!!!!elf
2
 
@Skillmonlikestopanswers.xyz oh no
 
@Skillmonlikestopanswers.xyz oh
 
@PauloCereda the package is contained in MikTeX.
 
@DavidCarlisle we broke catoptions ...
 
5:39 PM
@UlrikeFischer is "good" the right response?
2
@Skillmonlikestopanswers.xyz yes @egreg wrote it, I think.
 
@DavidCarlisle good
 
@DavidCarlisle I think it is.
 
@UlrikeFischer did the question that I answered work before?
 
5:57 PM
@DavidCarlisle what means before here? It breaks for me also without the dev release.
 
@UlrikeFischer I've re-read the pgf code for color in dvips, and I see how to split the stacked/non-stacked situations. I think that's the best longer-term plan: I'll just do it, and probably commit on master
 
@UlrikeFischer you said we broke it, I mean did it work in tl2019 or earlier?
 
@UlrikeFischer Might take a little while, though: I need to think carefully :)
@UlrikeFischer ???
 
@UlrikeFischer you said you had seen some of the initial discussions on the package, have you any thoughts on github.com/learnlatex/learnlatex.github.io/issues/…
 
@DavidCarlisle oh not your answer yesterday. It now simply breaks because it patches \document and so every use will give errors.
 
6:08 PM
@JosephWright another one !
 
@DavidCarlisle how can I find the examples? In the github?
@DavidCarlisle chinese next ...
 
@UlrikeFischer well for a setup that works, try the one copied to davidcarlisle.github.io/ll/mr/help question is should it not have the package and say text in English instead
@UlrikeFischer or in particular here(but you need to add the TeX comment) niranjantambe.github.io/learnlatex.github.io/mr/extra-01#memoir
 
6:33 PM
@DavidCarlisle Looks as if lualatex is broken. I'm just updating texlive to check offline.
 
@UlrikeFischer yes see my comment in the marathi issue he asked me to update texlive so I did but that broke marathi.sty in luatex
 
@DavidCarlisle he forgot to load fontspec in the luatex branch - he probably thought babel would do it as polyglossia (which he use for xelatex) does it.
 
@UlrikeFischer it was working this morning:-)
 
6:55 PM
@DavidCarlisle well there was a package update today ;-)
 
7:06 PM
@DavidCarlisle Wow
 
 
3 hours later…
9:38 PM
@JosephWright usage picking up since tug2020:
Wed Jul 29 21:23:12 UTC 2020
  Number of distinct users:     13
  Number of document requests:  80
  Number of documents returned: 55
  Number of unique user agents: 12
Tue Jul 28 23:42:11 UTC 2020
  Number of distinct users:     17
  Number of document requests:  36
  Number of documents returned: 30
  Number of unique user agents: 13
Mon Jul 27 23:51:19 UTC 2020
  Number of distinct users:     9
  Number of document requests:  93
  Number of documents returned: 72
  Number of unique user agents: 8
 

« first day (3559 days earlier)      last day (1373 days later) »