« first day (3146 days earlier)      last day (1770 days later) » 

12:13 AM
@UlrikeFischer I managed to almost round-trip moderately complicated math.
0
Q: How to correctly replace $$..$$ with \[..\] and $..$ with \(..\)?

Aleksandr KozlovskiyHelp me please create regular expression, which, for example, replace $a+b$ with \(a+b\) and, for example, $$a-b$$ with \[a-b\]. The replacement must be only if before each $ there is no \char. Here is my code, which does it. For $$ it works very well, but for $ I have errors, because in some pla...

@UlrikeFischer ^^^
@UlrikeFischer But you have to use unicode-math. I don't know how to find out the correct mapping otherwise.
 
 
5 hours later…
4:59 AM
@barbarabeeton Thank you for that explanation. This was the type of argument I was looking for.
 
 
1 hour later…
7:02 AM
@HenriMenke That looks really interesting. Imho the operator problem could be easily solved. E.g. with an attribute set by the command that your code could then detect. And one could improve the translation, so that one get \pi instead of \mitpi etc.
 
7:26 AM
@UlrikeFischer I just did the lazy thing of grabbing unicode-math-table.tex. For production use a hand-crafted table is of course desirable.
@UlrikeFischer Two really big problem are, however, nested mlists and embedded horizontal and vertical material.
 
@HenriMenke when/how can this happen?
 
@UlrikeFischer \Big and occasional \text
@UlrikeFischer \Big (and friends) is the absolute worst.
macro:#1->\leavevmode@ifvmode {\hbox {$\left #1\vbox to11.5\p@ {}\right .\n@space $}}
 
@HenriMenke well with unicode-math \Big could perhaps be redefined to use \Uleft/\Uright (but there are open questions here: tug.org/pipermail/luatex/2019-February/007063.html). But beside this: would it help if the nodes had an attribute saying "Big"?
 
@UlrikeFischer Perhaps. In my opinion it would be better to use something like
\def\Big#1{{\Uleft height 11.5pt depth 0pt axis \Udelimiter "0 "0 \Umathcharslot`#1\Uright.}}
modulo some \nulldelimiterspace.
@UlrikeFischer Another problem would then be with
\begin{equation}
     a^2 + b^2 = c^2
\end{equation}
 
7:42 AM
@HenriMenke it would be nice to have a working replacement, but when I tried in february there were some spacing/size issues.
 
under the hood that is just $$a^2 + b^2 = c^2 \eqno(1)$$ (I think) where \eqno makes a \hbox in math mode.
@UlrikeFischer Doesn't really matter, because the LaTeX team would never agree to change this.
@UlrikeFischer Another issue is with alignments:
\begin{align}
    a^2 + b^2 &= c^2 \\
    a^2 + b^2 &= c^2
\end{align}
is just four separate mlists with displaystyle.
 
@HenriMenke it could go in unicode-math, if needed as option.
@HenriMenke yes, but as soon as such environments are involved we can grab the content directly.
 
@UlrikeFischer But then you lose the nice translation and are back to unreadable garbage that authors put there, that I have mentioned in my email.
 
@HenriMenke yes but one can probably add translations.
 
8:00 AM
@HenriMenke you can probably do a combination, use the whole environment to flag to Lua that you have an alignment and use that information to customise how you convert each nested mlist....
@HenriMenke be careful what you ask for:-)
 
@DavidCarlisle For alignments and equation numbers you definitely need macro support.
 
@DavidCarlisle does this look sensible for the hyperref problem:
\documentclass[]{article}
\usepackage{hyperref}
\hypersetup{pdftitle={preamble}}

