]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
added landscape option
authorJan Michel <j.michel@gsi.de>
Fri, 11 Jul 2014 14:40:53 +0000 (16:40 +0200)
committerJan Michel <j.michel@gsi.de>
Fri, 11 Jul 2014 14:41:01 +0000 (16:41 +0200)
xml-db/xml-db2tex.pl

index 990f684fd541c49744d6358b7424bc64efb9dde2..ec0ee8d8f01e86890539ab44f6137feeecb10d0e 100755 (executable)
@@ -29,6 +29,7 @@ GetOptions(
            'pdf'         => \$opt->{pdf},
            'style=s'     => \$opt->{style},
            'standalone'  => \$opt->{standalone},
+           'wide|w'      => \$opt->{wideformat},
            'dumpItem|d'    => \$opt->{dumpItem}
           );
 
@@ -122,8 +123,12 @@ sub new {
   $self->{table}->{dataKeys} = [ 'name', 'addr', 'bits', 'description' ];
   $self->{table}->{header} = [ 'Register', 'Addr', 'Bits', 'Description' ];
 #   $self->{table}->{format} = '@{} l l l p{8cm} @{}';
-  $self->{table}->{format} = ' p{4cm} l c p{8cm} ';
-  
+  if($opt->{wideformat}) {
+    $self->{table}->{format} = ' p{7cm} l c p{14cm} ';
+    }
+  else {
+    $self->{table}->{format} = ' p{4cm} l c p{8cm} ';
+    }
   $self  = {
     %$self,
     %options
@@ -301,13 +306,13 @@ sub writeTexFile {
   
   if ($standalone){
     print OUTPUT q%
-    \documentclass[a4paper,11pt]{article}
+    \documentclass[a4paper,11pt%.($opt->{wideformat}?",landscape":"").q%]{article}
     \usepackage[T1]{fontenc}
     \usepackage{lmodern}
     \usepackage{booktabs}
     \usepackage{longtable}
     \usepackage{geometry}
-    \geometry{verbose,tmargin=3cm,bmargin=3cm,lmargin=3cm,rmargin=3cm}
+    \geometry{verbose,tmargin=3cm,bmargin=3cm,lmargin=2cm,rmargin=2cm}
     \usepackage[table]{xcolor}
     
     \definecolor{light-gray}{gray}{0.90}