Project

General

Profile

redmine_latex_mathjax for Redmine 6.0

Added by Ivan Cenov 3 months ago

Hi,

I tried to make redmine_latex_mathjax compatible with Redmine 6.0. The difference between Redmine 6.0 and prior Redmine versions is where plugins assets are stored:
  • Redmine < 6.0: /public/plugin_assets/redmine_latex_mathjax
  • Redmine >= 6.0: /public/assets/plugin_assets/redmine_latex_mathjax

I edited init.rb 'latex_mathjax_url' accordingly with Redmine version. However, I did not manage to make plugin assets assets\mathjax in above folder for Redmine 6.0. I am nut fluent with writing RoR applications.

The original plugin is at https://www.redmine.org/plugins/redmine_latex_mathjax

My modification is at https://github.com/jwalkerbg/redmine_latex_mathjax.git


Replies (2)

RE: redmine_latex_mathjax for Redmine 6.0 - Added by Ivan Cenov 3 months ago

After I copied assets manually to /public/assets/plugin_assets/redmine_latex_mathjax, the plugin began to work.

How are the plugin assets copied - do they have code for this or some internal procedure in Redmine does this action?

RE: redmine_latex_mathjax for Redmine 6.0 - Added by Takashi Kato 19 days ago

I have confirmed that the plugin in my branch works on Redmine 6.0 and later, as well as on earlier versions, without the need to manually copy any assets.

Since Redmine 6.0, the Asset Pipeline feature is used for loading JavaScript and CSS (see #39111). This automatically adds a hash to the asset paths, improving caching efficiency.
While image paths within CSS are automatically converted to include this hash, this conversion doesn't apply to paths specified within JavaScript. Unfortunately, this plugin specifies font paths in JavaScript, which required a special modification to work correctly.

    (1-2/2)