\makeatletter
\let\Hy@realDisableOption\Hy@DisableOption
\def\Hy@DisableOption#1{%
  \ifnum\currentgrouplevel>0
   \expandafter\@firstoftwo
  \else
   \expandafter\@secondoftwo
  \fi
  {\expandafter\gdef\csname Hy@smuggleout#1\endcsname{\Hy@DisableOption{#1}}%
   \expandafter\aftergroup\csname Hy@smuggleout#1\endcsname
  }%
  {\Hy@realDisableOption{#1}}}

\begin{document}

abc
\hypersetup{pdftitle=XXX} %used

\newpage
 
8:40 AM
@UlrikeFischer I suppose so, although it does assume a bit where it is used and that an aftergroup comes in a safe place, I'm not sure why the pdftitle option can't just set a global flag which it tests and avoids setting itself again?
 
@DavidCarlisle Can there be a place where the aftergroup is not safe? Regarding the flag: it is quite allowed to use \hypersetup{pdftitle=something} more than once as the info dict is written at the first shipout (but in the long run of the resource management projekt I think it will move the the last page ...).
 
We should change LaTeX's error recovery, in that after there was an error, the output of each page should have a big fat ERROR written right across the page. That would finally turn people into fixing their errors, instead of letting them pile up and use the output anyway.
5
 
8:55 AM
@UlrikeFischer places where that is sensibly used,possibly not but in general, lots, that is all the problem about "colour safe boxes" aftergroup (to reset the colour) coming in bad places, it scarred me for life:-)
@Skillmon the default behaviour is to stop, make an error message and make no output. It is IDEs and sharelatex and things that insist on running in scrollmode or batch mode and so forcing past errors....
 
@DavidCarlisle what happens if it comes in a bad place? Does it simply not work, or does the document explodes?
 
@UlrikeFischer in the case of colour it would crash the printer and force you to physically turn it off and turn it on again:-) \setbox0\hbox{\color{red}zzz} <aftergroup here> \usebox0 means the colour pop comes before the colour push, and PostScript interpreters are not keen on that....
@UlrikeFischer similarly if you aftergroup out of a primitive $$...$$ group the whatsit after the close display interferes with tex's logic for picking up the continuation paragraph after it and typically (or at least sometimes, depending...) you get a spurious leading space in the start of the text
 
9:14 AM
0
A: Weird equation num

David CarlisleYou give no information but luckily I have a crystal ball.... If you have a document such as \documentclass{report} %\documentclass{article} \usepackage[T1]{fontenc} \def\theequation{\ifnum\value{chapter}>0\thechapter.\fi\arabic{equation}} \begin{document} \begin{equation} 1=0 \end{equation...

 
9:25 AM
@DavidCarlisle Hm. so what are the options? Moving the disabling code to begin document would probably break documents which set the title after it, using flags would mean that every key definition has to be changed. Or simply document that setting the title to late won't work without warning?
 
@UlrikeFischer I think the aftergroup version is probably OK (for patching hyperref) but we should think (later) what mechanism we want for any kernel feature version of this. in practice people don't do this in math displays and all official latex box commands are colour safe (once colour package loaded) so aftergroups should come in the right place.
But having done color package and afterpage (both of which are almost all related to where aftergroup tokens appear), I'm possibly more nervous than most people about that:-)
 
@DavidCarlisle in the long run I don't think that options need to be disabled in this place. The info dictionary should be written at the end of the document (in whatever variant of AtEndDvi we add) and then options are either never disabled or in the preamble or at begin document.
 
9:41 AM
2 days ago, by marmot
@manooooh No, it got stolen.
@DavidCarlisle This is a public forum, you know …
 
@UlrikeFischer aftergroup it is then...
@HaraldHanche-Olsen it is?
 
@DavidCarlisle Yes but don't worry, I won't tell anybody else.
 
@AlanMunn oh I arrived late, sorry. :) Yes, they seem to maintain the closest possible syntax: help.duckduckgo.com/duckduckgo-help-pages/results/syntax
@DavidCarlisle ooh
 
@marmot I know who's got your crystal ball, but unfortunately I am sworn to secrecy.
 
9:57 AM
@HaraldHanche-Olsen it can't be @marmots crystal ball, it's monochrome.
 
@UlrikeFischer Oh. I assumed everything turned monochrome if you took it to England.
 
@HaraldHanche-Olsen a crystal ball from marmot is immune to such effects, it has xcolors.
 
