Difference between revisions of "Command/startuserdata"

From Wiki
Jump to navigation Jump to search
(Description of the new userdata environment)
 
m (Taco moved page Environment/userdata to Command/startuserdata over a redirect without leaving a redirect)
 
(One intermediate revision by the same user not shown)
(No difference)

Latest revision as of 09:50, 7 August 2020

\startuserdata

Syntax

\startuserdata[...][...,...=...,...] ... \stopuserdata
[...] NAME
key value

Description

The userdata environments provides a optional argument which let you unlike the the startstop environment pass your own values to the content of the environment.

New layouts for the environment can be created with the \defineuserdataalternative command.

Example

\defineuserdataalternative [epigraph] [renderingsetup=userdata:epigraph]

\startsetups [userdata:epigraph]
    \startframedtext [location=right,frame=off,align={flushleft,broad},style=\tfx,offset=.25ex,width=.5\textwidth]
        \begstrut\getinlineuserdata\endstrut
        \hairline
        \wordright{\userdataparameter{author}}
    \stopframedtext
\stopsetups

\defineuserdata
  [epigraph]
  [alternative=epigraph]

\startuserdata [epigraph] [author={Sean B. Carrol}]
    The fraction of fossil olfactory receptor genes is significantly higher in
    all species with full color vision. This suggests that the evolution of
    trichromatic vision --- which allows these primates to detect food, mates,
    and danger with visual cues --- has reduced their reliance on the sense of
    smell.
\stopuserdata