Subversion Repositories bdplot

Rev

Rev 23 | Rev 27 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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