Feature Request #167
Latex plugin for Redmine
| Status: | Closed | Start date: | 2009-06-07 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 100% |
||
| Category: | - | Spent time: | 14.00 hours | |
| Target version: | - | Estimated time: | 16.00 hours | |
| Branch: |
Description
From Nils: Could we install this latex-plug in for the redmine wikis? It would be the easiest way to include mathematical equations in the wikis
History
Updated by Trond Lossius over 2 years ago
I have installed and tested the plugin on my own computer. I got problems due to the name of the plugin that involves a hyphen. This has been reported to the plugin developer, and I'll check back later to see if he respons to it.
Updated by Yoann Rousseau over 2 years ago
Trond Lossius wrote:
I got problems due to the name of the plugin that involves a hyphen.
I have downloaded and tested this plugin too. I also got problems with the name, but I managed to solve it. When I have installed this plugin, I renamed it with the following name : redmine-wiki_latex_plugin
The error was something like this :
[...] plugin wiki_latex_plugin does not exist [...]
It concerned the following file :
$(REDMINE_ROOT)/vendor/plugins/redmine-wiki_latex_plugin/app/views/wiki_latex/macro_inline.html.erb
Line 3, we can see the following code :
<%= stylesheet_link_tag "wiki_latex.css", :plugin => "wiki_latex_plugin", :media => :all %>
The solution was to replace
:plugin => "wiki_latex_plugin"
with
:plugin => "redmine-wiki_latex_plugin"
After this modification, the plugin was recognized.
It is possible that while using the plugin, some formulas aren't interpreted, typically those involving braces. To solve this problem, look at this : http://www.redmine.org/issues/3061
Updated by Trond Lossius over 2 years ago
- File formatter.rb added
- % Done changed from 0 to 40
Thanks a lot, Yoann.
This definitively got me further. I have the plugin installed on the server, and I have the required latex, dvips, and convert (from ImageMagick) installed as well.
Furthermore I have altered
$(REDMINE_ROOT)/vendor/plugins/redmine-wiki_latex_plugin/app/views/wiki_latex/macro_inline.html.erb
as supposed to. I have also modified
$(REDMINE_ROOT)/lib/redmine/wiki_formatting/textile/formatter.rb
as discussed here. Finally I have migrated the production database and restarted the application.
I don't get any error messages any longer, but I still have the same issues that you had the other day: I don't obtain the desired result. Instead the formula is simply printed without being interpreted.
The redmine site that I'm currently testing this with is:
Would you be kind to take a look at the formatter.rb file to see if I might have mistyped anything?
Thanks!
Trond
Updated by Trond Lossius almost 2 years ago
Test:
Updated by Trond Lossius almost 2 years ago
Test 2
Updated by Trond Lossius almost 2 years ago
Test 3 - multiline equation:
{{latex(
\begin{equation}
\sum_{i=1}^k c_i
\end{equation}
)}}
Updated by Trond Lossius almost 2 years ago
- Status changed from New to Closed
- % Done changed from 40 to 100
Update - Latex now works:
{{latex(
\begin{equation}
\sum_{i=1}^k c_i
\end{equation}
)}}