After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 651175 - Script to export invoices to LaTeX
Script to export invoices to LaTeX
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Python Bindings
git-master
Other Linux
: Normal enhancement
: ---
Assigned To: Mark Jenkins
Mark Jenkins
Depends on:
Blocks:
 
 
Reported: 2011-05-26 17:48 UTC by Christoph Holtermann
Modified: 2018-06-29 22:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
against Revision 20689. --- Patch includes three new files : latex_invoices.py, rechnung.sty, Invoice.tex --- --- (27.13 KB, patch)
2011-05-26 17:48 UTC, Christoph Holtermann
rejected Details | Review
I just put this here to fulfill the legal requirements because i uncautiously posted a part of this package here. (21.00 KB, application/postscript)
2011-05-28 10:24 UTC, Christoph Holtermann
  Details
latex_invoices.py exports invoices to LaTeX. Invoice.tex is a template. (16.76 KB, patch)
2011-05-28 11:02 UTC, Christoph Holtermann
accepted-commit_now Details | Review

Description Christoph Holtermann 2011-05-26 17:48:38 UTC
Created attachment 188692 [details] [review]
against Revision 20689. --- Patch includes three new files : latex_invoices.py, rechnung.sty, Invoice.tex --- --- 

--- Patch includes three new files ! ---

latex_invoices.py exports data.lco. data.lco is imported into Invoice.tex.
Comment 1 Christoph Holtermann 2011-05-26 18:05:14 UTC
Exports an invoice to lco-file for use with LaTeX

The output file can be imported into KOMA-Script-letters.
This works primarily for germany. Internationalization welcome!

Additional files:

- Invoice.tex\n
Example template file. Should be modified according to personal needs.
- rechnung.sty\n
style file for invoices.

Usage :
\code latex_invoice file://testfile \endcode
will create file data.lco.
\code latex --output-format=pdf Invoice.tex \endcode
should run latex on file Invoice.tex and result in Invoice.pdf. Invoice.tex includes data.lco.
Additional information :
- http://www.uweziegenhagen.de/latex/documents/rechnung/rechnungen.pdf 
(german)
 
Credits to and ideas from

- Main function as proposed by Guido van Rossum
  at http://www.artima.com/weblogs/viewpost.jsp?thread=4829
- Invoice.tex is derived from\n
  scrlttr2.tex v0.3. (c) by Juergen Fenn <juergen.fenn@gmx.de>\n
  http://www.komascript.de/node/355\n
  english translation: ftp://ftp.dante.de/tex-archive/info/templates/fenn/scrlttr2en.tex
- rechnung.sty\n
  from M G Berberich (berberic@fmi.uni-passau.de) and Ulrich Sibiller (uli42@web.de)
  Ver3.10 from http://www.forwiss.uni-passau.de/~berberic/TeX/Rechnung/index.html
Comment 2 John Ralls 2011-05-26 18:39:53 UTC
Comment on attachment 188692 [details] [review]
against Revision 20689. --- Patch includes three new files : latex_invoices.py, rechnung.sty, Invoice.tex --- --- 

The copyright restrictions on rechnung.sty and invoice.tex mean that we can't include them in Gnucash. Sorry.

