Skip to content

Commit

Permalink
Matrices will now render correct parenthesis/brackets, curly braces a…
Browse files Browse the repository at this point in the history
…re not implemented yet, add documentation to Plugin readme, add pandoc_exec configuration to calibre plugin
  • Loading branch information
Sevyls committed Mar 22, 2015
1 parent ea6b919 commit f0ca587
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
12 changes: 10 additions & 2 deletions calibre-plugin/src/calibre_plugins/latexformulas_input/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,17 @@ def convert(self, stream, options, file_ext, log, accelerators):
# call latex2mobi with markup output only
from subprocess import check_output, STDOUT, CalledProcessError

args = [self.java_exec, '-jar', os.path.join(self.plugin_dir, JAR_FILENAME), '-i', stream.name,
'-n', '-o', dest_dir]

from calibre_plugins.latexformulas_input.config import prefs

if prefs['pandoc_exec'] != None and prefs['pandoc_exec'] != '':
args.append('-p')
args.append(prefs['pandoc_exec'])

try:
log.debug(check_output([self.java_exec, '-jar', os.path.join(self.plugin_dir, JAR_FILENAME), '-i', stream.name,
'-n', '-o', dest_dir], stderr=STDOUT)) # TODO pandoc exec argument if configured
log.debug(check_output(args, stderr=STDOUT))
except CalledProcessError as e:
log.debug(e.returncode)
log.debug(e.cmd)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
package at.ac.tuwien.ims.latex2mobiformulaconv.app;

import at.ac.tuwien.ims.latex2mobiformulaconv.converter.Converter;
import at.ac.tuwien.ims.latex2mobiformulaconv.converter.html2mobi.AmazonHtmlToMobiConverter;
import at.ac.tuwien.ims.latex2mobiformulaconv.converter.html2mobi.HtmlToMobiConverter;
import at.ac.tuwien.ims.latex2mobiformulaconv.converter.latex2html.LatexToHtmlConverter;
import at.ac.tuwien.ims.latex2mobiformulaconv.converter.latex2html.PandocLatexToHtmlConverter;
import at.ac.tuwien.ims.latex2mobiformulaconv.converter.mathml2html.DOMFormulaConverter;
import at.ac.tuwien.ims.latex2mobiformulaconv.converter.mathml2html.FormulaConverter;
import at.ac.tuwien.ims.latex2mobiformulaconv.utils.WorkingDirectoryResolver;

import org.apache.commons.cli.*;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;
Expand Down

0 comments on commit f0ca587

Please sign in to comment.