Zim

Merge lp:~johannes-reinhardt/zim/fixes into lp:~jaap.karssenberg/zim/pyzim

Proposed by Johannes Reinhardt
Status: Merged
Approved by: Jaap Karssenberg
Approved revision: 238
Merged at revision: 284
Proposed branch: lp:~johannes-reinhardt/zim/fixes
Merge into: lp:~jaap.karssenberg/zim/pyzim
Diff against target: 59 lines (+8/-7)
3 files modified
data/templates/latex/Article.tex (+1/-1)
data/templates/latex/Report.tex (+1/-1)
zim/formats/latex.py (+6/-5)
To merge this branch: bzr merge lp:~johannes-reinhardt/zim/fixes
Reviewer Review Type Date Requested Status
Jaap Karssenberg Approve
Review via email: mp+29887@code.launchpad.net

Description of the change

Small fix for LaTeX export of formulae. LaTeX complains if there are empty lines, so we strip them away.

To post a comment you must log in.
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

From the diff it looks like there is a merge conflict left in this branch ?

-- Jaap

Revision history for this message
Johannes Reinhardt (johannes-reinhardt) wrote :

Indeed. Sorry, should be resolved now.

lp:~johannes-reinhardt/zim/fixes updated
238. By Johannes Reinhardt

merged trunk and resolved merge conflict

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/templates/latex/Article.tex'
2--- data/templates/latex/Article.tex 2010-03-08 19:15:39 +0000
3+++ data/templates/latex/Article.tex 2010-07-14 18:02:45 +0000
4@@ -6,7 +6,7 @@
5 \usepackage{hyperref}
6 \usepackage{wasysym}
7 \usepackage{graphicx}
8-\usepackage{ulem}
9+\usepackage[normalem]{ulem}
10
11 [% options.document_type = 'article' %]
12
13
14=== modified file 'data/templates/latex/Report.tex'
15--- data/templates/latex/Report.tex 2010-03-08 19:15:39 +0000
16+++ data/templates/latex/Report.tex 2010-07-14 18:02:45 +0000
17@@ -6,7 +6,7 @@
18 \usepackage{hyperref}
19 \usepackage{wasysym}
20 \usepackage{graphicx}
21-\usepackage{ulem}
22+\usepackage[normalem]{ulem}
23
24 [% options.document_type = 'report' %]
25
26
27=== modified file 'zim/formats/latex.py'
28--- zim/formats/latex.py 2010-06-30 20:35:51 +0000
29+++ zim/formats/latex.py 2010-07-14 18:02:45 +0000
30@@ -1,4 +1,6 @@
31-# TODO: Licence Header and Copyright
32+# -*- coding: utf-8 -*-
33+
34+# Copyright 2008 Johannes Reinhardt <jreinhardt@ist-dein-freund.de>
35
36 '''This modules handles export of LaTeX Code'''
37
38@@ -87,8 +89,8 @@
39 if not self.document_type in ('report', 'article','book'):
40 logger.warn('No document type set in template, assuming "report"')
41 self.document_type = 'report' # arbitrary default
42-
43- logger.info('used document type: %s'%self.document_type)
44+ else:
45+ logger.info('used document type: %s'%self.document_type)
46
47 output = TextBuffer()
48 self.dump_children(tree.getroot(), output)
49@@ -155,9 +157,8 @@
50 equri = self.linker.link(element.attrib['src'])
51 eqfid = File(url_decode(equri[:-4] + '.tex'))
52 output.append('\\begin{math}\n')
53- output.extend(eqfid.readlines())
54+ output.extend(eqfid.read().strip())
55 output.append('\n\\end{math}')
56- eqfid.close()
57 except:
58 logger.exception('Could not find latex equation:')
59 else: