Changeset a5bbb5 in git for Singular/LIB/tropical.lib


Ignore:
Timestamp:
Jan 9, 2017, 2:02:30 PM (7 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
b8b76ef3092b3162aa763b4c5b7705ceab2203fa
Parents:
a418d9fffbccc54b2388850e64bfc084cd0e61dcd29e550951bb89f260d4afb0da084c6a1a83e101
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2017-01-09 14:02:30+01:00
git-committer:
GitHub <noreply@github.com>2017-01-09 14:02:30+01:00
Message:
Merge pull request #810 from YueRen/tropicallib

chg: kghostview -> xdg-open + line breaks after commata in tex file
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/tropical.lib

    ra418d9 ra5bbb5  
    1414- tropicalLifting will only work with LINUX and if in addition gfan is installed.
    1515@*- drawTropicalCurve and drawTropicalNewtonSubdivision will only display the
    16 @*  tropical curve with LINUX and if in addition latex and kghostview
     16@*  tropical curve with LINUX and if in addition latex and xdg-open
    1717@*  are installed.
    1818@*- For tropicalLifting in the definition of the basering the parameter t
     
    16781678               /tmp/tropicalcurveNUMBER.ps, where NUMBER is a random four
    16791679               digit integer;
    1680                moreover it displays the tropical curve via kghostview;
     1680               moreover it displays the tropical curve via xdg-open;
    16811681               if you wish to remove all these files from /tmp,
    16821682               call the procedure cleanTmp
     
    16851685               if #[1] is the string 'max', then it is computed w.r.t. maximum
    16861686@*           - if the last optional argument is 'onlytexfile' then only the
    1687                latex file is produced; this option should be used if kghostview
     1687               latex file is produced; this option should be used if xdg-utils
    16881688               is not installed on your system
    16891689@*           - note that lattice points in the Newton subdivision which are
     
    17781778\\setlength{\\textwidth}{170mm}
    17791779
     1780\\makeatletter
     1781\\def\\old@comma{,}
     1782\\catcode`\\,=13
     1783\\def,{%
     1784  \\ifmmode%
     1785    \\old@comma\\discretionary{}{}{}%
     1786  \\else%
     1787    \\old@comma%
     1788  \\fi%
     1789\}
     1790\\makeatother
     1791
    17801792\\begin{document}
    17811793   \\parindent0cm
     
    18141826    int rdnum=random(1000,9999);
    18151827    write(":w /tmp/tropicalcurve"+string(rdnum)+".tex",TEXBILD);
    1816     system("sh","cd /tmp; latex /tmp/tropicalcurve"+string(rdnum)+".tex; dvips /tmp/tropicalcurve"+string(rdnum)+".dvi -o; command rm tropicalcurve"+string(rdnum)+".log;  command rm tropicalcurve"+string(rdnum)+".aux;  command rm tropicalcurve"+string(rdnum)+".ps?;  command rm tropicalcurve"+string(rdnum)+".dvi; kghostview tropicalcurve"+string(rdnum)+".ps &");
     1828    system("sh","cd /tmp; latex /tmp/tropicalcurve"+string(rdnum)+".tex; dvips /tmp/tropicalcurve"+string(rdnum)+".dvi -o; command rm tropicalcurve"+string(rdnum)+".log;  command rm tropicalcurve"+string(rdnum)+".aux;  command rm tropicalcurve"+string(rdnum)+".ps?;  command rm tropicalcurve"+string(rdnum)+".dvi; xdg-open tropicalcurve"+string(rdnum)+".ps &");
    18171829  }
    18181830  else
     
    18281840   poly f=t*(x3+y3+1)+1/t*(x2+y2+x+y+x2y+xy2)+1/t2*xy;
    18291841// the command drawTropicalCurve(f) computes the graph of the tropical curve
    1830 // given by f and displays a post script image, provided you have kghostview
     1842// given by f and displays a post script image, provided you have xdg-open
    18311843   drawTropicalCurve(f);
    18321844// we can instead apply the procedure to a tropical polynomial and use "maximum"
     
    18521864            and /tmp/newtonsubdivisionNUMBER.ps, where NUMBER is a random
    18531865            four digit integer;
    1854             moreover it desplays the tropical curve defined by f via kghostview;
     1866            moreover it desplays the tropical curve defined by f via xdg-open;
    18551867            if you wish to remove all these files from /tmp, call the procedure
    18561868            cleanTmp;
     
    19121924  int rdnum=random(1000,9999);
    19131925  write(":w /tmp/newtonsubdivision"+string(rdnum)+".tex",TEXBILD);
    1914   system("sh","cd /tmp; latex /tmp/newtonsubdivision"+string(rdnum)+".tex; dvips /tmp/newtonsubdivision"+string(rdnum)+".dvi -o; command rm newtonsubdivision"+string(rdnum)+".log;  command rm newtonsubdivision"+string(rdnum)+".aux;  command rm newtonsubdivision"+string(rdnum)+".ps?;  command rm newtonsubdivision"+string(rdnum)+".dvi; kghostview newtonsubdivision"+string(rdnum)+".ps &");
     1926  system("sh","cd /tmp; latex /tmp/newtonsubdivision"+string(rdnum)+".tex; dvips /tmp/newtonsubdivision"+string(rdnum)+".dvi -o; command rm newtonsubdivision"+string(rdnum)+".log;  command rm newtonsubdivision"+string(rdnum)+".aux;  command rm newtonsubdivision"+string(rdnum)+".ps?;  command rm newtonsubdivision"+string(rdnum)+".dvi; xdg-open newtonsubdivision"+string(rdnum)+".ps &");
    19151927//  return(TEXBILD);
    19161928}
     
    19221934   poly f=t*(x3+y3+1)+1/t*(x2+y2+x+y+x2y+xy2)+1/t2*xy;
    19231935// the command drawTropicalCurve(f) computes the graph of the tropical curve
    1924 // given by f and displays a post script image, provided you have kghostview
     1936// given by f and displays a post script image, provided you have xdg-open
    19251937   drawNewtonSubdivision(f);
    19261938// we can instead apply the procedure to a tropical polynomial
     
    24792491// conic[8] contains the latex code to draw the tropical conic and
    24802492//          its tropicalised tangents; it can written in a file, processed and
    2481 //          displayed via kghostview
     2493//          displayed via xdg-open
    24822494   write(":w /tmp/conic.tex",conic[8]);
    24832495   system("sh","cd /tmp; latex /tmp/conic.tex; dvips /tmp/conic.dvi -o;
    2484             kghostview conic.ps &");
     2496            xdg-open conic.ps &");
    24852497// with an optional argument the same information for the dual conic is computed
    24862498//         and saved in conic[9]
     
    81918203               /tmp/tropicalcurveNUMBER.ps, where NUMBER is a random four
    81928204               digit integer;
    8193                moreover it displays the tropical curve via kghostview;
     8205               moreover it displays the tropical curve via xdg-open;
    81948206               if you wish to remove all these files from /tmp,
    81958207               call the procedure cleanTmp
     
    81988210               if #[1] is the string 'max', then it is computed w.r.t. maximum
    81998211@*           - if the last optional argument is 'onlytexfile' then only the
    8200                latex file is produced; this option should be used if kghostview
     8212               latex file is produced; this option should be used if xdg-open
    82018213               is not installed on your system
    82028214@*           - note that lattice points in the Newton subdivision which are
     
    84308442    int rdnum=random(1000,9999);
    84318443    write(":w /tmp/tropicalcurve"+string(rdnum)+".tex",TEXBILD);
    8432     system("sh","cd /tmp; latex /tmp/tropicalcurve"+string(rdnum)+".tex; dvips /tmp/tropicalcurve"+string(rdnum)+".dvi -o; command rm tropicalcurve"+string(rdnum)+".log;  command rm tropicalcurve"+string(rdnum)+".aux;  command rm tropicalcurve"+string(rdnum)+".ps?;  command rm tropicalcurve"+string(rdnum)+".dvi; kghostview tropicalcurve"+string(rdnum)+".ps &");
     8444    system("sh","cd /tmp; latex /tmp/tropicalcurve"+string(rdnum)+".tex; dvips /tmp/tropicalcurve"+string(rdnum)+".dvi -o; command rm tropicalcurve"+string(rdnum)+".log;  command rm tropicalcurve"+string(rdnum)+".aux;  command rm tropicalcurve"+string(rdnum)+".ps?;  command rm tropicalcurve"+string(rdnum)+".dvi; xdg-open tropicalcurve"+string(rdnum)+".ps &");
    84338445  }
    84348446  else
     
    84458457   poly f=x+y+1;
    84468458// the command drawTropicalCurve(f) computes the graph of the tropical curve
    8447 // given by f and displays a post script image, provided you have kghostview
     8459// given by f and displays a post script image, provided you have xdg-open
    84488460// we can instead apply the procedure to a tropical polynomial and use "maximum"
    84498461   poly g=t3*(x7+y7+1)+1/t3*(x4+y4+x2+y2+x3y+xy3)+1/t21*x2y2;
Note: See TracChangeset for help on using the changeset viewer.