From 617e70a6a6ba4076459fe8d60411d64fcec29a37 Mon Sep 17 00:00:00 2001 From: patrik2020 Date: Thu, 18 Mar 2021 13:09:22 +0100 Subject: [PATCH] Latex za izvoze: IZVOZ-73: Pri PDF izpisu ne deluje data piping: ureditev pravilnega izpisa odgovora pri praznem vprasalniku --- .../export/latexclasses/class.LatexSurveyElement.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/admin/survey/export/latexclasses/class.LatexSurveyElement.php b/admin/survey/export/latexclasses/class.LatexSurveyElement.php index e3c5eeab1..e17fa37d1 100644 --- a/admin/survey/export/latexclasses/class.LatexSurveyElement.php +++ b/admin/survey/export/latexclasses/class.LatexSurveyElement.php @@ -906,7 +906,12 @@ class LatexSurveyElement{ //$text = str_replace('{','\{',$text); //$text = str_replace('}','\}',$text); $text = str_replace('$','\$ ',$text); - $text = str_replace('#','\# ',$text); + + if(substr_count($text, '#')){ //ce je stevilo # vecje od 1 + $text = str_replace('#','\#',$text); + }else{ + $text = str_replace('#','\# ',$text); + } $text = str_replace('%','\% ',$text); $text = str_replace('€','\euro',$text); $text = str_replace('^','\textasciicircum{} ',$text); @@ -923,7 +928,7 @@ class LatexSurveyElement{ //$text = str_replace('>','\textgreater ',$text); $text = str_replace('>',' \textgreater ',$text); //ureditev posebnih karakterjev za Latex - konec - + //ureditev grskih crk $text = str_replace('α','\textalpha ',$text); $text = str_replace('β','\textbeta ',$text);