Copyright status of doc/fr

Messages in english

Modérateur : xcasadmin

Répondre
infinity0
Messages : 36
Inscription : dim. févr. 05, 2017 5:46 pm

Copyright status of doc/fr

Message par infinity0 » lun. févr. 06, 2017 4:11 pm

Hi, in version 1.2.3-21 the README says
The French documentation is *not* released under the GPL. It is (c)
by Renee de Graeve. It can be freely distributed for non commercial purpose.
However, there are several files which do not list Renee de Graeve as an author, for example doc/fr/algo.tex which only has

\author{B. Parisse\\Institut Fourier\\UMR 5582 du CNRS

I am packaging giac for Debian which may only include licenses that allow commercial usage. Is there any part of `doc/fr` that I can use in Debian, or should I exclude all of it?

parisse
Messages : 5740
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Copyright status of doc/fr

Message par parisse » mar. févr. 07, 2017 6:56 am

Hi,
algo.tex is fine to be redistributed. Note that it requires giacfr.tex to be compiled, and that the compilation with hevea to interactive HTML5 requires giac.js to be in the same directory (this should be done by make install).

infinity0
Messages : 36
Inscription : dim. févr. 05, 2017 5:46 pm

Re: Copyright status of doc/fr

Message par infinity0 » mer. févr. 08, 2017 5:46 pm

Thanks, yes I think have the basic compilation working - I can produce algo.tex and algo.pdf by running `make install`.

However the pdf does not contain diagrams. For example, the pre-built algo.pdf inside giac-1.2.3.tar.bz2 contains a graph of a exp function on page 19 (2.3.1 Analyse numérique), after "plotarea(exp(-x^2),x=0..1.0,5,trapezes)". But if I delete this and re-build it myself, the resulting algo.pdf contains no such diagrams. If I look in giacfr.tex I can see:

Code : Tout sélectionner

\newcommand{\giacinput}[2][style="width:400px;height:20px;font-size:large"]{
\ifhevea
[.. some HTML/JS code ..]
\else
\lstinline@#2@
\fi
}
so it seems that diagrams are not supposed to be generated, but then I don't understand where they come from, in the pre-built algo.pdf.

parisse
Messages : 5740
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Copyright status of doc/fr

Message par parisse » mer. févr. 08, 2017 6:41 pm

You must compile algo.tex with icas (the commandline version of Xcas) to generate the 2d pictures. icas will detect all the \giac* commands, make the computations, and create an auxiliary tex file that will be compiled with pdflatex. In order to compile with icas, you must have hevea installed, because icas also calls hevea to output HTML5.
This is still experimental, I'm compiling algo.tex in another directory and update the 3 files simultaneously (tex, html. pdf).

infinity0
Messages : 36
Inscription : dim. févr. 05, 2017 5:46 pm

Re: Copyright status of doc/fr

Message par infinity0 » mer. févr. 08, 2017 10:52 pm

Thanks! That seems to work, I get algo.pdf with the correct images.
[..]
File algo_.tex created, now running hevea in background and pgiac algo_.tex
Then I will run pdflatex algo_
For HTML5 output, you can run
hevea -fix algo
[..]
However, the "running hevea in background" part makes it difficult to run inside an automated script (which we need for Debian). Is there a way to run this in the foreground? Or to disable this part completely, so I can run `hevea -fix algo` separately afterwards.

parisse
Messages : 5740
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Copyright status of doc/fr

Message par parisse » jeu. févr. 09, 2017 6:53 am

Yes, line 498 of icas.cc remove +" &" and let me know if it would work.

infinity0
Messages : 36
Inscription : dim. févr. 05, 2017 5:46 pm

Re: Copyright status of doc/fr

Message par infinity0 » jeu. févr. 09, 2017 9:56 pm

Actually, I think it would be more robust to remove it entirely, and add algo.stamp to Makefile.am instead - what do you think?

I'm using this patch, and it works well for me.

- add algo.stamp to HTML_STAMPS (this eventually calls hevea -fix)
- add targets for giacfr.tex and algo.pdf (optionally using XVFB_RUN for headless buildbots)
- build PDF_LOCAL HTML_STAMPS before all-local instead of before install-data-local
- remove calls to hevea -fix from icas.cc

Code : Tout sélectionner

diff -ru giac-1.2.3-orig/doc/fr/Makefile.am giac-1.2.3/doc/fr/Makefile.am
--- giac-1.2.3-orig/doc/fr/Makefile.am	2016-09-22 13:36:57.000000000 +0200
+++ giac-1.2.3/doc/fr/Makefile.am	2017-02-09 17:16:22.176661424 +0100
@@ -13,7 +13,7 @@
 HTML_DIRS_LOCAL = casrouge castor cascmd_fr casgeo cassim tutoriel \
 		  casinter casexo cascas
 
-HTML_STAMPS = casrouge.stamp castor.stamp cascmd_fr.stamp casgeo.stamp \
+HTML_STAMPS = algo.stamp casrouge.stamp castor.stamp cascmd_fr.stamp casgeo.stamp \
 	      cassim.stamp tutoriel.stamp casinter.stamp casexo.stamp \
 	      cascas.stamp
 
@@ -32,6 +32,14 @@
 thelangdocdir = $(docdir)/$(the_LANG)
 dist_thelangdoc_DATA = html_mall html_mtt html_vall xcasmenu xcasex keywords
 
+giacfr.tex: ../giacfr.tex
+	cp "$<" "$@"
+
+# install xvfb-run and set this to "xvfb-run" to run "headless" (without a real display)
+XVFB_RUN =
+algo.pdf: algo.tex giacfr.tex ../../src/icas
+	$(XVFB_RUN) ../../src/icas "$<"
+
 html-local: $(HTML_STAMPS)
 pdf-local: $(PDF_LOCAL)
 dvi-local: $(DVI_LOCAL)
@@ -47,7 +55,9 @@
 $(srcdir)/casexo: casexo.stamp
 $(srcdir)/cascas: cascas.stamp
 
-install-data-local: $(HTML_STAMPS) $(PDF_LOCAL) 
+all-local: $(PDF_LOCAL) $(HTML_STAMPS)
+
+install-data-local:
 	$(install_sh) -d $(DESTDIR)$(prefix)/share/giac/doc/$(the_LANG)
 	$(INSTALL_DATA) $(PDF_LOCAL) $(DESTDIR)$(prefix)/share/giac/doc/$(the_LANG)
 #	$(INSTALL_DATA) $(PS_LOCAL) $(DESTDIR)$(prefix)/share/giac/doc/$(the_LANG)
diff -ru giac-1.2.3-orig/src/icas.cc giac-1.2.3/src/icas.cc
--- giac-1.2.3-orig/src/icas.cc	2016-12-19 17:32:08.000000000 +0100
+++ giac-1.2.3/src/icas.cc	2017-02-09 17:12:14.167621141 +0100
@@ -494,10 +494,8 @@
 	if (pos>=0 && pos<ss){
 	  out << s << endl;
 	  out.close();
-	  COUT << "File " << outfile << " created, now running hevea in background and pgiac " << outfile << endl << "Then I will run pdflatex " << giac::remove_extension(outfile) << endl << "For HTML5 output, you can run\nhevea -fix " << infile_ << endl;
-	  std::string cmd="hevea -fix "+infile_+" &";
-	  system(cmd.c_str());
-	  cmd="makeindex "+giac::remove_extension(outfile);
+	  COUT << "File " << outfile << " created, now running pgiac " << outfile << endl << "Then I will run pdflatex " << giac::remove_extension(outfile) << endl << "For HTML5 output, you can run\nhevea -fix " << infile_ << endl;
+	  std::string cmd="makeindex "+giac::remove_extension(outfile);
 	  system(cmd.c_str());
 	  cmd=("pdflatex "+giac::remove_extension(outfile)+" && mv "+giac::remove_extension(outfile)+".pdf "+infile_+".pdf");
 	  COUT << cmd << endl;
@@ -705,10 +703,8 @@
 	if (pos>=0 && pos<ss){
 	  out << s << endl;
 	  out.close();
-	  COUT << "File " << outfile << " created, now running hevea in background and pgiac " << outfile << endl << "Then I will run pdflatex " << giac::remove_extension(outfile) << endl << "For HTML5 output, you can run\nhevea -fix " << giac::remove_extension(infile) << endl;
-	  std::string cmd="hevea -fix "+giac::remove_extension(infile)+" &";
-	  system(cmd.c_str());
-	  cmd=("pgiac "+outfile+" && pdflatex "+giac::remove_extension(outfile)+" && mv "+giac::remove_extension(outfile)+".pdf "+giac::remove_extension(infile)+".pdf");
+	  COUT << "File " << outfile << " created, now running pgiac " << outfile << endl << "Then I will run pdflatex " << giac::remove_extension(outfile) << endl << "For HTML5 output, you can run\nhevea -fix " << giac::remove_extension(infile) << endl;
+	  std::string cmd=("pgiac "+outfile+" && pdflatex "+giac::remove_extension(outfile)+" && mv "+giac::remove_extension(outfile)+".pdf "+giac::remove_extension(infile)+".pdf");
 	  COUT << cmd << endl;
 	  system(cmd.c_str());
 	  return;

parisse
Messages : 5740
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Copyright status of doc/fr

Message par parisse » ven. févr. 10, 2017 6:58 am

I don't want to remove the call to hevea from icas.cc because I want to have a single command to build both the PDF and HTML5. I think it's better to keep the tex in the distribution as reference but consider the PDF and HTML like source files.

parisse
Messages : 5740
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Copyright status of doc/fr

Message par parisse » lun. févr. 13, 2017 10:06 am

I will add a --pdf flag, if used at the end of the icas commandline, then hevea will not be called.

infinity0
Messages : 36
Inscription : dim. févr. 05, 2017 5:46 pm

Re: Copyright status of doc/fr

Message par infinity0 » mer. févr. 22, 2017 1:58 pm

Thank you! I also tried removing just the "&" and this also works fine. Both options are good. :)

libgiac and xcas are now in Debian properly: https://packages.debian.org/source/sid/giac

You can look at the file lists here: https://packages.debian.org/sid/amd64/xcas/filelist

and in this second URL you can also replace "amd64" with another architecture, or "xcas" with {libgiac0, libgiac-dev, giac-doc} to view the other packages.

Let me know if I should fix anything :)

parisse
Messages : 5740
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Copyright status of doc/fr

Message par parisse » mer. févr. 22, 2017 3:55 pm

Thank you for packaging giac!
I think I will make a small modification in the xcas UI so that French users can easily install the non-free French documentation.

Répondre