@UlrikeFischer the one I have is flawless and colour free.
 
@DavidCarlisle and filled with "z".
 
@UlrikeFischer a rare and magical element omitted from conventional tables
 
10:11 AM
@HaraldHanche-Olsen see ^^^^ it can't be marmots crystall ball.
 
10:38 AM
@DavidCarlisle yes, I know, but we should change the behaviour when they try to continue to do that!
@DavidCarlisle that would still enable you to get all the other errors (what is the argument to do that), while still giving absolutely no usable output.
 
11:06 AM
@marmot I found the thief who stole your crystal ball: tex.stackexchange.com/a/495408/117050
 
@Skillmon Ulrike conclusively proved that these are unrelated
 
11:19 AM
@DavidCarlisle I resaved some of the luatex testfiles (because of the different spacing in the pdf). Could you run the suite to check if it works for you?
 
user280247
11:43 AM
Hi, can you help me on this: Do you use MathJax to write equations in html documents? I'm following how-to-incorporate-tex-into-a-website, second answer, but not sure if it is the proper approach
 
user280247
the second answer uses this:
 
user280247
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
</script>
<script type="text/javascript"
  src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
 
user280247
then things work quite good (nicely displayed), but not sure if it is still the right way to do it
 
@santimirandarp mathjax does not use LaTeX so mathjax questions are off limit here. Mathjax is a javascript library that knows a subset of LaTeX math syntax, but does not use latex or friends under the hood.
 
user280247
wow, I supposed it was the same, it looks nice. thanks @daleif and apologizes
 
11:46 AM
That being said, I do use a configuration like this on the web pages where we use mathjax.
 
user280247
thanks! @daleif
 
@santimirandarp We've used something like this for years
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX", "output/HTML-CSS"],
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ["\\[","\\]"] ],
processEscapes: true
},
"HTML-CSS": { availableFonts: ["TeX"] },
});
 
user280247
And do you know where to learn to set up something like that?
 
user280247
I've seen mathjax website but not sure if it is the right place to look for some guidance
 
See the mathjax website. The configuration here is mainly to enable $..$ parsing.
since hardly anyone writes inline math as \(...\)
 
user280247
11:50 AM
Yes, $ $ is way easier. Fine...
 
12:01 PM
@santimirandarp do note that depending on your application it may be better to do premarkup of the HTML code, say marking inline math using <span class="math">$x^2$</span>. Since with the right mathjax configuration this will speed rendering the math up quite a lot. When mathjax has to parse the entire page, it might be a bit slow, especially on long pages. That said, we use the version with no premarkup at the backend as ours are ofthen short texts, and the CMS we use does not allow premarkup
and nobody want to do the premarkup by hand.
 
@UlrikeFischer yes...
@santimirandarp but $ is much harder to use if you are adding mathjax to an existing site (especially one with American content) as 10$ is quote likely to occur in normal text, which is why mathjax defaults to only looking for \(\) and \[\]
@daleif even faster (much faster in some cases) is to use the mathjax node configuration and serve output of mathjax rather than leave it to client side javascript (of course you need to commit to a articular rendering eg common html or svg in that case)
@santimirandarp the docs on the mathjax site are quite good, also the mathjax tag on stackoverflow (not here) is monitored by the mathjax developers and gets good answers, stackoverflow.com/questions/tagged/mathjax
 
12:30 PM
@DavidCarlisle that again depends on what you have access to. For the CMS my workplace uses, it was just a lot easier to add mathjax to the pages and have it parse the pages directly. We know our pages does not mention $ as a currency, so it is not an issue.
On the other hand, we have some people who have written interactive teaching material with html, youtube videos etc. They use katex and premarked html code as the page parse is too slow.
 
user280247
@daleif Im just quite newbie on this to understand all that, but I really appreciate your help. Just started studying html and css a few days ago (dont know what you mean either by 'application' or 'premarkup')
 
@santimirandarp you have a long way ahead of you then. If you are messing with css, then consider writing the CSS via SASS (sometimes denoted scss) as it makes life a LOT easier).
 
