Newer
Older
subsection = title
n_page = df_page$n[nrow(df_page)] + 1
df_page = bind_rows(
df_page,
tibble(section=section,
subsection=subsection,
n=n_page))
}
footName = paste('tableau récapitulatif de ',
type, sep='')
if (is.null(df_page)) {
n_page = n_loop
}
foot = foot_panel(footName,
n_page,
AEAGlogo_file, INRAElogo_file,
FRlogo_file, foot_height)
P = list(mat, foot)
LM = matrix(c(1,
2),
nrow=2, byrow=TRUE)
} else {
foot_height = 0
P = list(mat)
LM = matrix(c(1),
nrow=1, byrow=TRUE)
}
id_foot = 2
LMcol = ncol(LM)
LMrow = nrow(LM)
LM = rbind(rep(99, times=LMcol),
LM, rep(99, times=LMcol))
LMrow = nrow(LM)
LM = cbind(rep(99, times=LMrow),
LM, rep(99, times=LMrow))
LMcol = ncol(LM)
row_height = (height - 2*margin_size - foot_height) / (LMrow - 3)
Hcut = LM[, 2]
heightLM = rep(row_height, times=LMrow)
heightLM[Hcut == id_foot] = foot_height
Wcut = LM[(nrow(LM)-1),]
widthLM = rep(col_width, times=LMcol)
# Arranges the graphical object
plot = grid.arrange(grobs=P, layout_matrix=LM,
heights=heightLM, widths=widthLM)
iMat, sep=''),
device='pdf',
width=width, height=height,
units='cm', dpi=dpi)