Subversion Repositories bdplot

Rev

Rev 23 | Rev 27 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5 pdel 1
#################################################
25 pdel 2
## this should start by determining paper size \showthe\textwidth is
3
##  useful in latex to determine what width to use (compile from terminal and watch output).
4
## Latex answers in pts. 72.270 pt =1 inch.
5 pdel 5
 
25 pdel 6
 
5 pdel 7
#### All measures MUST be given in inches!!
8
## A complete template consists of:
9
## width: width of a figure (same as paperwidth?)
10
## height: height of figure
25 pdel 11
## height.full: full paper height. Mandatory when mfrow[1]>1
12
## size.unit:
5 pdel 13
 
14
.bdpapertemplates <- function(){
15
  bdpars <- list()
16
 
17
  bdpars$a4.word <- list(
18
### According to word 2003, the default width for word is 21cm - 2*3.17cm = 14.66cm
19
                         width = 14.66/2.54,
15 pdel 20
                         height.full = (29.7-2.54*2)/2.54,
5 pdel 21
                         height = (29.7-2.54*2)/3/2.54,
22
                         size.unit="in"
23
                         )
24
 
25
### b5 is set up for the IMM phd thesis template
25 pdel 26
  ## \showthe\textwidth gives 356.0pt
27
  ## \showthe\textheight gives 459.8002pt
5 pdel 28
  bdpars$b5=list(
29
    width=4.782,
30
    height=2.7,
25 pdel 31
    height.full=6.36,
5 pdel 32
    size.unit="in"
33
    )
8 pdel 34
 
35
#### these derivates from b5 will also be relevant for a4 etc. They could be calculated automatically if ie bdp()$half==TRUE.
5 pdel 36
 
8 pdel 37
  ## 2.354 works like a charm as it is with two subfigures next
38
  ## to each other
5 pdel 39
  bdpars$b5.half = list(
40
    width = 2.354,
41
    ## When the plots are narrower, it looks weird if they are not
42
    ## "less high" too.
43
    height = 2.15)
44
 
45
 
46
 
47
  bdpars$b5.quadratic = list(
48
    width = bdpars$b5$width,
8 pdel 49
    height = bdpars$b5$width)
5 pdel 50
 
8 pdel 51
  ## \showthe\textwidth gives 360.0 pt.
25 pdel 52
  ## \showthe\textheight gives 595.80026pt \approx 8.244088
8 pdel 53
  bdpars$a4=list(
54
    width=4.98,
11 pdel 55
    height=3.2,
25 pdel 56
    height.full=8.24,
8 pdel 57
    size.unit="in"
58
    )
59
 
23 pdel 60
  ### not fully tested
61
  bdpars$a4.half=list(
62
    width=2.45,
63
    height=2.45,
64
    height.full=NA,
65
    size.unit="in"
66
    )
67
 
14 pdel 68
 
69
  bdpars$beamer=list(
70
    width=3.65,
71
    height=2.3,
72
    height.full=NA,
73
    size.unit="in"
74
    )
75
 
5 pdel 76
  bdpars
77
 
78
}
79