Closed opensource-philosophy closed 1 year ago
Hello, I am not sure if this issue has to do with ox-hugo
. I rely on the Org core for the LaTeX parsing.
Also, if you see the issue when using ox-html
as well, and if you can get that fixed for that, it will get auto-fixed for ox-hugo
too.
Sorry, I don't have much to add.
Also, I won't be able to respond for the next 3 weeks as I will be on vacation.
Hello, I need to close this issue as I believe that it's out of the scope of ox-hugo
development. If I've misunderstood this, and if the same issue is not seen with other Org exporters, please let me know and we can discuss further.
Hey @kaushalmodi, and thank you very much for this awesome tool!
I have something in between a question and a feature request. I’m trying to be as clear as possible, and am more than happy to provide you with more information if needed!
The General Problem
I am using
.svg
images to implementLaTeX
images into my blog posts. This is mostly working just fine, but there is one drawback: LaTeX needs some code to be compiled twice to produce the desired results. Here is a MWE:If you compile it just once, the arrow will not be placed correctly. If you compile it twice, however, it is placed correctly. Thus, simply inserting the code into your
org-hugo
-file won’t do the trick.My Solution Attempt
The way I tried to solve this was by writing a function which deletes the preview image at point and replaces it with the result of compiling the code twice:
The way to make
xelatex
compile three times can be found in the:latex-compiler
key: I just iterated thebash
command three times to make sure it is working.The Actual Problem
Now I am able to actually see the correct inline-images, but the images that are exported by
ox-hugo
are still the wrong ones – those which were compiled once! To stay with the example, the arrow is still not shown correctly. I cannot seem to grasp why and thought you might have an idea why this is happening, or how to resolve this.As to the feature-request: I do not know too much about your code, but would it be possible to define a variable which stores a list of keywords that are searched for in the
LaTeX
-fragment at hand, and write anif
-statement which compiles the code for those fragments that match at least one of these keywords not once but twice? This would automate the process. Also, is there a way to usesrc
-blocks to produceLaTeX
-images which are then exported tohugo-md
?Thanks for the efforts, and all the best!