Latex za izvoze: IZVOZ-56: Izvoz v razlicnih jezikih: Pri tej anketi na arnesu, se pri izvozu angleske verzije v PDFju prikažejo tudi slo besedila
This commit is contained in:
parent
874ebd2d6d
commit
146ece199f
@ -409,6 +409,7 @@ class BesediloLatex extends LatexSurveyElement
|
|||||||
//if($podatekVBazi==1&&$export_data_type==2){ //ce je podatek v bazi in je izpis skrcen
|
//if($podatekVBazi==1&&$export_data_type==2){ //ce je podatek v bazi in je izpis skrcen
|
||||||
if($podatekVBazi==1){ //ce je podatek v bazi
|
if($podatekVBazi==1){ //ce je podatek v bazi
|
||||||
if($export_data_type==2 || $steviloOken == 1){ //ce je izpis skrcen ali je stevilo oken 1
|
if($export_data_type==2 || $steviloOken == 1){ //ce je izpis skrcen ali je stevilo oken 1
|
||||||
|
$tex .= " \ "; //da ni tezave z "there is no line here to end"
|
||||||
$tex .= $texNewLine;
|
$tex .= $texNewLine;
|
||||||
$tex .= $texNewLine;
|
$tex .= $texNewLine;
|
||||||
}
|
}
|
||||||
|
@ -250,8 +250,16 @@ class RadioCheckboxSelectLatex extends LatexSurveyElement
|
|||||||
|
|
||||||
//pregled vseh moznih vrednosti (kategorij) po $sqlVrednosti
|
//pregled vseh moznih vrednosti (kategorij) po $sqlVrednosti
|
||||||
while ($rowVrednost = mysqli_fetch_assoc($sqlVrednosti)){
|
while ($rowVrednost = mysqli_fetch_assoc($sqlVrednosti)){
|
||||||
$prop['full'] = ( isset($userAnswer[$rowVrednost['id']]) );
|
$prop['full'] = ( isset($userAnswer[$rowVrednost['id']]) );
|
||||||
$stringTitle = ((( $rowVrednost['naslov'] ) ? $rowVrednost['naslov'] : ( ( $rowVrednost['naslov2'] ) ? $rowVrednost['naslov2'] : $rowVrednost['variable'] ) ));
|
|
||||||
|
if($this->language!=''){ //ce je prevod ankete
|
||||||
|
$rowl = $this->srv_language_vrednost($rowVrednost['id']); //pridobi prevod naslova v ustreznem jeziku
|
||||||
|
$stringTitle = ((( $rowl['naslov'] ) ? $rowl['naslov'] : ( ( $rowl['naslov2'] ) ? $rowl['naslov2'] : $rowl['variable'] ) )); //prevod naslova v ustreznem jeziku
|
||||||
|
}else{
|
||||||
|
$stringTitle = ((( $rowVrednost['naslov'] ) ? $rowVrednost['naslov'] : ( ( $rowVrednost['naslov2'] ) ? $rowVrednost['naslov2'] : $rowVrednost['variable'] ) ));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if ( $spremenljivke['tip'] == 1 || $spremenljivke['tip'] == 3 ){
|
if ( $spremenljivke['tip'] == 1 || $spremenljivke['tip'] == 3 ){
|
||||||
$symbol = $this->getAnswerSymbol($export_format, $fillablePdf, $spremenljivke['tip'], $spremenljivke['grids'], 0, $this->userAnswer[$rowVrednost['id']], $spremenljivke['orientation'], $indeksZaWhile, $vizualnaSkalaNumber);
|
$symbol = $this->getAnswerSymbol($export_format, $fillablePdf, $spremenljivke['tip'], $spremenljivke['grids'], 0, $this->userAnswer[$rowVrednost['id']], $spremenljivke['orientation'], $indeksZaWhile, $vizualnaSkalaNumber);
|
||||||
//$tex .= '{\ChoiceMenu[radio,radiosymbol=\ding{108},name=myGroupOfRadiobuttons]{}{='.$stringTitle.'}}'.$stringTitle.' '.$this->texNewLine;
|
//$tex .= '{\ChoiceMenu[radio,radiosymbol=\ding{108},name=myGroupOfRadiobuttons]{}{='.$stringTitle.'}}'.$stringTitle.' '.$this->texNewLine;
|
||||||
|
@ -207,9 +207,15 @@ class LatexSurvey{
|
|||||||
if( ($surveyExpanded != 0 || $this->type != 1) && $this->showIntro == 1 ){
|
if( ($surveyExpanded != 0 || $this->type != 1) && $this->showIntro == 1 ){
|
||||||
if ( SurveyInfo::getInstance()->getSurveyShowIntro() )
|
if ( SurveyInfo::getInstance()->getSurveyShowIntro() )
|
||||||
{
|
{
|
||||||
$intro = (SurveyInfo::getInstance()->getSurveyIntro() == '') ? $lang['srv_intro'] : SurveyInfo::getInstance()->getSurveyIntro();
|
if($this->language!=-1){ //ce je prevod ankete
|
||||||
|
$spr_id_uvod = -1;
|
||||||
|
$sqll = sisplet_query("SELECT naslov, info FROM srv_language_spremenljivka WHERE ank_id='".$this->anketa."' AND spr_id='".$spr_id_uvod."' AND lang_id='".$this->language."'");
|
||||||
|
$rowl = mysqli_fetch_array($sqll); //pridobi prevod uvoda v ustreznem jeziku
|
||||||
|
$intro = $rowl['naslov']; //prevod uvoda v ustreznem jeziku
|
||||||
|
}else{
|
||||||
|
$intro = (SurveyInfo::getInstance()->getSurveyIntro() == '') ? $lang['srv_intro'] : SurveyInfo::getInstance()->getSurveyIntro();
|
||||||
|
}
|
||||||
|
|
||||||
//$tex .= $intro;
|
|
||||||
$tex .= $this->encodeTextHere($intro);
|
$tex .= $this->encodeTextHere($intro);
|
||||||
$tex .= $this->texNewLine;
|
$tex .= $this->texNewLine;
|
||||||
$tex .= $this->texNewLine;
|
$tex .= $this->texNewLine;
|
||||||
@ -1326,7 +1332,7 @@ class LatexSurvey{
|
|||||||
if($numOfUl!=0 && $posLi !== false){ //ce imamo ul in li
|
if($numOfUl!=0 && $posLi !== false){ //ce imamo ul in li
|
||||||
$divider = ' ';
|
$divider = ' ';
|
||||||
}else{
|
}else{
|
||||||
$divider = ' \\\\ ';
|
$divider = ' \\ \\\\ ';
|
||||||
}
|
}
|
||||||
//$text = str_replace('<p>',' ', $text);
|
//$text = str_replace('<p>',' ', $text);
|
||||||
//$text = str_replace('<p>',' \break ', $text);
|
//$text = str_replace('<p>',' \break ', $text);
|
||||||
|
@ -837,6 +837,8 @@ class LatexSurveyElement{
|
|||||||
$posLi = strpos($text, $findLi);
|
$posLi = strpos($text, $findLi);
|
||||||
$posPar = strpos($text, $findPar);
|
$posPar = strpos($text, $findPar);
|
||||||
|
|
||||||
|
//echo "pozicija paragrafa: $posPar </br>";
|
||||||
|
|
||||||
//ureditev izrisa slike
|
//ureditev izrisa slike
|
||||||
if($posImg !== false){
|
if($posImg !== false){
|
||||||
$numOfImgs = substr_count($text, $findImg); //stevilo '<img ' v tekstu
|
$numOfImgs = substr_count($text, $findImg); //stevilo '<img ' v tekstu
|
||||||
@ -902,9 +904,9 @@ class LatexSurveyElement{
|
|||||||
$text = str_replace('&','\&',$text);
|
$text = str_replace('&','\&',$text);
|
||||||
$text = str_replace(' ','~',$text);
|
$text = str_replace(' ','~',$text);
|
||||||
//$text = str_replace('<','\textless ',$text);
|
//$text = str_replace('<','\textless ',$text);
|
||||||
$text = str_replace('<','\textless',$text);
|
$text = str_replace('<',' \textless ',$text);
|
||||||
//$text = str_replace('>','\textgreater ',$text);
|
//$text = str_replace('>','\textgreater ',$text);
|
||||||
$text = str_replace('>','\textgreater',$text);
|
$text = str_replace('>',' \textgreater ',$text);
|
||||||
//ureditev posebnih karakterjev za Latex - konec
|
//ureditev posebnih karakterjev za Latex - konec
|
||||||
|
|
||||||
//ureditev preureditve html kode ul in li v latex itemize
|
//ureditev preureditve html kode ul in li v latex itemize
|
||||||
@ -955,10 +957,10 @@ class LatexSurveyElement{
|
|||||||
if($numOfUl!=0 && $posLi !== false){ //ce imamo ul in li
|
if($numOfUl!=0 && $posLi !== false){ //ce imamo ul in li
|
||||||
$divider = ' ';
|
$divider = ' ';
|
||||||
}else{
|
}else{
|
||||||
$divider = ' \\\\ ';
|
$divider = ' \\ \\\\ ';
|
||||||
}
|
}
|
||||||
$text = str_replace('<p>',$divider, $text);
|
$text = str_replace('<p>',$divider, $text);
|
||||||
}else{
|
}else{
|
||||||
$text = str_replace('<p>',' ', $text);
|
$text = str_replace('<p>',' ', $text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -971,6 +973,15 @@ class LatexSurveyElement{
|
|||||||
$text = substr_replace($text, $this->texNewLine, MAX_STRING_LENGTH, 0); //dodaj na ustrezni dolzini besedila prehod v novo vrstico
|
$text = substr_replace($text, $this->texNewLine, MAX_STRING_LENGTH, 0); //dodaj na ustrezni dolzini besedila prehod v novo vrstico
|
||||||
}
|
}
|
||||||
//priprava izpisa zelo dolgega besedila brez presledkov - konec
|
//priprava izpisa zelo dolgega besedila brez presledkov - konec
|
||||||
|
//echo "text potem: ".$text."</br>";
|
||||||
|
|
||||||
|
|
||||||
|
//RESEVANJE BESEDILA V CIRILICI
|
||||||
|
$contains_cyrillic = (bool) preg_match('/[\p{Cyrillic}]/u', $text); //ali je v besedilu cirilica?
|
||||||
|
if($contains_cyrillic){ // ce je cirilica v besedilu
|
||||||
|
$text = '\foreignlanguage{russian}{'.$text.'}';
|
||||||
|
}
|
||||||
|
//RESEVANJE BESEDILA V CIRILICI - konec
|
||||||
|
|
||||||
if($pos === false && $posImg === false) { //v tekstu ni br in img
|
if($pos === false && $posImg === false) { //v tekstu ni br in img
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user