Subversion Repositories bdplot

Rev

Rev 36 | Rev 49 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#################################################
## this should start by determining paper size \showthe\textwidth is
##  useful in latex to determine what width to use (compile from terminal and watch output).
## Latex answers in pts. 72.270 pt =1 inch.


#### All measures MUST be given in inches!!
## A complete template consists of:
## width: width of a figure (same as paperwidth?)
## height: height of figure
## height.full: full paper height. Mandatory when mfrow[1]>1
## size.unit:

.bdpapertemplates <- function(){
  bdpars <- list()

  bdpars$a4.word <- list(
### According to word 2003, the default width for word is 21cm - 2*3.17cm = 14.66cm
                         width = 14.66/2.54,
                         height.full = (29.7-2.54*2)/2.54,
                         size.unit="in"
                         )
  bdpars$a4.word$height <- bdpars$a4.word$height.full/4
  
### b5 is set up for the IMM phd thesis template
  ## \showthe\textwidth gives 356.0pt
  ## \showthe\textheight gives 459.8002pt
  bdpars$b5=list(
    width=4.782,
    height=2.7,
    height.full=6.36,
    size.unit="in"
    )
    

  ## \showthe\textwidth gives 360.0 pt.
  ## \showthe\textheight gives 595.80026pt \approx 8.244088
  bdpars$a4=list(
    width=4.98,
    height=3.2,
    height.full=8.24,
    size.unit="in"
    )

  ## for some plots, a quadratic design is better
  bdpars$a4.quad=list(
    width=3.2,
    height=3.2,
    height.full=8.24,
    size.unit="in"
    )
  bdpars$a4.full=list(
    width=4.98,
    ## this is the full height but leaves no space for caption
    ##    height=8.24,
    height.full=8,
    size.unit="in"
    )
  
  ### not fully tested
  bdpars$a4.half=list(
    width=2.45,
    height=2.45,
    height.full=8.24,
    size.unit="in"
    )
  
  
#### needs height.full before it will work
  bdpars$beamer=list(
    width=3.65,
    height=2.3,
    height.full=NA,
    size.unit="in"
    )
    
#### these derivates from b5 will also be relevant for a4 etc. They could be calculated automatically if ie bdp()$half==TRUE.
    
      ## 2.354 works like a charm as it is with two subfigures next
      ## to each other
  bdpars$b5.half = list(
    width = 2.354,
    ## When the plots are narrower, it looks weird if they are not
    ## "less high" too.
    height = 2.15,
    height.full=6.36,
    size.unit="in"
    )
    
    
    
  
##   bdpars$b5.quadratic = list(
##     width = bdpars$b5$width,
##     height = bdpars$b5$width)

  
  bdpars
  
}