NIJZ razmiki

This commit is contained in:
Miha 2021-11-05 13:30:02 +01:00
parent 8b39e9a444
commit 3ee0c9e238
2 changed files with 9 additions and 5 deletions

View File

@ -28,7 +28,7 @@ library(rvest)
#-------------------------- USER DEFINED FUNCTION ---------------------# #-------------------------- USER DEFINED FUNCTION ---------------------#
# Za potrebe pravilnega prikaza teksta v posameznih poglavjih # Za potrebe pravilnega prikaza teksta v posameznih poglavjih
lxTranslate <- function(x, color = "NE", pisava = TRUE) { lxTranslate <- function(x, color = "NE", pisava = TRUE, oblacSol = FALSE) {
x <- gsub("<strong>", "\\\\\\\\textbf{", x) x <- gsub("<strong>", "\\\\\\\\textbf{", x)
x <- gsub("<strong >", "\\\\\\\\textbf{", x) x <- gsub("<strong >", "\\\\\\\\textbf{", x)
x <- gsub("</strong>", "}", x) x <- gsub("</strong>", "}", x)
@ -71,8 +71,12 @@ lxTranslate <- function(x, color = "NE", pisava = TRUE) {
odst <- val[5:length(val)] odst <- val[5:length(val)]
# Po drugem odstavku zmanjšamo pisavo na 9 # Po drugem odstavku zmanjšamo pisavo na 9
if(oblacSol == FALSE) {
xsmall <- paste0("\\\\begin{footnotesize}", stringr::str_c(odst, collapse = "\\\\newline "), "\\\\end{footnotesize}") xsmall <- paste0("\\\\begin{footnotesize}", stringr::str_c(odst, collapse = "\\\\newline "), "\\\\end{footnotesize}")
} else {
xsmall <- paste0("\\\\newline \\\\begin{footnotesize}", stringr::str_c(odst, collapse = "\\\\newline "), "\\\\end{footnotesize}")
}
# Prvi del # Prvi del
t1 <- stringr::str_c(val[1:4], collapse = "\\\\newline ") t1 <- stringr::str_c(val[1:4], collapse = "\\\\newline ")
@ -408,7 +412,7 @@ sonce <- lxTranslate(sonce, color = "DA")
#------------------------ Poletni urnik za izvajanje aktivnosti na prostem ------------------------# #------------------------ Poletni urnik za izvajanje aktivnosti na prostem ------------------------#
oblacila <- data %>% filter(str_detect(V1, "OBLACILA")) %>% select(V2) oblacila <- data %>% filter(str_detect(V1, "OBLACILA")) %>% select(V2)
oblacila <- lxTranslate(oblacila, color = "DA") oblacila <- lxTranslate(oblacila, color = "DA", oblacSol = TRUE)
#----------------------- Poletni urnik za izvajanje aktivnosti na prostem ----------------------# #----------------------- Poletni urnik za izvajanje aktivnosti na prostem ----------------------#
@ -425,7 +429,7 @@ solarij <- lxTranslate(solarij, color = "DA")
#------------------------ Poletni urnik za izvajanje aktivnosti na prostem ------------------------# #------------------------ Poletni urnik za izvajanje aktivnosti na prostem ------------------------#
kemija <- data %>% filter(str_detect(V1, "KEMIJA")) %>% select(V2) kemija <- data %>% filter(str_detect(V1, "KEMIJA")) %>% select(V2)
kemija <- lxTranslate(kemija, color = "DA") kemija <- lxTranslate(kemija, color = "DA", oblacSol = TRUE)
#--- #---

View File

@ -100,7 +100,7 @@
\colorbox{rumena} {\textbf{\hspace*{-0.09cm}Obiskovanje solarija \phantom{This text will be invisible invisible invisiblee will be test test test test test tes dffffffffffffff ttttttttttt} }} \colorbox{rumena} {\textbf{\hspace*{-0.09cm}Obiskovanje solarija \phantom{This text will be invisible invisible invisiblee will be test test test test test tes dffffffffffffff ttttttttttt} }}
\\[0.2cm] \\[0.2cm]
!solarij! !solarij!
\\ \\ \\\\[0.2cm]
\begin{tikzpicture} \begin{tikzpicture}
\node (rect) [rectangle,fill = rumena, minimum width=175mm, minimum height=10mm] at (1,1) {}; \node (rect) [rectangle,fill = rumena, minimum width=175mm, minimum height=10mm] at (1,1) {};
\node [above] at (rect.east) {\hspace*{-5.8cm} \textcolor{red}{Več v dokumentu UV sevanje in zdravje:}}; \node [above] at (rect.east) {\hspace*{-5.8cm} \textcolor{red}{Več v dokumentu UV sevanje in zdravje:}};