In fact, your posting here of rechnung.sty violates its distribution requirements, and you have put the Gnome foundation at risk of legal action.
Comment 3 Christian Stimming 2011-05-27 06:48:09 UTC
(In reply to comment #2)
> (From update of attachment 188692 [details] [review])
> The copyright restrictions on rechnung.sty and invoice.tex mean that we can't
> include them in Gnucash. Sorry.

Which restrictions on "Invoice.tex" do you mean? It has been renamed, so the only given requirement ("modified versions must not be redistributed under the same name") is already fulfilled.

Which restrictions on rechnung.sty do you mean? It says modified versions must not be redistributed under the same name, which means it must be renamed into some other file name. Once that is done, which other restriction is still applicable and a contradiction to the gnucash package?
Comment 4 Christoph Holtermann 2011-05-28 10:08:55 UTC
Sorry for that mistake. I had sent an email to the author of scrltr.tex and he was ok with that and as christian pointed out the change of name should suffice.

But i didn't really look at rechnung.sty and there i just realized that it's not ok to ditribute it this way. I will change the patch to not include it for i don't think that it's really useful to redistribute the whole package rechnung.dtx.

I just wanted to make things simple to use but i didn't take care for all parts.

Thanks for your attention.
Comment 5 Christoph Holtermann 2011-05-28 10:15:13 UTC
to christian :

rechnung.sty includes this :

IMPORTANT NOTICE:
+%% 
+%% For the copyright see the source file.
+%% 
+%% Any modified versions of this file must be renamed
+%% with new filenames distinct from rechnung.sty.
+%% 
+%% For distribution of the original source see the terms
+%% for copying and modification in the file rechnung.dtx.
+%% 
+%% This generated file may be distributed as long as the
+%% original source files, as listed above, are part of the
+%% same distribution. (The sources need not necessarily be
+%% in the same archive or directory.)
+%% File: rechnung.dtx Copyright (C) 1998 M G Berberich
+%% berberic@fmi.uni-passau.de

and i clearly would have violated that.

While my modification of scrlttr2.tex is ok, isn't it ?

+% Invoice.tex v0.1 by Christoph Holtermann (c.holtermann@gmx.de)
+%
+% modified from 
+% scrlttr2.tex v0.3. (c) by Juergen Fenn <juergen.fenn@gmx.de>
+% Template for a letter to be typeset with scrlttr2.cls from KOMA-Script.
+% Latest version of the LaTeX Project Public License is applicable. 
+% File may not be modified and redistributed under the same name 
+% without the author's prior consent.

For rechnung.sty it's easy to just say users should get it somewhere else, while Invoice.tex is modified.
Comment 6 Christoph Holtermann 2011-05-28 10:16:44 UTC
(In reply to comment #2)
> (From update of attachment 188692 [details] [review])
> The copyright restrictions on rechnung.sty and invoice.tex mean that we can't
> include them in Gnucash. Sorry.
> 
> In fact, your posting here of rechnung.sty violates its distribution
> requirements, and you have put the Gnome foundation at risk of legal action.

you mean already posting the patch here ? then i would need to post the dtx file here as well and things should be ok ?
Comment 7 Christoph Holtermann 2011-05-28 10:24:37 UTC
Created attachment 188802 [details]
I just put this here to fulfill the legal requirements because i uncautiously posted a part of this package here.

I just put this here to fulfill the legal requirements because i uncautiously posted a part of this package here. Now the full package is on BugZilla and it should be alright.

-- To the GnuCash developers : Please do not put any of the previous files into GnuCash! I will post a patch without rechnung.sty.
Comment 8 Christoph Holtermann 2011-05-28 10:37:49 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 188692 [details] [review] [details])
> > The copyright restrictions on rechnung.sty and invoice.tex mean that we can't
> > include them in Gnucash. Sorry.
> 
> Which restrictions on "Invoice.tex" do you mean? It has been renamed, so the
> only given requirement ("modified versions must not be redistributed under the
> same name") is already fulfilled.
> 
> Which restrictions on rechnung.sty do you mean? It says modified versions must
> not be redistributed under the same name, which means it must be renamed into
> some other file name. Once that is done, which other restriction is still
> applicable and a contradiction to the gnucash package?

As i understand it now rechnung.dtx is the source and rechnung.sty is created out of it by "latex rechnung.ins".

rechnung.ins says:
+%% This generated file may be distributed as long as the
+%% original source files, as listed above, are part of the
+%% same distribution.

so as i didn't put rechnung.dtx(and not rechnung.ins) i violated that.
Comment 9 Christoph Holtermann 2011-05-28 10:40:40 UTC
(In reply to comment #4)
> Sorry for that mistake. I had sent an email to the author of scrltr.tex and he
> was ok with that ...
By the way - he asked me to write an article in the german TeX-magazine "Die TeXnische Komödie" about my approach ;-)
Comment 10 Christoph Holtermann 2011-05-28 11:02:59 UTC
Created attachment 188804 [details] [review]
latex_invoices.py exports invoices to LaTeX. Invoice.tex is a template.

Patch against svn rev20713.

--including two new files--

latex_invoices.py - exports invoices to file data.lco
Invoice.tex - KOMA-Script letter template for LaTeX which imports data.lco and results in Invoice.pdf.
Comment 11 Geert Janssens 2011-08-24 08:44:09 UTC
Comment on attachment 188804 [details] [review]
latex_invoices.py exports invoices to LaTeX. Invoice.tex is a template.

Shouldn't these two new files be added to src/optional/python-bindings/Makefile.am as well to have them added to the distribution tarball ?
Comment 12 Geert Janssens 2011-09-11 14:54:50 UTC
Comment on attachment 188804 [details] [review]
latex_invoices.py exports invoices to LaTeX. Invoice.tex is a template.

Committed as r21255, together with my suggested inclusion in Makefile.am.
Thank you for your patch !
Comment 13 John Ralls 2018-06-29 22:58:19 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=651175. Please update any external references or bookmarks.