user280247
I've found css 'simple' but there are MANY things. Quite the same than latex: easy to start but then it gets hard to do fine tunning
 
Premarkup here means that instead of writing $x^2$ on your webpage, you'd write <span class="math">$x^2$</span> (or simillar), that way mathjax can find the math via the DOM, which is much faster than having to look through the entire text.
@santimirandarp then wait until you need to play with say a, a:hover and a:hover::before then the SASS syntax of a { ... &:hover { ... } &:hover::before {...}} makes life easier and the "css" a lot easier to read.
 
user280247
@DavidCarlisle I see. I just meant that $ is easie to type, and you dont get confused with other parenthesis etc
 
user280247
12:38 PM
@DavidCarlisle thanks! I'll have to go through the docs possibly
 
user280247
yes, I'm only on a:hover stage, somethimes with after/before
 
user280247
But I don't want to extend html css on this chat ha! See you, thanks both @daleif @DavidCarlisle
 
1:11 PM
@PauloCereda Did you notice their example for "Go to the top hit"? No wonder you like it. :)
@HaraldHanche-Olsen Only post-Brexit.
 
Is @moewe around I wonder?
 
@DavidPurton He's not much (ever?) in chat. Do you have a biblatex question?
 
@AlanMunn ooh
 
1:27 PM
@AlanMunn :) yep. SBL style (which is similar to Chicago with a long and short form reference) wants citations formatted differently within footnotes depending on whether a long format is in use or whether the short form is in use. The former is without parentheses and the latter with parentheses. I just wondering if this is worth trying to automate and if so how I might adjust the \smartcite definition to do this. Feel free to way in if you have a view.
 
@DavidPurton It certainly seems like the sort of thing that could be automated. But I don't know the biblatex internals well enough to have an opinion on how.
 
@AlanMunn Maybe I'll just ask a question and see what comes back
 
@DavidPurton That sounds like a good idea. Moewe is around a lot so I'm sure he'll see it.
 
 
1 hour later…
2:41 PM
@AlanMunn Here's the issue in all it's glory: tex.stackexchange.com/questions/495453/…
 
 
1 hour later…
3:59 PM
> The Spice Girls are getting an animated movie
Oh no
@AlanMunn vvvv
Me: Doctor, I am afraid of the Backstreet Boys...
Doctor: Tell me why...
Me: <screams in panic>
 
4:32 PM
ooh there's a squirrel here
 
@PauloCereda Groan.
 
@AlanMunn :)
 
@Skillmon OMG!
@HaraldHanche-Olsen I won't tell anyone that you told me if you tell me.
 
5:11 PM
@marmot this was my favourite tag revision of all times: tex.stackexchange.com/revisions/153389/3
2
 
5:27 PM
@PauloCereda OMG.
 
5:38 PM
  Check failed with difference files
  - ./build/test/testnb-pdf.luatex.pdf.diff
  - ./build/test/testnb.luatex.diff
@UlrikeFischer ^
 
5:49 PM
@DavidCarlisle can you sent me the log? There was something with the endash ligature there.
 
@UlrikeFischer the second diff is all + that is it's diffing against an empty file?
 
@DavidCarlisle oh yes, the one is empty. I wonder what I did there.
@DavidCarlisle I resaved the two tests, perhaps the pdf was locked or something like that.
 
@UlrikeFischer re-running
 
6:04 PM
Yay, I'm great:
+1 for the speed! You provided a working answer so fast! You're really great, your solution is simple and works perfectly! — Muttley 1 min ago
 
@Skillmon woooooo
 
@UlrikeFischer all passed
 
