ConTeXt writer: Changed 'descr' to 'description', fixed alignment.

This commit is contained in:
John MacFarlane 2011-08-20 15:30:57 -07:00
parent 64f8bdf6f2
commit 24095e0615
3 changed files with 40 additions and 41 deletions

View file

@ -214,8 +214,8 @@ defListItemToConTeXt :: ([Inline], [[Block]]) -> State WriterState Doc
defListItemToConTeXt (term, defs) = do
term' <- inlineListToConTeXt term
def' <- liftM vsep $ mapM blockListToConTeXt defs
return $ "\\startdescr" <> braces term' $$ nest 2 def' $$
"\\stopdescr" <> blankline
return $ "\\startdescription" <> braces term' $$ nest 2 def' $$
"\\stopdescription" <> blankline
-- | Convert list of block elements to ConTeXt.
blockListToConTeXt :: [Block] -> State WriterState Doc

@ -1 +1 @@
Subproject commit aa479cad5b23fc4c95c379b5a57d77239d9e8099
Subproject commit 939e3e151bdc9de5ee0247f0bc29d16fc4d4bb66

View file

@ -14,10 +14,9 @@
\setuphead[subsection][style=\tfb]
\setuphead[subsubsection][style=\bf]
% define descr (for definition lists)
\definedescription[descr][
headstyle=bold,style=normal,align=left,location=hanging,
width=broad,margin=1cm]
% define description (for definition lists)
\definedescription[description][
headstyle=bold,style=normal,location=hanging,width=broad,margin=1cm]
% prevent orphaned list intros
\setupitemize[autointro]
@ -439,55 +438,55 @@ B. Williams
Tight using spaces:
\startdescr{apple}
\startdescription{apple}
red fruit
\stopdescr
\stopdescription
\startdescr{orange}
\startdescription{orange}
orange fruit
\stopdescr
\stopdescription
\startdescr{banana}
\startdescription{banana}
yellow fruit
\stopdescr
\stopdescription
Tight using tabs:
\startdescr{apple}
\startdescription{apple}
red fruit
\stopdescr
\stopdescription
\startdescr{orange}
\startdescription{orange}
orange fruit
\stopdescr
\stopdescription
\startdescr{banana}
\startdescription{banana}
yellow fruit
\stopdescr
\stopdescription
Loose:
\startdescr{apple}
\startdescription{apple}
red fruit
\stopdescr
\stopdescription
\startdescr{orange}
\startdescription{orange}
orange fruit
\stopdescr
\stopdescription
\startdescr{banana}
\startdescription{banana}
yellow fruit
\stopdescr
\stopdescription
Multiple blocks with italics:
\startdescr{{\em apple}}
\startdescription{{\em apple}}
red fruit
contains seeds, crisp, pleasant to taste
\stopdescr
\stopdescription
\startdescr{{\em orange}}
\startdescription{{\em orange}}
orange fruit
\starttyping
@ -497,45 +496,45 @@ Multiple blocks with italics:
\startblockquote
orange block quote
\stopblockquote
\stopdescr
\stopdescription
Multiple definitions, tight:
\startdescr{apple}
\startdescription{apple}
red fruit
computer
\stopdescr
\stopdescription
\startdescr{orange}
\startdescription{orange}
orange fruit
bank
\stopdescr
\stopdescription
Multiple definitions, loose:
\startdescr{apple}
\startdescription{apple}
red fruit
computer
\stopdescr
\stopdescription
\startdescr{orange}
\startdescription{orange}
orange fruit
bank
\stopdescr
\stopdescription
Blank line after term, indented marker, alternate markers:
\startdescr{apple}
\startdescription{apple}
red fruit
computer
\stopdescr
\stopdescription
\startdescr{orange}
\startdescription{orange}
orange fruit
\startitemize[n][stopper=.]
@ -544,7 +543,7 @@ Blank line after term, indented marker, alternate markers:
\item
sublist
\stopitemize
\stopdescr
\stopdescription
\subject{HTML Blocks}