Spring Cleaning

[reaction]: goo.gl/KPBWGE || possible chemdraw query: goo.gl/3...
May 24, 2021 19:50
@andselisk At one point, I almost added electron configurations to the feature set of \ce. I thing there is a discussion in meta. I still might add it, if there is no syntax overlap.
Feb 23, 2018 14:42
@GaurangTandon If you need a \+ inside \ce to get a normal plus, then you are doing something wrong :-) Adding a few spaces will do (and is the recommended \ce syntax.
 
Jun 7, 2019 21:43
@DavidCarlisle Thank you so much for your time! This is the Internet (the Internet community) as it should be!
Jun 7, 2019 21:36
@DavidCarlisle Can you give me a pointer about the section heading? The heading is written into an external file (was it .toc?) and re-used in the table of contents, right? I have to make sure that what gets written into the file is not something expanded half-way into something that cannot stand on its own, right?
Jun 7, 2019 21:28
@DavidCarlisle Why should I include the language files at the beginning? Why wouldn't "load when needed" work? I remember which language is loaded and when a new statement is requested, I \input the definitions before using one of them?
Jun 7, 2019 21:27
@DavidCarlisle Okay. I remember that I needed the help of the gurus for things like redefining cat codes temporarily and messing with expansion order in order to get things done.
Jun 7, 2019 21:24
@DavidCarlisle Good to know. I had a quick glance in the TeX Book. It is indeed a multi-stage process. Characters are combined to tokens and these are evaluated then. And the exact order of that is so complex that it fills 4 pages full of "danger bendy road" signs.
Jun 7, 2019 21:08
@DavidCarlisle Thanks. Well, I remember (from some years ago, when I dived into the TeX book) that there are several stages. Some things being evaluated on parsing the code, some on executing the code. (I am pretty sure, I am using the wrong words here, please excuse.)
Jun 7, 2019 21:02
@DavidCarlisle I was talking more about the concept of inclusion and conditionals, not actual code \include and \if. // My question was: An \input command will be evaluated just as any other command? So, having a never-executed \input will not load anything. No pre-loading, no early-execution-on-parsing or similar?
Jun 7, 2019 20:54
@DavidCarlisle Ah, that's the reason.
Jun 7, 2019 20:54
@DavidCarlisle Is conditional \include a thing that works? Or is the \include executed before the \if around it is executed, rendering it kind of useless?
Jun 7, 2019 20:53
@DavidCarlisle I couldn't find any "list of all loaded languages" in the babel manual, for now. I guess, this could be a proper question at SE.
Jun 7, 2019 20:53
@DavidCarlisle I could also \def it directly, couldn't I? \def\hp-french-P378{Utiliser ...}
Jun 7, 2019 20:34
@DavidCarlisle With regard to your comment at tex.stackexchange.com/questions/494741, it makes totally sense to load just one or two languages. However, I would like to evaluate the current (babel) language. Is there a way to conditionally include package sub-files either on loading time (evaluating all loaded babel languages) or on a on-demand basis?
 

 The Periodic Table

Haikus are awesome / Chemistry's even better / So pull up a chair
Jun 5, 2019 09:01
Aaaaah! I'd like to use my time-machine and go back to the beginning of the discussion.
For all German-speakers folks around here, let me quote Ernst Jandl: "manche meinen // lechts und rinks // kann man nicht // velwechsern. // werch ein illtum!"
Jun 5, 2019 05:00
@orthocresol Now I am getting confused myself. (I am not a chemist!) IUPAC: Kc = equilibrium constant with concentration basis (c having unit mol/m3), Km = equilibrium constant with molarity basis (m having unit mol/kg). Molarity, according to Wikipedia, is a concentration, its symbol is c, its unit is mol/m3, so it is essentially the same as concentration. Phew.
Jun 4, 2019 19:08
But, in the end, it is all just a convention. I'd like to hear ICTNS's opinion on this.
Jun 4, 2019 19:08
On the other hand, I don't see a difference between "molar" and "based on molarity". Isn't a "molar enthalpy" the "enthalpy based on molarity"?
Jun 4, 2019 19:08
Well, allow me to I see a conceptual difference between "molarity" itself and "based on molarity". Could you replace the letter with number+unit (or a set thereor), is my rule of thumb.
Jun 4, 2019 17:49
Neither "molar" nor "based on molarity basis" are.
Jun 4, 2019 17:48
@Loong And which of the two is a physical quantity, a number or a mathematical variable?
Jun 4, 2019 13:38
@Loong I still don't see how the p in Kp "represents a physical quantity". (Wikipedia: A physical quantity is a property of a material that can be quantified by measurement. A physical quantity can be expressed as the combination of unit by a number.) Yes, pressure can a physical quantity, but in this case, the p is a shortcut for "expressed in terms of partial pressures of gases". You cannot give that p a number+unit (or multiple numbers+unit). Same for Kc.
Jun 4, 2019 13:31
So, they are inconsistent.
Jun 4, 2019 13:29
@Loong Well, the IUPAC Green Book writes $K_m$ ("molarity basis") while in the UIPAC's "On the use of italic and roman fonts for symbols in scientific text", they insist that $C_{p,\mathrm{m}}$ has an upright m for "molar".
Jul 13, 2018 08:57
Bold works just a little bit: $\ce{H2$\mathbf{O}$}$ $\ce{H2$\mathbf{O}$}$ works, but $\ce{$\mathbf{\ce{H2}}$O}$ $\ce{$\mathbf{\ce{H2}}$O}$ does not. I will put it (low) on my todo list.
Jul 13, 2018 08:57
Color works a little bit: $\ce{$\color{red}{\ce{H2}}$O}$ $\ce{$\color{red}{\ce{H2}}$O}$. But you have to know that parsing is interrupted by \color.
Jul 13, 2018 08:57
Answer: Italics are well supported, because they convey a semantic meaning: $\ce{NO_$x$}$ $\ce{NO_$x$}$, $\ce{V_{V,1}C_{C,0.8}$V$_{C,0.2}}$ $\ce{V_{V,1}C_{C,0.8}$V$_{C,0.2}}$
Jul 13, 2018 08:57
@GaurangTandon asked "Is there a way to apply bold and italics formatting to \ce{} expressions?"
Jun 25, 2018 10:17
@GaurangTandon Yes, I can reproduce it here, in Chrome. It does not happen on high-res monitors. So time is playing for us. :-) But because mhchem just re-used the standard \equiv, I see the issue with the MathJax guys. They are currently discussion to switch to another font with MathJax v3, so I'd say a bug report does not make too much sense, at the current time.
Jun 25, 2018 05:50
I don't know what version of mhchem ChatJax++ loads. In fact, I cannot find mhchem anywhere in the code.
Jun 25, 2018 05:47
@GaurangTandon Could you try a plain $\equiv$ ($\equiv$) without \ce?
Jun 24, 2018 15:38
@GaurangTandon It looks good on my high-res monitor. How does $\equiv$ ($\equiv$) look like. It they render differently, I need to take a closer look.
Jun 22, 2018 20:53
Could you compare the triple bond with mhchem.github.io/MathJax-mhchem Does this look better in your browser?
Jun 22, 2018 20:49
a) Have the 3 dashes have the same distance. This will look good in large font sizes, but bad in current Chrome at normal size. b) Have it look good now, but in reality it is non-equal distances that one would see on larger font sizes, magnification, high-res screens. Also, browser implementations might change. So I decided for b).
Jun 22, 2018 20:49
@GaurangTandon Re: triple bonds. I know. I tried my best, but somewhere along the way through MathJax and Chrome, there is some rounding error. Or it may be intentional so that nothing is printed on "half" pixels. I could decide between two options
Jun 10, 2018 20:26
@GaurangTandon StackEdit obiously KaTeX. And the bottle neck is there: github.com/Khan/KaTeX/issues/50 No plugin architecture yet.
Jun 8, 2018 14:25
@GaurangTandon One observation I find interesting is the typography of good printed books. And they fit their in-line formula in.
Jun 8, 2018 14:05
@GaurangTandon Re chemistry.stackexchange.com/questions/98014/…). Never mind. To be clear: I don't think my \ce is perfect. Some shortcoming are: overhead for short formulae $\ce{H}$, font difference in running text.
Mar 5, 2018 20:17
My "Is that ironie, sarcasm or dangerously weird?" detector spins frantically in circles.
Mar 5, 2018 19:44
@Loong I want to understand first.
Mar 5, 2018 19:41
@GaurangTandon I do not quite understand your edit to my question chemistry.stackexchange.com/questions/91783/…;. Why don't you want the URL to be clickable? Why did you put a clickable "URL" next to the - now not clickable - http:/ /...?
Feb 27, 2018 12:23
@AvatarShiny :-) Thanks
Feb 27, 2018 10:51
@AvatarShiny K_a and \DeltaG^{\circ} are not physical units. Don't use \pu, please.
Feb 25, 2018 06:11
@GaurangTandon Not really. You forgot the space. $\mathrm{5~mol}$ would be okay.
Feb 24, 2018 21:46
I already thought about a C.SE extension for MathJax. You could discuss features and I could create it. If everything works perfect, the C.SE extensions become the de-facto standard that people want to use everywhere (like amsmath). But there is also a good chance that C.SE becomes a more and more closed community ("They even have their own flavor of LaTeX").
Feb 24, 2018 21:42
Regarding the question whether \mm or \mr could be created as a shortcut for \mathrm. Yes, they could. It's as easy as typing \let\mr\mathrm. And it's a little bit more complicated to do that in a MathJax extension. But one has to be careful not to create side-effects.
Feb 24, 2018 21:39
Regarding the question whether to use \pu instead of \mathrm, I'd kindly ask to use it only for numbers and/or units. And I'd strongly advice against mis-using it for more than pure letters. Everything that goes beyond pure letters might get rendered differently, in future. For instance, m2 rendered differently in earlier versions. And the rendering of kg.s will change shortly.
2
Feb 24, 2018 21:34
@LinearChristmas Regarding the question: Is there a performance difference between \pu and \mathrm. Yes, there is. Ater all, \pu is doing some parsing. But it should be neglectable. It should be less than 100 ns. I.e. 10 occurances would have an overhead of 1 ms. Nobody would notice. (It's hard to properly measure such things. My measurement comes from 50000 usages of \ce. My feeling was that the garbage collection has most impact on the running time, not the CPU usage itself.)