diff --git a/admin/survey/export/latexclasses/class.LatexAnalysisElement.php b/admin/survey/export/latexclasses/class.LatexAnalysisElement.php index 2b6f4f5b7..c71f6778e 100644 --- a/admin/survey/export/latexclasses/class.LatexAnalysisElement.php +++ b/admin/survey/export/latexclasses/class.LatexAnalysisElement.php @@ -925,7 +925,12 @@ class LatexAnalysisElement{ $text = str_replace('^','\textasciicircum{} ',$text); //$text = str_replace('_','\_ ',$text); $text = str_replace('_','\_',$text); - $text = str_replace('~','\textasciitilde{} ',$text); + $text = str_replace('~','\textasciitilde{} ',$text); + if(strpos($text, '&')){ //ce je prisotno v besedilu &' + $text = str_replace('&','\& ',$text); + }else{ + $text = str_replace('&','\& ',$text); + } $andSymbolPresent = 0; $posAndSymbolPresent = strpos($text,'&'); diff --git a/admin/survey/export/latexclasses/class.LatexDocument.php b/admin/survey/export/latexclasses/class.LatexDocument.php index 7dd3f0006..ffce72475 100644 --- a/admin/survey/export/latexclasses/class.LatexDocument.php +++ b/admin/survey/export/latexclasses/class.LatexDocument.php @@ -1364,8 +1364,11 @@ class LatexDocument{ $text = str_replace('^','\textasciicircum{} ',$text); $text = str_replace('_','\_ ',$text); $text = str_replace('~','\textasciitilde{} ',$text); - $text = str_replace('&','\&',$text); - $text = str_replace('&','\&',$text); + if(strpos($text, '&')){ //ce je prisotno v besedilu &' + $text = str_replace('&','\& ',$text); + }else{ + $text = str_replace('&','\& ',$text); + } $text = str_replace(' ','~',$text); //$text = str_replace('<','\textless ',$text); $text = str_replace('<',' \textless ',$text); diff --git a/admin/survey/export/latexclasses/class.LatexSurveyElement.php b/admin/survey/export/latexclasses/class.LatexSurveyElement.php index 1dc3493b8..e82284bb9 100644 --- a/admin/survey/export/latexclasses/class.LatexSurveyElement.php +++ b/admin/survey/export/latexclasses/class.LatexSurveyElement.php @@ -898,9 +898,12 @@ class LatexSurveyElement{ $text = str_replace('€','\euro',$text); $text = str_replace('^','\textasciicircum{} ',$text); $text = str_replace('_','\_ ',$text); - $text = str_replace('~','\textasciitilde{} ',$text); - $text = str_replace('&','\&',$text); - $text = str_replace('&','\&',$text); + $text = str_replace('~','\textasciitilde{} ',$text); + if(strpos($text, '&')){ //ce je prisotno v besedilu &' + $text = str_replace('&','\& ',$text); + }else{ + $text = str_replace('&','\& ',$text); + } $text = str_replace(' ','~',$text); //$text = str_replace('<','\textless ',$text); $text = str_replace('<',' \textless ',$text); @@ -2172,10 +2175,12 @@ class LatexSurveyElement{ $loop_id = $loop_id_raw; #za pridobitev stevila vrstic - //echo "SELECT id, naslov, naslov2, variable, other FROM srv_vrednost WHERE spr_id='".$spremenljivke['id']."' ORDER BY vrstni_red"; + //echo "SELECT id, naslov, naslov2, variable, other FROM srv_vrednost WHERE spr_id='".$spremenljivke['id']."' ORDER BY vrstni_red
"; $sqlVrednostiKombo = sisplet_query("SELECT id, naslov, naslov2, variable, other FROM srv_vrednost WHERE spr_id='".$spremenljivke['id']."' ORDER BY vrstni_red"); $numRowsSql = mysqli_num_rows($sqlVrednostiKombo); //echo $numRowsSql."
"; + //echo $spremenljivke['id']."
"; + #za pridobitev stevila vrstic - konec #za pridobitev stevila stolpcev @@ -2184,6 +2189,7 @@ class LatexSurveyElement{ $numColSql = $rowStVrednost['count(*)']; //stevilo vseh stolpcev //echo "stevilo stolpcev: ".$numColSql."
"; #za pridobitev stevila stolpcev - konec + //echo "presirokaTabela: ".$presirokaTabela."
"; if($presirokaTabela==0){ //ce tabela ni presiroka $sqlSubGrid = sisplet_query("SELECT m.spr_id, s.tip FROM srv_grid_multiple m, srv_spremenljivka s WHERE m.parent='".$spremenljivke['id']."' AND m.spr_id=s.id ORDER BY m.vrstni_red"); //pridobimo spr_id in tip podvprasanj, ki sestavljajo kombinirano tabelo @@ -2217,9 +2223,12 @@ class LatexSurveyElement{ //echo $sqlVsehVrednostiString."
"; //echo $rowVrednosti['tip']."
"; + //echo $rowVrednosti['other']."
"; //echo "Vrednost: ".$rowVrednosti['spr_id']."
"; $sqlVsehVrednosti = sisplet_query($sqlVsehVrednostiString); //echo mysqli_num_rows($sqlVsehVrednosti)."
"; + + $roletaZabelezena = 0;