2023-09-13 18:34:12 +02:00
|
|
|
# setwd("C:/Users/nwickelmaier/Nextcloud/Documents/MDS/2023ss/60100_master_thesis/code")
|
|
|
|
|
2023-09-26 18:34:59 +02:00
|
|
|
devtools::load_all("../../../../software/mtt")
|
2023-09-13 18:34:12 +02:00
|
|
|
|
2023-09-27 08:08:32 +02:00
|
|
|
fname <- "../museums/overview_artworks_haum.tex"
|
2023-09-13 18:34:12 +02:00
|
|
|
if (file.exists(fname)) file.remove(fname)
|
|
|
|
|
2023-09-27 08:08:32 +02:00
|
|
|
xmlpath <- "C:/Users/nwickelmaier/Nextcloud/Documents/MDS/2023ss/60100_master_thesis/data/haum/ContentEyevisit/eyevisit_cards_light"
|
2023-09-26 18:34:59 +02:00
|
|
|
artworks <- dir(path = xmlpath)
|
2023-09-13 18:34:12 +02:00
|
|
|
artworks <- artworks[artworks != "glossar"]
|
|
|
|
|
2023-09-26 18:34:59 +02:00
|
|
|
dat <- extract_artworks(artworks, xmlfiles = paste0(artworks, ".xml"),
|
|
|
|
xmlpath = xmlpath)
|
2023-09-13 18:34:12 +02:00
|
|
|
|
|
|
|
fout <- file(fname, "a") # open in append mode
|
|
|
|
|
|
|
|
writeLines("\\documentclass[a4paper,12pt]{article}", fout)
|
|
|
|
writeLines("\\usepackage{graphicx}", fout)
|
|
|
|
writeLines("\\usepackage[margin = 2cm]{geometry}", fout)
|
|
|
|
writeLines("\\author{Nora Wickelmaier}", fout)
|
|
|
|
writeLines("\\title{Overview of Artworks from MTT in HAUM}", fout)
|
|
|
|
writeLines("\\date{\\today}", fout)
|
|
|
|
writeLines("\\begin{document}", fout)
|
|
|
|
writeLines("\\maketitle", fout)
|
|
|
|
#writeLines("\\newpage", fout)
|
|
|
|
|
|
|
|
for (artwork in dat$artwork) {
|
|
|
|
|
|
|
|
writeLines(paste0("\\section*{Artwork Number ", artwork, "}"), fout)
|
|
|
|
writeLines("", fout)
|
|
|
|
writeLines("\\noindent", fout)
|
|
|
|
writeLines(paste0("Artist: ", dat[dat$artwork == artwork, "artist"]), fout)
|
|
|
|
writeLines("", fout)
|
|
|
|
writeLines("\\noindent", fout)
|
|
|
|
writeLines(paste0("Title: ", dat[dat$artwork == artwork, "title"]), fout)
|
|
|
|
writeLines("", fout)
|
|
|
|
|
|
|
|
writeLines("\\begin{center}", fout)
|
2023-09-26 18:34:59 +02:00
|
|
|
art_path <- paste(xmlpath, artwork, artwork, sep = "/")
|
2023-09-13 18:34:12 +02:00
|
|
|
writeLines(paste0("\\includegraphics[width = 12cm]{", art_path, "}"), fout)
|
|
|
|
writeLines("\\end{center}", fout)
|
|
|
|
writeLines("", fout)
|
|
|
|
writeLines("\\noindent", fout)
|
2023-09-14 12:29:04 +02:00
|
|
|
writeLines(paste0("Info: ", dat[dat$artwork == artwork, "misc"]), fout)
|
2023-09-13 18:34:12 +02:00
|
|
|
writeLines("\\newpage", fout)
|
|
|
|
}
|
|
|
|
|
|
|
|
writeLines("\\end{document}", fout)
|
|
|
|
close(fout)
|
|
|
|
|