set_style_options {glossr} | R Documentation |
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()
.
set_style_options(styling = list())
styling |
Named list of styling options for specific elements of glosses. |
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
and textit
set italics.
b
, bf
, bold
and textbf
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 in expex
is exskip
.
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.
set_style_options(styling = list(a = "b", trans_quotes = "'"))
print_config()#'