Difference between revisions of "Command/setupmarginblocks"

From Wiki
Jump to navigation Jump to search
m (Text replace - "Category:(.*)" to "Category:Command/$1")
 
(5 intermediate revisions by 4 users not shown)
Line 3: Line 3:
 
|attributes=
 
|attributes=
 
}}
 
}}
 +
 +
== [[Help:Reference|Syntax]] (autogenerated) ==
 +
<syntax>setupmarginblocks</syntax>
  
 
== [[Help:Reference|Syntax]] ==
 
== [[Help:Reference|Syntax]] ==
Line 61: Line 64:
 
== Example ==
 
== Example ==
 
<!-- Please fill in an example if you can -->
 
<!-- Please fill in an example if you can -->
 +
 +
By default, the marginblocks are flushed to the top. In case you want to flush all marginblocks to the bottom, you can do this:
 +
 +
<texcode>
 +
\setuplayout[
 +
    backspace=4cm,
 +
    leftmarginwidth=2cm,
 +
    width=fit,
 +
]
 +
 +
\setupmarginblocks[
 +
    location=left,
 +
    width=\leftmarginwidth,
 +
    top=\vfilll,
 +
    bottom=,
 +
]
 +
 +
\definemarginblock[demoblock][state=start]
 +
 +
\definefloat
 +
  [marginfigure]
 +
  [figure]
 +
  [default=margin]
 +
 +
\starttext
 +
 +
\dorecurse{10}{
 +
\startplacemarginfigure[reference=#1]
 +
\framed[width=\leftmarginwidth,height=3cm,background=color,backgroundcolor=darkyellow]{#1}
 +
\stopplacemarginfigure
 +
See \in[#1]. \samplefile{tufte}
 +
}
 +
 +
\dorecurse{10}{
 +
\startmarginblock[demoblock]
 +
\framed[width=\leftmarginwidth,height=5cm,background=color,backgroundcolor=darkred]{#1}
 +
\stopmarginblock
 +
See \in[#1]. \samplefile{tufte}
 +
}
 +
 +
% One left, flush.
 +
\flushallmarginblocks[1]
 +
\stoptext
 +
</texcode>
 +
 +
The result looks like this:
 +
 +
[[File:Marginfigures.png]]
  
 
== See also ==
 
== See also ==
<!-- something like [[cmd:goto|\goto]] -->
+
<!-- something like {{cmd|goto}} -->
  
 
== Help from ConTeXt-Mailinglist/Forum ==
 
== Help from ConTeXt-Mailinglist/Forum ==
Line 69: Line 120:
 
{{Forum|{{SUBPAGENAME}}}}
 
{{Forum|{{SUBPAGENAME}}}}
  
[[Category:Command/Command/Margins|setupmarginblocks]]
+
[[Category:Command/Margins|setupmarginblocks]]

Latest revision as of 16:46, 10 March 2022

\setupmarginblocks

Syntax (autogenerated)


Syntax

\setupmarginblocks[...,...=...,...]
location inmargin left middle right
style normal bold slanted boldslanted type cap small... command
width dimension
align flushleft middle flushright no
top command
inbetween command
bottom command
left command
right command
before command
after command

Description

Example

By default, the marginblocks are flushed to the top. In case you want to flush all marginblocks to the bottom, you can do this:

\setuplayout[
    backspace=4cm,
    leftmarginwidth=2cm,
    width=fit,
]

\setupmarginblocks[
    location=left,
    width=\leftmarginwidth,
    top=\vfilll,
    bottom=,
]

\definemarginblock[demoblock][state=start]

\definefloat
   [marginfigure]
   [figure]
   [default=margin]

\starttext

\dorecurse{10}{
\startplacemarginfigure[reference=#1]
\framed[width=\leftmarginwidth,height=3cm,background=color,backgroundcolor=darkyellow]{#1}
\stopplacemarginfigure
See \in[#1]. \samplefile{tufte}
}

\dorecurse{10}{
\startmarginblock[demoblock]
\framed[width=\leftmarginwidth,height=5cm,background=color,backgroundcolor=darkred]{#1}
\stopmarginblock
See \in[#1]. \samplefile{tufte}
}

% One left, flush.
\flushallmarginblocks[1]
\stoptext

The result looks like this:

Marginfigures.png

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: