Latex za izvoze: Multitabele: ureditev delovanja izvoza v rtf

This commit is contained in:
patrik2020 2022-06-26 10:27:45 +02:00
parent 02982e4f31
commit fafac959ff
2 changed files with 17 additions and 7 deletions

View File

@ -512,7 +512,7 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
$tabela .= "\\cline{".($colspan+1)."-".$steviloStolpcevParameterTabular."}"; //prekinjena horizontalna vrstica na vrhu tabele $tabela .= "\\cline{".($colspan+1)."-".$steviloStolpcevParameterTabular."}"; //prekinjena horizontalna vrstica na vrhu tabele
} }
$tabela .= $this->MultiColCellLatex($colspan, '', 1); //prazne celice v prvi vrstici $tabela .= $this->MultiColCellLatex($colspan, '', 1, $export_format); //prazne celice v prvi vrstici
//$tabela .= $this->tableRow($prvaVrsticaVert, 1, 0, 0, $steviloPodstolpcevV1); //izpis prve vrstice tabele //$tabela .= $this->tableRow($prvaVrsticaVert, 1, 0, 0, $steviloPodstolpcevV1); //izpis prve vrstice tabele
$tabela .= $this->tableRow($prvaVrsticaVert, 1, 0, 0, '', $export_format, $steviloPodstolpcevV1); //izpis prve vrstice tabele $tabela .= $this->tableRow($prvaVrsticaVert, 1, 0, 0, '', $export_format, $steviloPodstolpcevV1); //izpis prve vrstice tabele
@ -523,7 +523,7 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
//prekinjena horizontalna vrstica po prvi vrstici - konec //prekinjena horizontalna vrstica po prvi vrstici - konec
if(count($drugaVrsticaVert)){ if(count($drugaVrsticaVert)){
$tabela .= $this->MultiColCellLatex($colspan, '', 1); //prazne celice v drugi vrstici $tabela .= $this->MultiColCellLatex($colspan, '', 1, $export_format); //prazne celice v drugi vrstici
if(count($steviloPodstolpcevV2)){ if(count($steviloPodstolpcevV2)){
//$tabela .= $this->tableRow($drugaVrsticaVert, 1, 0, 0, $steviloPodstolpcevV2); //$tabela .= $this->tableRow($drugaVrsticaVert, 1, 0, 0, $steviloPodstolpcevV2);
$tabela .= $this->tableRow($drugaVrsticaVert, 1, 0, 0, '', $export_format, $steviloPodstolpcevV2); $tabela .= $this->tableRow($drugaVrsticaVert, 1, 0, 0, '', $export_format, $steviloPodstolpcevV2);
@ -539,7 +539,7 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
} }
if(count($tretjaVrsticaVert)){ if(count($tretjaVrsticaVert)){
$tabela .= $this->MultiColCellLatex($colspan, '', 1); //prazne celice v drugi vrstici $tabela .= $this->MultiColCellLatex($colspan, '', 1, $export_format); //prazne celice v drugi vrstici
if(count($steviloPodstolpcevV3)){ if(count($steviloPodstolpcevV3)){
//$tabela .= $this->tableRow($tretjaVrsticaVert, 1, 0, 0, $steviloPodstolpcevV3); //$tabela .= $this->tableRow($tretjaVrsticaVert, 1, 0, 0, $steviloPodstolpcevV3);
$tabela .= $this->tableRow($tretjaVrsticaVert, 1, 0, 0, '', $export_format, $steviloPodstolpcevV3); $tabela .= $this->tableRow($tretjaVrsticaVert, 1, 0, 0, '', $export_format, $steviloPodstolpcevV3);
@ -552,7 +552,7 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement {
} }
if(count($cetrtaVrsticaVert)){ if(count($cetrtaVrsticaVert)){
$tabela .= $this->MultiColCellLatex($colspan, '', 1); //prazne celice v drugi vrstici $tabela .= $this->MultiColCellLatex($colspan, '', 1, $export_format); //prazne celice v drugi vrstici
$tabela .= $this->tableRow($cetrtaVrsticaVert, 1); $tabela .= $this->tableRow($cetrtaVrsticaVert, 1);
} }

View File

@ -1516,9 +1516,10 @@ class LatexAnalysisElement{
} }
//funkcija skrbi za izpis multicol celice //funkcija skrbi za izpis multicol celice
function MultiColCellLatex($steviloVmesnihStolpcevPodvrstic=null, $text='', $odZacetka=0){ function MultiColCellLatex($steviloVmesnihStolpcevPodvrstic=null, $text='', $odZacetka=0, $export_format=null){
$tabela = ''; $tabela = '';
//echo "steviloVmesnihStolpcevPodvrstic: $steviloVmesnihStolpcevPodvrstic</br>"; //echo "steviloVmesnihStolpcevPodvrstic: $steviloVmesnihStolpcevPodvrstic</br>";
//echo "format: $export_format</br>";
if($steviloVmesnihStolpcevPodvrstic==1){ //ce je 1, ne sme biti multicolumn{1}, saj so drugace tezave z izpisom if($steviloVmesnihStolpcevPodvrstic==1){ //ce je 1, ne sme biti multicolumn{1}, saj so drugace tezave z izpisom
$tabela .= " & ".$text." "; $tabela .= " & ".$text." ";
}else{ }else{
@ -1526,10 +1527,19 @@ class LatexAnalysisElement{
$steviloArrayrulewidth = ($steviloVmesnihStolpcevPodvrstic-1); $steviloArrayrulewidth = ($steviloVmesnihStolpcevPodvrstic-1);
if($odZacetka==0){ if($odZacetka==0){
//$tabela .= " & \multicolumn{".$steviloVmesnihStolpcevPodvrstic."}{X|}{";//zacetek multicol //$tabela .= " & \multicolumn{".$steviloVmesnihStolpcevPodvrstic."}{X|}{";//zacetek multicol
$tabela .= " & \multicolumn{".$steviloVmesnihStolpcevPodvrstic."}{>{\hsize=\dimexpr".$steviloVmesnihStolpcevPodvrstic."\hsize+".$steviloTabColSep."\\tabcolsep+".$steviloArrayrulewidth."\arrayrulewidth\\relax}C|}{";//zacetek multicol if($export_format=='pdf'){
$tabela .= " & \multicolumn{".$steviloVmesnihStolpcevPodvrstic."}{>{\hsize=\dimexpr".$steviloVmesnihStolpcevPodvrstic."\hsize+".$steviloTabColSep."\\tabcolsep+".$steviloArrayrulewidth."\arrayrulewidth\\relax}C|}{";//zacetek multicol
}elseif($export_format=='rtf'){
$tabela .= " & \multicolumn{".$steviloVmesnihStolpcevPodvrstic."}{C|}{";//zacetek multicol
}
}else{ }else{
//$tabela .= " \multicolumn{".$steviloVmesnihStolpcevPodvrstic."}{X|}{";//zacetek multicol //$tabela .= " \multicolumn{".$steviloVmesnihStolpcevPodvrstic."}{X|}{";//zacetek multicol
$tabela .= " \multicolumn{".$steviloVmesnihStolpcevPodvrstic."}{>{\hsize=\dimexpr".$steviloVmesnihStolpcevPodvrstic."\hsize+".$steviloTabColSep."\\tabcolsep+".$steviloArrayrulewidth."\arrayrulewidth\\relax}C|}{";//zacetek multicol if($export_format=='pdf'){
$tabela .= " \multicolumn{".$steviloVmesnihStolpcevPodvrstic."}{>{\hsize=\dimexpr".$steviloVmesnihStolpcevPodvrstic."\hsize+".$steviloTabColSep."\\tabcolsep+".$steviloArrayrulewidth."\arrayrulewidth\\relax}C|}{";//zacetek multicol
}elseif($export_format=='rtf'){
$tabela .= " \multicolumn{".$steviloVmesnihStolpcevPodvrstic."}{C|}{";//zacetek multicol
}
} }
$tabela .= $text; $tabela .= $text;
if($odZacetka==0){ if($odZacetka==0){