@DavidCarlisle uff. then I can insert the aftergroup-code and try it if passes (on my first test I got some failures because of a missing %, but don't tell egreg ;-)).
 
As already discussed this chat is good for secrets, @egreg will never know.
@Skillmon I wouldn't believe muttley, always cheated in every episode of the wackey races
 
6:31 PM
@DavidCarlisle ooh
@DavidCarlisle ooh
 
@JosephWright Can mods migrate a question to any other site or does it need to be re-asked? tex.stackexchange.com/q/495468/2693
 
@AlanMunn Target site?
 
@JosephWright Sorry, music.stackexchange.com
 
@AlanMunn Done
 
@JosephWright you are mean fast
 
6:43 PM
@JosephWright Thanks. The OP may want to edit out the more LaTeXy stuff, but it's certainly on topic there.
 
@AlanMunn The best combo is either standalone Lilypond or Lilypond + lyluatex which is awesome. :)
 
@PauloCereda Well maybe. The question is a bit more specific than that. But I have no experience with Sibelius, which is what my musician friends use.
 
@AlanMunn Sibelius is mean. :)
 
@PauloCereda You've been listening to @egreg again.
 
@AlanMunn ooh
 
7:17 PM
Hmmm.
1
Q: Is horseback riding affecting my piano technique?

Kamilla BicskeyAfter horseback riding my fingers feel stiff, lazy and i feel like my technique has degraded. I think it's because the pulling on my hands. I know sport is a very common topic in piano forums, but I haven’t seen anyone talking about horseback riding. Can it do long-term damage to your hands? (Yes...

 
@AlanMunn Of course I never speak about irrelevant musicians.
 
Aug 31 '15 at 17:47, by egreg
@AlanMunn Speaking of Scandinavian composers: the radio has the awfully boring “The Swan of Tuonela” by Sibelius.
never is such a pesky word... :)
 
@AlanMunn I can imagine it is difficult to play the piano while on the horse back.
 
@mickep Indeed.
 
@mickep well that depends who's pressing the piano keys:
 
7:28 PM
@DavidCarlisle Oh, that looks like the famous British composer, I forgot her name.
@DavidCarlisle By the way, a colleague posted this question about graphics today. Did you see it? He will hopefully update it with more info soon.
 
@DavidCarlisle ooh
 
@mickep saw it but I'll leave it to the people who know more pdf details, it certainly isn't a graphics pakage issue, as that doesn't really do anything with the images other than ask their size,
 
@DavidCarlisle Ah, I see. So, it is not your fault then. ;)
 
@mickep that is of course the important detail.
 
@DavidCarlisle ooh
 
7:35 PM
@AlanMunn That's a mention. ;-)
 
@DavidCarlisle It is only by not writing any code that you cannot be blamed to write buggy code.
 
@DavidCarlisle ∀x [exists(x) ⋀ on.the.internet(x)]
4
 
@AlanMunn ooh
 
@mickep that is one way, the other way of course is to write code without bugs
@AlanMunn I was working on that assumption, it is true
 
@DavidCarlisle Well, everyone cannot be like @egreg, right?
 
7:38 PM
@mickep thank goodness for that
 
@DavidCarlisle Or deny you wrote the code.
 
@AlanMunn declare it a feature
 
@DavidCarlisle Tried and true.
 
@AlanMunn Besides, Finland is not a Scandinavian country, just a Nordic country. There is a difference. Basically, Scandinavia ⊂ Norden.
 
@HaraldHanche-Olsen Hmm. So by mischaracterizing Sibelius as Scandinavian, @egreg failed to talk about him at all. That's an interesting take on semantics.
 
7:50 PM
@HaraldHanche-Olsen Petter Dass ⊂ Norway ⊂ Scandinavia ⊂ Norden ⊂ ...
 
@mickep Something like that. But since we're talking about composers, Edvard Grieg might be a better example than Petter Dass.
 
@HaraldHanche-Olsen The choice is yours.
 
@mickep I took a quick look and with a simple example I can't reproduce it, according to the pdftex docu for png always DeviceRGB is used.
 
@UlrikeFischer Thanks. Let us wait for him to upload his example, so others can try it. Did you also have an alpha channel in your example?
 
@mickep no, I used a simple png.
 
7:56 PM
@UlrikeFischer Maybe that is it.
 

« first day (3146 days earlier)      last day (1770 days later) »