-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ODT with fancy equation numbers, a Plain TeX alignment, and TikZ in a table #56
Comments
This works better:
I've fixed your math macros, and introduced new environment: I found that the Tikzpicture is removed by some table post-processing script (not |
For some reason, on my machine make4ht throws a fatal error when given the input file with your modifications. The command line |
This file don't fail for me, but the commands that are reported as missing are provided by the Graphics package. Try to add it to your document, to see if it helps. The
|
Yes, I think that's the same config.cfg: |
And what version is |
|
@gl-utah There is an option to download pre-release packages. See here: You can enable it and check if there are updates available for your packages. I personally was not able to download an update only for a single specific package. Since i wanted to get the latest update for make4ht, I had to download pre-release updates for ALL my packages, which i am not sure is a good thing to do. I also am not sure if that was mandatory, or if i overlooked some kind of setting that would allow me to be more specific, but if you are set on getting the latest updates, you might want to make use of this option. |
@ThiloteE Thanks for alerting me to that possibility. Upon choosing that option in the MiKTeX console, I get a list of pre-release packages which have checkmarks which cannot be unchecked. For example, in The web page |
I don't really know much about Miktex, but I guess that this I think that |
In the MiKTeX Console, I went to Packages, then right-clicked to remove tex4ht and remove make4ht. Then I went to Updates, "Change", and checked "Retrieve pre-release (experimental) packages". Next, I chose a CTAN server. (I didn't actually update.) Then I went back to Packages, then right-clicked and installed tex4ht (packaged June 4, 2021) and make4ht (packaged October 14, 2021). CTAN, at https://ctan.org/pkg/make4ht, has a version of 0.3j, 2021-10-11, so I think that's the package I got. No date is listed at CTAN for https://ctan.org/pkg/tex4ht. Unfortunately, when I checked the ooffice.4ht file, its date remained April 16, 2021. The file make4ht.exe is dated December 9, 2021. In the MiKTeX Console, I went to Updates, Check for Updates, and got many "release state change" items, reflecting my switch to getting pre-release packages, but nothing for tex4ht or make4ht. So it seems this is as updated as I can get this MiKTeX installation for tex4ht and make4ht. I decided to rewrite my macros without using so many Plain TeX ideas, and to simplify things as much as possible. I spent some days learning some of the AMSmath package. In the program below, the definition of \enum is simpler than I require, but as a first step, it would be nice to get this version to work:
The LaTeX output is So, is there any way to get the equation number set correctly? |
The TeX4ht sources are not in CTAN, they go directly to TeX Live. Miktex takes them from TL, but only few times a year, so they can be quite old. Regarding your example, it is not that easy to get what you want in ODT output. You can try the following configuration:
It reuses the code used for the The downside is, that it will be used for every display math, even when you don't want any equation number. A safer solution would be to use a custom environment just for these tagged equations. |
I really appreciate your working on this. I had thought that the difficulties came about because I was using ideas from Plain TeX, but now I see that wasn't the (only) problem. I ran the file with the configuration code you wrote, and LibreOffice gives The answers in Your last point makes me concerned that the following, less "minimal" example will be impossible to convert, because the first equation in the alignment is not numbered but the second and third are.
The LaTeX output is |
Edit: This post by me was VERY wrong. Don't follow my advise.
|
Thanks for your interest, @ThiloteE! The LaTeX command I used, I've not been able to figure out a way to get the same LaTeX output without switching to math mode or without using Changing the input text, rather than the macro definition, is recommended against in the first paragraph of https://www.kodymirus.cz/tex4ht-doc/Configurations.html#private-configuration-files: "It is highly recommended to leave source LaTeX and TeX files intact, and not introduce TeX4ht configurations there. The configurations should be introduced indirectly in private configuration files." Nevertheless, I tried your suggestions. However, The complications of LaTeX I've coped with, with uneven levels of success, for a long time, but the complications of ODT and DOCX and Microsoft Word's equation input formats are even harder for me. Thanks for your help! |
Oh no, i clearly sent you some wrong information. I apologize. I think i remembered something from outside math-mode, looked it up and did not look at the graphic properly. You are completely right, |
@michal-h21 , perhaps my minimal example was too minimal. It only showed the
LaTeX produces this output, which is correct: |
@ThiloteE, no problem! I really appreciate your effort & assistance. |
The LaTeX file "FancyEqnNumbers_TikZTable.tex"
produces
but
make4ht -c config.cfg -e build.lua -f odt FancyEqnNumbers_TikZTable.tex
ends with a fatal error unless one comments out the lines of the tikzpicture and the \eqalignno. After commenting out those lines, one obtains an ODT file which appears in LibreOffice as(Microsoft Word 2016 and 2019 cannot open this ODT file).
None of the equation numbers are properly placed, and two of the equations are undisplayed. Is there any way to fix these problems and get the tikz and \eqalignno lines to work? (The build.lua and config.cfg files I use are attached below; I gave them .TXT extensions to enable the uploads.)
build.lua,txt
config.cfg,txt
The text was updated successfully, but these errors were encountered: