This is a helper function to set the configuration that control style characteristics
for glosses across the full document. It is called within use_glossr()
.
Usage
set_style_options(styling = list())
Details
There are five types of settings that can be provided in the list.
First, trans_quotes
sets the characters that must surround the free translation in a gloss.
If no value is specified, it will be double quotes. There are no real restrictions
for this value.
Second, the following elements can set general styling instructions for different
sections of a gloss, formatting them completely in italics OR bold. The items with a |
indicate that various names are possible.×
source|preamble: The line of the glosses where the
source
is rendered.a|first: The first line of the glosses, with the original language text.
b|second: The second line of the glosses.
c|third: The third line of the glosses if it exists.
ft|trans|translation: The line of the glosses where the free
translation
is rendered.
Each of these items can take one of a few values:
i
,it
,italics
andtextit
set italics.b
,bf
,bold
andtextbf
set boldface.
Third, there are a few LaTeX-specific settings documented in the expex documentation. In all cases the default value is 0 (0pt). (If you would like other settings to be supported, write up an Issue and I will look into it!)
exskip|par_spacing: Space above and below the example. The
par_spacing
name is allowed for backwards compatibility, but the actual name inexpex
isexskip
.belowglpreambleskip: Space under the preamble (where the
source
is printed).aboveglftskip: The spacing above the free translation.
extraglskip: The spacing between the aligned lines.
Fourth, there is one setting that is not available in LaTeX, particularly thinking of slides: numbering, that is, whether the glosses should be numbered (in HTML).
Finally, you may set the following values for Word output, used in computing the spaces for alignment:
font_family: A character vector of length 1 indicating the font family used in the lines to be aligned, or a list with names "a" and "b" (and "c" if relevant) indicating the font families of specific lines.
font_size: A numeric vector of length one indicating the font size used in the lines to be aligned, or a list with names "a" and "b" (and "c" if relevant) indicating the font sizes of specific lines.
page_width: The width of the space between the margins of the Word file, in pixels, used to wrap long examples. The default is 1332; if you see that your output does not match what you want, you can tweak it with this value.
Examples
set_style_options(styling = list(a = "b", trans_quotes = "'"))
print_config()#'
#>
#> ── General line formatting ─────────────────────────────────────────────────────
#> 1. a: b
#> 2. b:
#> 3. c:
#> 4. preamble: b
#> 5. translation:
#>
#> ── PDF-specific formatting ─────────────────────────────────────────────────────
#> 1. exskip: 2
#> 2. belowglpreambleskip: 0
#> 3. aboveglftskip: 0
#> 4. extraglskip: 0
#>
#> ── Word-specific formatting ────────────────────────────────────────────────────
#> 1. font_family: Cambria, Times New Roman, and Times New Roman
#> 2. font_size: 12
#> 3. page_width: 1332
#>
#> ── Other formatting ────────────────────────────────────────────────────────────
#> 1. output: word
#> 2. trans_quotes: '
#> 3. numbering: TRUE