Skip to content

Commit fbd1b26

Browse files
committed
add lingglosses.italic_transliteration option
1 parent 823975a commit fbd1b26

File tree

7 files changed

+107
-138
lines changed

7 files changed

+107
-138
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ LazyData: true
1919
URL: https://CRAN.R-project.org/package=phonfieldwork, https://agricolamz.github.io/lingglosses/
2020
BugReports: https://github.com/agricolamz/lingglosses/issues
2121
Imports: kableExtra, knitr, rmarkdown, utils, htmltools, methods
22-
RoxygenNote: 7.1.2
22+
RoxygenNote: 7.2.1
2323
Suggests: testthat (>= 3.0.0)
2424
Config/testthat/edition: 3

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- fix plus sign bug (thx to Nastya Panova);
55
- fix tab bug (thx to Tatiana Philippova and Polina Nasledskova);
66
- fix multiline `gloss_example()`;
7+
- add `lingglosses.italic_transliteration` option;
78

89
# lingglosses 0.0.4
910

R/gloss_example.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ gloss_example <- function(transliteration,
5555
video_width = 320,
5656
video_height = 240,
5757
line_length = 70,
58-
italic_transliteration = TRUE,
58+
italic_transliteration = getOption("lingglosses.italic_transliteration"),
5959
drop_transliteration = FALSE,
6060
intext = FALSE,
6161
write_to_db = TRUE){

R/zzz.r

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
.onLoad <- function(libname = find.package("lingglosses"),
99
pkgname = "lingglosses") {
10+
options("lingglosses.italic_transliteration" = TRUE)
1011
tmp_file1 <- tempfile(pattern = get_variable_name(), fileext = ".csv")
1112
options("lingglosses.glosses_list" = tmp_file1)
1213
tmp_file2 <- tempfile(pattern = "lingglosses.example.table", fileext = ".csv")

docs/index.Rmd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,12 @@ gloss_example(transliteration = "bur-e-**ri** c'in-ne-sːu-w",
103103

104104
In this first example you can see that:
105105

106-
* the transliteration line is italic by default (if you do not want it, just add the argument `italic_transliteration = FALSE`);
106+
* the transliteration line is italic by default (if you do not want it, just add the argument `italic_transliteration = FALSE`)[^ital-all];
107107
* you can use standard markdown syntax (e.g. `**a**` for **bold**);
108108
* the free translation line is automatically framed with quotation marks.
109109

110+
[^ital-all]: Sometimes it is make sense to set this option ones for the whole document using the following code `options("lingglosses.italic_transliteration" = FALSE)`.
111+
110112
Since the function arguments' names are optional in R, users can omit them as long as they follow the order of the arguments (you can always find the correct order in `?gloss_example`):
111113

112114
```{r}

docs/index.html

Lines changed: 99 additions & 134 deletions
Large diffs are not rendered by default.

man/gloss_example.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)