rem: fprintf (out, "p{3cm}c");
add: colwidth = 27.7 / ((float) (nb_colonnes / 2) + 1 ); fprintf ( out, "p{%fcm}", colwidth); for (i = 0 ; i < nb_colonnes/2 ; i++) { fprintf ( out, "p{%fcm}p{1pt}", colwidth ); } fprintf ( out, "}" );
context: gint latex_initialise (GSList * opes_selectionnees){  int i;  out = fopen ("toto.tex", "w");  if (! out)    {      fprintf ( stderr, _("Cannot open file '%s': %s\n"), "toto.tex", 		strerror(errno) );      return FALSE;     }  fprintf (out, 	   "\\documentclass{article}\n\n"	   "\\usepackage{a4}\n"	   "\\usepackage[utf8]{inputenc}\n"	   "\\usepackage{eurosym}\n"	   "\\usepackage{landscape}\n"	   "\\usepackage{longtable}\n"	   "\\begin{document}\n\n"	   "\\begin{longtable}[l]{");  for (i = 1 ; i < nb_colonnes ; i++)    {      fprintf (out, "p{3cm}c");    }  fprintf (out, "p{3cm}}\n");  return 1;}