Skip to content
Snippets Groups Projects
Commit 8f9c0973 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

[Yrogirg] configurable latex formulas font size. Fixes #3986

parent d927d260
No related branches found
No related tags found
No related merge requests found
......@@ -250,6 +250,7 @@ class Config:
'max_conversation_lines': [opt_int, 500, _('Maximum number of lines that are printed in conversations. Oldest lines are cleared.')],
'attach_notifications_to_systray': [opt_bool, False, _('If True, notification windows from notification-daemon will be attached to systray icon.')],
'check_idle_every_foo_seconds': [opt_int, 2, _('Choose interval between 2 checks of idleness.')],
'latex_png_dpi': [opt_str, '108',_('Change the value to change the size of latex formulas displayed. The higher is larger.') ],
}
__options_per_key = {
......
......@@ -854,15 +854,8 @@ class ConversationTextview:
exitcode = p.wait()
if exitcode == 0:
convert_version = helpers.get_output_of_command(
'convert -version')[0].split()[2]
convert_version = [int(n) for n in convert_version.split('.')]
if convert_version > [6, 3, 4]:
# -alpha option was added in 6.3.5 release
alpha = ['-alpha', 'off']
else:
alpha = []
p = Popen(['convert'] + alpha + [tmpfile + '.ps', tmpfile + '.png'],
latex_png_dpi = gajim.config.get('latex_png_dpi')
p = Popen(['convert', '-background', 'white', '-flatten', '-density', latex_png_dpi, tmpfile + '.ps', tmpfile + '.png'],
cwd=gettempdir())
exitcode = p.wait()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment