Code Monkey home page Code Monkey logo

Comments (10)

davidpomerenke avatar davidpomerenke commented on August 22, 2024 2

Fixed this in #5, the first two commits. (The other ones have been added by Github automatically but are not relevant.) There is a problem with an oversized figure and there are lots of warnings thrown, but otherwise it works fine for me.

For a more alive project, check out scigen.js, a port to Javascript. In the browser it does not support the generation of figures, but in the console it should work fine -- see the example in the Readme. If you're running into issues there, I'm willing to fix them.

from scigen.

davidpomerenke avatar davidpomerenke commented on August 22, 2024 2

I also get the Possible attempt ... warnings, they are not a critical problem. make-latex.pl at line 236 just calls some external programs in order to compile the created Latex code. The segmentation fault is likely happening in one of these external programs (Latex, Bibtex, dvips).

system( "cp $class_files $tmp_dir; cd $tmp_dir; latex $tex_prefix; bibtex $tex_prefix; latex $tex_prefix; latex $tex_prefix; rm $class_files; " . 
	    "dvips $land -o $ps_file $dvi_file" )

You can use the --savedir flag as in ./make-latex.pl --savedir output-directory to just create the Latex, Bibtex etc. files without compiling and viewing them, and then compile them manually to PDF by whatever method you prefer. If it still doesn't work with MikTeX, maybe try the one from the code snippet above and see whether you can get some more specific error messages than just Segmentation fault (core dumped).

@davidpomerenke
Thanks for your help! I added the lib sentences according to your guidance. But I still meet the problem.

Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Segmentation fault (core dumped)
Segmentation fault (core dumped)
Segmentation fault (core dumped)
Segmentation fault (core dumped)
Segmentation fault (core dumped)
Couldn't latex nothing. at make-latex.pl line 236.

I use MikTeX

from scigen.

Qiustander avatar Qiustander commented on August 22, 2024 1

I also get the Possible attempt ... warnings, they are not a critical problem. make-latex.pl at line 236 just calls some external programs in order to compile the created Latex code. The segmentation fault is likely happening in one of these external programs (Latex, Bibtex, dvips).

system( "cp $class_files $tmp_dir; cd $tmp_dir; latex $tex_prefix; bibtex $tex_prefix; latex $tex_prefix; latex $tex_prefix; rm $class_files; " . 
	    "dvips $land -o $ps_file $dvi_file" )

You can use the --savedir flag as in ./make-latex.pl --savedir output-directory to just create the Latex, Bibtex etc. files without compiling and viewing them, and then compile them manually to PDF by whatever method you prefer. If it still doesn't work with MikTeX, maybe try the one from the code snippet above and see whether you can get some more specific error messages than just Segmentation fault (core dumped).

@davidpomerenke
Thanks for your help! I added the lib sentences according to your guidance. But I still meet the problem.

Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Segmentation fault (core dumped)
Segmentation fault (core dumped)
Segmentation fault (core dumped)
Segmentation fault (core dumped)
Segmentation fault (core dumped)
Couldn't latex nothing. at make-latex.pl line 236.

I use MikTeX

Thanks for your reply! After using --savedir flag, I successfully generate the .tex file, and then generate the .pdf file with Texstudio manually.

from scigen.

MiroslavVitkov avatar MiroslavVitkov commented on August 22, 2024

It's something to do with new perl versions. A solution is to add use lib "." in a couple of places:
https://stackoverflow.com/questions/62610663/how-to-execute-this-perl-repo

from scigen.

MiroslavVitkov avatar MiroslavVitkov commented on August 22, 2024

Sorry, didn't notice the question is visible only to me. Here's the relevant part:

The program worked for me on Ubuntu 20.04, perl version 5.30, after installing gv and changing make-latex.pl, make-graph.pl, and make-diagram.pl to include a use lib "." in the beginning of the script. (Note: I had already TeXLive 2020 installed) Running perl make-latex.pl then produces a paper which is displayed in gv – Håkon Hægland Jun 27 '20 at 14:43

Well, also for me under Arch.

from scigen.

Qiustander avatar Qiustander commented on August 22, 2024

Sorry, didn't notice the question is visible only to me. Here's the relevant part:

