Index: Singular/LIB/tropical.lib
===================================================================
--- Singular/LIB/tropical.lib	(revision a418d9fffbccc54b2388850e64bfc084cd0e61dc)
+++ Singular/LIB/tropical.lib	(revision a5bbb56085d44c9d5afaddeb51fc853641212f0c)
@@ -14,5 +14,5 @@
 - tropicalLifting will only work with LINUX and if in addition gfan is installed.
 @*- drawTropicalCurve and drawTropicalNewtonSubdivision will only display the
-@*  tropical curve with LINUX and if in addition latex and kghostview
+@*  tropical curve with LINUX and if in addition latex and xdg-open
 @*  are installed.
 @*- For tropicalLifting in the definition of the basering the parameter t
@@ -1678,5 +1678,5 @@
                /tmp/tropicalcurveNUMBER.ps, where NUMBER is a random four
                digit integer;
-               moreover it displays the tropical curve via kghostview;
+               moreover it displays the tropical curve via xdg-open;
                if you wish to remove all these files from /tmp,
                call the procedure cleanTmp
@@ -1685,5 +1685,5 @@
                if #[1] is the string 'max', then it is computed w.r.t. maximum
 @*           - if the last optional argument is 'onlytexfile' then only the
-               latex file is produced; this option should be used if kghostview
+               latex file is produced; this option should be used if xdg-utils
                is not installed on your system
 @*           - note that lattice points in the Newton subdivision which are
@@ -1778,4 +1778,16 @@
 \\setlength{\\textwidth}{170mm}
 
+\\makeatletter
+\\def\\old@comma{,}
+\\catcode`\\,=13
+\\def,{%
+  \\ifmmode%
+    \\old@comma\\discretionary{}{}{}%
+  \\else%
+    \\old@comma%
+  \\fi%
+\}
+\\makeatother
+
 \\begin{document}
    \\parindent0cm
@@ -1814,5 +1826,5 @@
     int rdnum=random(1000,9999);
     write(":w /tmp/tropicalcurve"+string(rdnum)+".tex",TEXBILD);
-    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 &");
+    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 &");
   }
   else
@@ -1828,5 +1840,5 @@
    poly f=t*(x3+y3+1)+1/t*(x2+y2+x+y+x2y+xy2)+1/t2*xy;
 // the command drawTropicalCurve(f) computes the graph of the tropical curve
-// given by f and displays a post script image, provided you have kghostview
+// given by f and displays a post script image, provided you have xdg-open
    drawTropicalCurve(f);
 // we can instead apply the procedure to a tropical polynomial and use "maximum"
@@ -1852,5 +1864,5 @@
             and /tmp/newtonsubdivisionNUMBER.ps, where NUMBER is a random
             four digit integer;
-            moreover it desplays the tropical curve defined by f via kghostview;
+            moreover it desplays the tropical curve defined by f via xdg-open;
             if you wish to remove all these files from /tmp, call the procedure
             cleanTmp;
@@ -1912,5 +1924,5 @@
   int rdnum=random(1000,9999);
   write(":w /tmp/newtonsubdivision"+string(rdnum)+".tex",TEXBILD);
-  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 &");
+  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 &");
 //  return(TEXBILD);
 }
@@ -1922,5 +1934,5 @@
    poly f=t*(x3+y3+1)+1/t*(x2+y2+x+y+x2y+xy2)+1/t2*xy;
 // the command drawTropicalCurve(f) computes the graph of the tropical curve
-// given by f and displays a post script image, provided you have kghostview
+// given by f and displays a post script image, provided you have xdg-open
    drawNewtonSubdivision(f);
 // we can instead apply the procedure to a tropical polynomial
@@ -2479,8 +2491,8 @@
 // conic[8] contains the latex code to draw the tropical conic and
 //          its tropicalised tangents; it can written in a file, processed and
-//          displayed via kghostview
+//          displayed via xdg-open
    write(":w /tmp/conic.tex",conic[8]);
    system("sh","cd /tmp; latex /tmp/conic.tex; dvips /tmp/conic.dvi -o;
-            kghostview conic.ps &");
+            xdg-open conic.ps &");
 // with an optional argument the same information for the dual conic is computed
 //         and saved in conic[9]
@@ -8191,5 +8203,5 @@
                /tmp/tropicalcurveNUMBER.ps, where NUMBER is a random four
                digit integer;
-               moreover it displays the tropical curve via kghostview;
+               moreover it displays the tropical curve via xdg-open;
                if you wish to remove all these files from /tmp,
                call the procedure cleanTmp
@@ -8198,5 +8210,5 @@
                if #[1] is the string 'max', then it is computed w.r.t. maximum
 @*           - if the last optional argument is 'onlytexfile' then only the
-               latex file is produced; this option should be used if kghostview
+               latex file is produced; this option should be used if xdg-open
                is not installed on your system
 @*           - note that lattice points in the Newton subdivision which are
@@ -8430,5 +8442,5 @@
     int rdnum=random(1000,9999);
     write(":w /tmp/tropicalcurve"+string(rdnum)+".tex",TEXBILD);
-    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 &");
+    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 &");
   }
   else
@@ -8445,5 +8457,5 @@
    poly f=x+y+1;
 // the command drawTropicalCurve(f) computes the graph of the tropical curve
-// given by f and displays a post script image, provided you have kghostview
+// given by f and displays a post script image, provided you have xdg-open
 // we can instead apply the procedure to a tropical polynomial and use "maximum"
    poly g=t3*(x7+y7+1)+1/t3*(x4+y4+x2+y2+x3y+xy3)+1/t21*x2y2;
