Skip to content

Commit 23f665b

Browse files
update the formating of path
2 parents 4b7f56c + d9bb296 commit 23f665b

4 files changed

+40
-4
lines changed

doc/EN/JDemetra+_configuration_guide_EN.Rmd

+10-1
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,27 @@ color_format <- function(x, color, url = TRUE) {
3636
3737
x <- x |> gsub(pattern = "\\", replacement = "\\\\", fixed = TRUE)
3838
39+
# Génération de .pdf
3940
if (output_format == "latex") {
4041
x <- x |> gsub(pattern = "#", replacement = "\\#", fixed = TRUE)
4142
ret <- paste("\\textcolor{", color_name, ifelse(url, "}{\\url{", "}{\\nolinkurl{"), x, ifelse(url, "}}", "}}"), sep = "")
43+
44+
# Génération de .html
4245
} else if (output_format == "html") {
4346
ret <- paste("<font color='", color, "'>", x, "</font>", sep = "")
47+
48+
# Génération de .md pour Github
4449
} else if (output_format == "gfm+tex_math_dollars-yaml_metadata_block") {
4550
if (url) {
4651
ret <- paste("[", x, "](", x, ")", sep = "")
4752
} else {
48-
ret <- x |> gsub(pattern = "\\", replacement = "\\\\", fixed = TRUE)
53+
ret <- x |>
54+
gsub(pattern = "\\", replacement = "\\\\", fixed = TRUE) |>
55+
gsub(pattern = "_", replacement = "\\\\_", fixed = TRUE)
4956
ret <- paste("${\\textsf{\\color{", color, "}{", ret, "}}}$", sep = "")
5057
}
58+
59+
# Autres ?
5160
} else {
5261
ret <- x
5362
}

doc/EN/JDemetra+_quick_installation_guide_EN.Rmd

+10-1
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,27 @@ color_format <- function(x, color, url = TRUE) {
3636
3737
x <- x |> gsub(pattern = "\\", replacement = "\\\\", fixed = TRUE)
3838
39+
# Génération de .pdf
3940
if (output_format == "latex") {
4041
x <- x |> gsub(pattern = "#", replacement = "\\#", fixed = TRUE)
4142
ret <- paste("\\textcolor{", color_name, ifelse(url, "}{\\url{", "}{\\nolinkurl{"), x, ifelse(url, "}}", "}}"), sep = "")
43+
44+
# Génération de .html
4245
} else if (output_format == "html") {
4346
ret <- paste("<font color='", color, "'>", x, "</font>", sep = "")
47+
48+
# Génération de .md pour Github
4449
} else if (output_format == "gfm+tex_math_dollars-yaml_metadata_block") {
4550
if (url) {
4651
ret <- paste("[", x, "](", x, ")", sep = "")
4752
} else {
48-
ret <- x |> gsub(pattern = "\\", replacement = "\\\\", fixed = TRUE)
53+
ret <- x |>
54+
gsub(pattern = "\\", replacement = "\\\\", fixed = TRUE) |>
55+
gsub(pattern = "_", replacement = "\\\\_", fixed = TRUE)
4956
ret <- paste("${\\textsf{\\color{", color, "}{", ret, "}}}$", sep = "")
5057
}
58+
59+
# Autres ?
5160
} else {
5261
ret <- x
5362
}

doc/FR/Guide_de_configuration_JDemetra+.Rmd

+10-1
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,27 @@ color_format <- function(x, color, url = TRUE) {
3737
3838
x <- x |> gsub(pattern = "\\", replacement = "\\\\", fixed = TRUE)
3939
40+
# Génération de .pdf
4041
if (output_format == "latex") {
4142
x <- x |> gsub(pattern = "#", replacement = "\\#", fixed = TRUE)
4243
ret <- paste("\\textcolor{", color_name, ifelse(url, "}{\\url{", "}{\\nolinkurl{"), x, ifelse(url, "}}", "}}"), sep = "")
44+
45+
# Génération de .html
4346
} else if (output_format == "html") {
4447
ret <- paste("<font color='", color, "'>", x, "</font>", sep = "")
48+
49+
# Génération de .md pour Github
4550
} else if (output_format == "gfm+tex_math_dollars-yaml_metadata_block") {
4651
if (url) {
4752
ret <- paste("[", x, "](", x, ")", sep = "")
4853
} else {
49-
ret <- x |> gsub(pattern = "\\", replacement = "\\\\", fixed = TRUE)
54+
ret <- x |>
55+
gsub(pattern = "\\", replacement = "\\\\", fixed = TRUE) |>
56+
gsub(pattern = "_", replacement = "\\\\_", fixed = TRUE)
5057
ret <- paste("${\\textsf{\\color{", color, "}{", ret, "}}}$", sep = "")
5158
}
59+
60+
# Autres ?
5261
} else {
5362
ret <- x
5463
}

doc/FR/Installation_rapide_JDemetra+.Rmd

+10-1
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,27 @@ color_format <- function(x, color, url = TRUE) {
3737
3838
x <- x |> gsub(pattern = "\\", replacement = "\\\\", fixed = TRUE)
3939
40+
# Génération de .pdf
4041
if (output_format == "latex") {
4142
x <- x |> gsub(pattern = "#", replacement = "\\#", fixed = TRUE)
4243
ret <- paste("\\textcolor{", color_name, ifelse(url, "}{\\url{", "}{\\nolinkurl{"), x, ifelse(url, "}}", "}}"), sep = "")
44+
45+
# Génération de .html
4346
} else if (output_format == "html") {
4447
ret <- paste("<font color='", color, "'>", x, "</font>", sep = "")
48+
49+
# Génération de .md pour Github
4550
} else if (output_format == "gfm+tex_math_dollars-yaml_metadata_block") {
4651
if (url) {
4752
ret <- paste("[", x, "](", x, ")", sep = "")
4853
} else {
49-
ret <- x |> gsub(pattern = "\\", replacement = "\\\\", fixed = TRUE)
54+
ret <- x |>
55+
gsub(pattern = "\\", replacement = "\\\\", fixed = TRUE) |>
56+
gsub(pattern = "_", replacement = "\\\\_", fixed = TRUE)
5057
ret <- paste("${\\textsf{\\color{", color, "}{", ret, "}}}$", sep = "")
5158
}
59+
60+
# Autres ?
5261
} else {
5362
ret <- x
5463
}

0 commit comments

Comments
 (0)