@UlrikeFischer I don't remember what the problems were, but I found a newer answer that support the original \showboard command: tex.stackexchange.com/a/367804/2891
Hi, I am confused if my concern is on-topic here or not. I wish to write maths equations using LaTeX in my free WordPress blog. What's is the best solution to enable LaTeX without upgrading my blog to the business plan?
I have a free WordPress blog with a URL like e.g.
https://blog.wordpress.com
I mean I don't have my own domain, only a WP sub-domain.
I noticed that there's a MathJax plugin in WP, but I cannot enable it unless I have a business plan.
So... is there any other way to have MathJax enabled in ...
@raf I know nothing much about wordpress but if you can get <script src="example.com"></script> into the generated html file you can use mathjax
@raf mathjax have some wordpress info here it is a bit old and better to use the newer mathjax3 url that you just gave but the wordpress side is probably the same
@DavidCarlisle Yes. I found that I have to put <script async id="MathJax-script" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script> somewhere. But I don't understand where and how.
@DavidCarlisle This doc is quite old from 2011. In my WordPress dashboard, I couldn't find the editor option... Thus I don't understand how to go to the header.php in the theme template files. I need to discuss this with someone who uses WordPress now.
@UlrikeFischer The code that is passed to \Configure{name}{\a:name code}{\b:name code} is inserted here. So when you use \Configue{name}{\Picture+{}}{\EndPicture}, whole content that is enclosed between the two is converted to picture.
@michal.h21 Well it would be rather easy to add hooks that tex4ht can use (as David wrote, we are actually just discussing some solutions here, as we need such hooks for tagging too.). But the question is why you failed for chessboard. Perhaps the internal pgf code is the real problem? In Davids example in texlive.net, dvipng complained a lot.
@UlrikeFischer the one issue is that TikZ really needs dvisvgm for the output, it just don't work with dvipng. other issue is that without the correct configuration, three svg files are produces. Only when you put the whole output of \chesboard to a picture, it works.
@michal.h21 for complicated things like the boards or pgfplots or pstricks it would be fairly simple at the macro level to make them be shipped out to a separate page, then if you ran the dvips you could get a final image(or possibly svg) from the relevant page of the postscript this might need less package specific customisation, not sure...
@DavidCarlisle this is more or less what \Picture+{} ... \EndPicture does. The page is then extracted to special DVI file, which is then processed by a configurable DVI processing command.
@michal.h21 yes that's what I thought it did, which was why I didn't feel too bad suggesting it:-) but then can I use dvips followed by some ps to image convert rather than use dvipng? ah "configurable" I guess that means I can. Hmmm I should experiment more I guess.
@DavidCarlisle yes. but the problem is that TikZ has default driver for TeX4ht that doesn't work well for anything complicated, so you need to declare that \def\pgfsysdriver{pgfsys-dvisvgm4ht.def} in TeX sources, which isn't really nice.
@michal.h21 can that be in a file such as pgfplots.4ht or is that too late and it really needs to be in the source file? At texlive.net I have full access to the source before passing it to make4ht so I coudld prepend that pgfsysdriver definition if needed, although I have tried to not do too many "hidden" processes so people can do the same docuemnt on their local installation.
@DavidCarlisle Yes, exactly: it's not done yet, but as I want to move from \SI to \qty, I already need some interfaces = {v2,v3} load-time key, so it would fit in there
@UlrikeFischer Probably. I still haven't officially released the driver, because it has issues with patterns. I found a solution for patterns, but it doesn't work with Tikz pictures that include other pictures. I guess it is a time for a bug report on TikZ tracker
@DavidCarlisle My plan is to 'properly' tidy up interfaces, hence thinking that 'long-term' I want n ('numeric') - as we no longer plan a separate format, I guess between dcolumn and siunitx we cover the 'official' numerical column support
@michal.h21 Good stuff
@michal.h21 I hope @DavidCarlisle isn't making too much work
@JosephWright looks OK, you could have table-column-identifers = {D} emulate-dcolumn-syntax=yes and I can hand over another set of package support to you.
@JosephWright yes I meant that the emulate-dcolumn switch would over-ride that although probably better to have a separate key to just enable D-with-dcolumn syntax taking three arguments so that you could have both co-existing
@DavidCarlisle I was thinking just emulate-dcolumn which would provide D, block loading of dcolumn, etc.: I've marked as 'future' but actually the work here is relatively easy
@UlrikeFischer I'm not going on a land grab, don't worry: I know I need to be mindful of existing usage (e.g. still need to deal with \qty being used by the physics package)
Assume I have `\begin{align*}A & B && C\\<here>\end{align*}`, where instead of `<here>` I would like to place an equation with only two columns (e.g. `D & E`).
How can I do this? If I naively do it as noted in the parentheses, the spacing is all wrong
@ComFreek well you ddidn't give many clues as to the requirement, how do you want D and E to align with respect to A B and C (and why is there nothing in the column between B and C ?)
@DavidCarlisle I can't add this plugin without upgrading the site to a business plan, which I don't want. So, I end up using Blogspot site. Here I find it easy to enable mathjax: koutuholi.blogspot.com/2021/04/testing-mathjax.html
The same feature should exist in the WordPress site too. I didn't find the theme editor.
Stupid question of the day: is it possible to create a command that: 1) read the current file discarding everything up to \end{document} 2) execute any filecontents environment there, and 3) returns to continue execution?
@JosephWright such a thing is possibly most useful for command completion in the editor, ace has an api for that which we don't use (we could ask ....someone... for their data:-)
@DavidCarlisle you are right. I find it odd too. I can easily edit the theme template on the free Blogger site. But I don't why the theme editor for the free WordPress site is missing!
I'm noticing that the editor is not visible from past few weeks. It's working fine on my other WordPress sites but in one site it's not visible. I tried changing theme and deactivating plugins but that didn't work.
Also my wp-config.php file doesn't have define('DISALLOW_FILE_EDIT', true);.
Interesting. I mentioned at one point that I have issues with evince crashing when using latexmk+lualatex. I've switched to TL21 and still have issues. But today I also noticed this message
SyncTeX ERROR: Bad boundary record (2). SyncTeX ERROR: Bad sheet content. SyncTeX ERROR: SyncTeX Error: Bad content
It seems evince crashes at the very end of the latexmk compilation. I'll go back to pdflatex.
@UlrikeFischer if the title had been \Duck how should it be marked up \addcontentsline{toc}{chapter}{\protect\numberline{}{\string\Duck} } gives Chinese, \protect or \noexpand give undefined command errors
@ComFreek or possibly a more semantic markup would be not to have & before cong and luse a two roe aligned[t] at that point to carry the tow cong clauses
@Skillmon -- The problem here is that LaTeX doesn't want you to use \def. And anyone who started off using LaTeX almost certainly hasn't read the TeXbook. (And maybe not the LaTeX manual either. Remrmber what @DavidCarlisle says about reading documentation.)
@DavidCarlisle I now have \begin{align*}A &= \begin{aligned}...\end{aligned}\end{align*}. Here, ... is multi-line, how can I force the aligned to align at top?
@ComFreek use {aligned}[t] but it would have been much easier to answer a question with an actual example on site rather than guess ascii art in chat:-)
@UlrikeFischer I need to ask again, it drives me crazy :( How do I get ß with CM/LM fonts and lualatex? \usepackage[T1]{fontenc}+\usepackage{lmodern} doesn't work. I get SS in the output.
@DavidCarlisle yes, but apart from token list manipulation and some weird catcode changes like \ExplSyntaxOn, that's about all the difference there is. And the spacefactor difference is non-existent, nobody sees the difference between 1000 and 999, and if a period or similar follows with a big enough spacefactor to see the difference, you wouldn't use \ anyway.
@AlexG why do you need it? I mean the following simply works, so why do you want to convert it in something that doesn' t work by loading lmodern and fontenc?
@FaheemMitha yes, they are. If you pay close enough attention you'll see that people quite frequently recommend other solutions than DEK to common problems. Most of us wouldn't have implemented \over the way it is implemented for instance. And many of us use different loop constructs than \loop...\repeat (well, and iirc the LaTeX implementation of \loop...\repeat differs from DEK's anyway).
@barbarabeeton But \def is so much better :) At least for the things I tend to program, as delimited arguments are quite frequent if you do low level programming.
@DavidCarlisle that's clearly user-error not false advice (maybe it is incomplete advice?).
@AlexG no, for that you need to use luainputenc to disable luatex's unicode support so it reads the stream byte by byte like pdftex. It works if you really need to make it work but it is almost never what you want to do.
@DavidCarlisle also, parameterless macros that should end a sentence (so that the period should have a spacefactor > 1000 in English typography) are a) rare, and b) user-error (well, perhaps not user-error, but I'd never define those and see no good reason to do so without also taking care of following spaces). If a parameterless macro ends with a period chances are it's an abbreviation or similar, and in that case it should have spacefactor=1000.
@Skillmon that was my originall reply to @FaheemMitha, that this almost never comes up and when it does come up it's usually a tex logo command, and the docuement may be better without it. But still I think {} is easier to explain than \ which requires worrying about space factor and whether \<tab> or \<newline> or \ spaces that will be stripped from the input buffer <newline> all do the right thing.
@DavidCarlisle Given the kind of work Daniel does, I can understand why he might like the system he uses. Luckily I can get away with the regular glossing macros which have much less markup.
@AlexG inputenc you basically never need inputenc in pdftex now (and with utf8 it does nothing but warn it isn't needed in luatex or xetex) fontenc (with all the normal options) forces 8bit fonts and type 1 format neither of which are easy to use, an dalso forces incorrect hyphenation in xetex.
@AlanMunn oh and I only added that final line in my answer so I didn't incur the wrath of the assembed (other) linguists here. I thought I'd get as much flak for using tabular in a gloss as I'd get for using pineapple on a pizza
@DavidCarlisle Certainly not from me in an answer to someone who is a linguist and a very TeX savvy. I would only complain if someone proposed this to someone just starting out, in which case it's reinventing the wheel.
@Skillmon -- Unfortunately, I often find myself in a position where I feel I shouldn't profess a preference between plain TeX and LaTeX. (Fortunately, I can profess general lack of knowledge of using ConTeXt.) But there's no question I've read the TeXbook, and appreciate flexibility in choosing the most reliable and least ambiguous method to accomplish what I need to accomplish at the moment.
@Skillmon -- Several sections of TUGboat, including the calendar and the TOC (cover 4) and other covers are still in plain. I really don't want to consider redesigning the TOC in LaTeX. Would mean starting from scratch, with no model that I can think of (even though the input is manual, because several important decisions don't have explicit guidance in the main text). Having a super-competent production editor is a great asset and comfort.
@michal.h21 your svg driver works:-) pgfplots and forest example working and the black move indicator re-appeared on the chesboard (@UlrikeFischer, @JosephWright_ davidcarlisle.github.io/latexcgi/test2-make4ht
@AlanMunn your forest example as html: https://texlive.net/run?%25%20!TeX%20make4ht%0A%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%5BT1%5D%7Bfontenc%7D%0A%5Cusepackage%5Blinguistics%5D%7Bforest%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cbegin%7Bforest%7D%0A%5BVP%0A%20%20%5BDP%5C%5CJohn%20%5D%0A%20%20%5BV%E2%80%99%0A%20%20%20%20%5BV%5C%5Csent%20%5D%0A%20%20%20%20%5BDP%5C%5CMary%20%5D%0A%20%20%20%20%5BDP%5BD%5C%5Ca%5D%5BNP%5C%5Cletter%5D%5D%0A%20%20%5D%0A%5D%0A%5Cend%7Bforest%7D%0A%5Cend%7Bdocument%7D
@UlrikeFischer I haven't tried using Michal's skak config yet I just switched in the svg option so it's using dvisvgm rather than dvipng but otherwise it's the config we came up with before, also found a free url shortner that I think means I can post working links here: cutt.ly/kcH150N
@UlrikeFischer I could try the code from Michal's answer but perhaps not tonight. so main thing that fails is more or less any fontspec/unicode-math use :(
I think I just used a SkakNew.htf file from here tex.stackexchange.com/a/307277/1090 but I was fiddling a bit so I need to isolate whatever it was and try it at texlive.net (this is local)
@UlrikeFischer hmm I copied the files up to texlive.net but get same offset there, might leave this tonight:-)
@DavidCarlisle Very nice. What has spurred this interest in tex4ht? A few years ago I used it to generate 41 pages of linguistic teaching materials for high schoolers. MSU removed the filespace it was hosted on, so it's not live any more, but I was very impressed with how little work it was to turn a 20 page PDF document full of phonetic fonts, tables, glossed examples (but no trees) in the working website.
@DavidCarlisle I should really put the stuff up on github at some point, but it's not really a priority at the moment.
@AlanMunn well I wanted html output at learnlatex.org and so far latexml has resisted all attempts to be installed, and lwarp seems to want in-document extra markup, so make4ht is all that is currently offered, it can now do all the examples at learnlatex except for a couple explictly using opentype fonts
@AlanMunn it dies with random internal unexpandable commands in csname errors so it's hard to have a top level view of exactlt why it fails, it just doesn't work:-)