The program worked for me on Ubuntu 20.04, perl version 5.30, after installing gv and changing make-latex.pl, make-graph.pl, and make-diagram.pl to include a use lib "." in the beginning of the script. (Note: I had already TeXLive 2020 installed) Running perl make-latex.pl then produces a paper which is displayed in gv – Håkon Hægland Jun 27 '20 at 14:43

Well, also for me under Arch.

Hi I try your method but I still could not solve the problem under Ubuntu 18.04 and perl 5.26.1. Still " Can't not locate scigen.pm in @inc ..."

This is the error when I add use lib "." at the end of "use" sentences in all files. But if I add use lib "." at the beginning of the "use" sentences, the error information becomes " "use" not allowed in expression at make-latex.pl".

Do you have any suggestion?

from scigen.

MiroslavVitkov avatar MiroslavVitkov commented on August 22, 2024

from scigen.

Qiustander avatar Qiustander commented on August 22, 2024

Heya! Bad news: I know ZERO perl. More bad news: after the fix, the produced .ps files are damaged - readable but damaged. Unless someone takes up the project (and I doubt that) it's dead. WE have to learn computational linguistics. Live long and prosper! Miroslav

On Tue, 30 Mar 2021 at 10:44, Qiustander @.***> wrote: Sorry, didn't notice the question is visible only to me. Here's the relevant part: The program worked for me on Ubuntu 20.04, perl version 5.30, after installing gv and changing make-latex.pl, make-graph.pl, and make-diagram.pl to include a use lib "." in the beginning of the script. (Note: I had already TeXLive 2020 installed) Running perl make-latex.pl then produces a paper which is displayed in gv – Håkon Hægland Jun 27 '20 at 14:43 Well, also for me under Arch. Hi I try your method but I still could not solve the problem under Ubuntu 18.04 and perl 5.26.1. Still " Can't not locate scigen.pm in @inc https://github.com/inc ..." This is the error when I add use lib "." at the end of "use" sentences in all files. But if I add use lib "." at the beginning of the "use" sentences, the error information becomes " "use" not allowed in expression at make-latex.pl". Do you have any suggestion? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#7 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6GHBCWAMNVCP2J64WXDXLTGF6NJANCNFSM4X4FYY7Q .

Hi!

This is quite a sad news.

Thanks for your reply!

from scigen.

Qiustander avatar Qiustander commented on August 22, 2024

@davidpomerenke
Thanks for your help! I added the lib sentences according to your guidance. But I still meet the problem.

Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Possible attempt to put comments in qw() list at Autoformat.pm line 525.
Segmentation fault (core dumped)
Segmentation fault (core dumped)
Segmentation fault (core dumped)
Segmentation fault (core dumped)
Segmentation fault (core dumped)
Couldn't latex nothing. at make-latex.pl line 236.

I use MikTeX

from scigen.

rotoped avatar rotoped commented on August 22, 2024

Hi, I have scigen running successfully on ubuntu, but would like to run it on windows 10. Unfortunately perl keeps reporting that it can't write to the temporary directory. I have enabled full write permissions, but perl still can't write to C:\tmp. Please, do you have any ideas? If that's not possible I'll rather try David's scigen.js on windows :-).
Thank you for any ideas.
Here the cmd text:
C:\Strawberry\perl\lib\scigen-master>perl make-latex.pl
Possible attempt to put comments in qw() list at Autoformat.pm line 527.
Unescaped left brace in regex is passed through in regex; marked by <-- HERE in m/\section(*?){ <-- HERE (.)}/ at scigen.pm line 179.
Unescaped left brace in regex is passed through in regex; marked by <-- HERE in m/(\subsection){ <-- HERE (.
)}/ at scigen.pm line 186.
Unescaped left brace in regex is passed through in regex; marked by <-- HERE in m/(\slideheading){ <-- HERE (.)}/ at scigen.pm line 187.
Unescaped left brace in regex is passed through in regex; marked by <-- HERE in m/\title{ <-- HERE (.
)}/ at scigen.pm line 194.
Unescaped left brace in regex is passed through in regex; marked by <-- HERE in m/(.) = { <-- HERE (.)},/ at scigen.pm line 201.
The syntax of the command is incorrect.
Couldn't make C:/tmp/scitmp.9900 at make-latex.pl line 98.

from scigen.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.