|
8 | 8 | #' @export |
9 | 9 | codeBookItemTxtHeader <- function(x, ...) { |
10 | 10 | txt <- list() |
11 | | - txt$name <- crunch::name(x) |
12 | | - txt$alias <- crunch::alias(x) |
| 11 | + txt$name <- adjustCrunchName(crunch::name(x)) |
| 12 | + txt$alias <- adjustCrunchAlias(crunch::alias(x)) |
| 13 | + |
| 14 | + |
13 | 15 |
|
14 | 16 | tex <- "\\textbf{%s}\\hfill\\textbf{\\ttfamily{%s}}\n\n{\\small %s}\n\n" |
15 | 17 |
|
@@ -65,9 +67,9 @@ codeBookItemTxtHeader <- function(x, ...) { |
65 | 67 | #' @export |
66 | 68 | codeBookItemTxtDescription <- function(x, ...) { |
67 | 69 | txt <- list() |
68 | | - txt$description <- crunch::description(x) |
| 70 | + txt$description <- adjustCrunchDescription(crunch::name(x), crunch::alias(x), crunch::description(x)) |
69 | 71 | txt$notes <- crunch::notes(x) |
70 | | - txt$alias <- crunch::alias(x) |
| 72 | + txt$alias <- adjustCrunchAlias(crunch::alias(x)) |
71 | 73 | txt$alias_toc <- ifelse( |
72 | 74 | nchar(txt$alias) > 20, |
73 | 75 | paste0(substr(txt$alias, 1, 22), "..."), |
@@ -210,7 +212,7 @@ scolumnAlign <- function(k, alignment) { |
210 | 212 | if (maxnchar > 6) { |
211 | 213 | alignment[i] <- sprintf("S[table-format=%s]", maxnchar) |
212 | 214 | } else { |
213 | | - alignment[i] <- c("J", "K", "d", "M", "N", "O", "L", "M", "N")[maxnchar] |
| 215 | + alignment[i] <- c("J", "K", "d", "M", "N", "O", "L", "P", "Q")[maxnchar] |
214 | 216 | } |
215 | 217 | } |
216 | 218 | } |
|
0 commit comments