Changes

Jump to navigation Jump to search
1,416 bytes added ,  11:19, 28 November 2020
no edit summary
<?xml version='1.0'?>
<!-- this file was generated on 2020-08-20T09:05 -->
<cd:commandgroup generated="yes" name="attachment" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
<cd:shortdesc><!-- a short command summary goes here -->
The instances of <tt>\<i>attachment</i></tt> are used for inclusion of attachment files into the PDF output.
</cd:shortdesc>
</cd:command>
</cd:variants>
<cd:description><!-- the long description of the command goes here -->
</cd:description>
<cd:examples><!-- command example(s)<cd:example title="Use of attachment with customized symbol (you need to create a file &quot;myattachment.txt&quot;), that why the demo here doesn't show attachment."></cd:examplecontext source="yes" text="produces">\setuppapersize[A6,landscape] %----------------------------------------------->------------------------------- \setupinteraction[state=start] % #0 - Activate interaction %------------------------------------------------------------------------------ \startuseMPgraphic{myattachmentsymbol} % #1 - Draw a symbol, here a paperclip! path pa; numeric u; u=1mm;numeric Ra; Ra=u/2; numeric Rb; Rb=1.5Ra; numeric Rc; Rc=1.35Rb;<numeric La; La=3.5u; numeric Lb; Lb=-La/cd:examples>10; numeric Lc; Lc=1.2*La; pair a[];a0=(0,0);a1=(La,0); a2=(La+Ra,-Ra); a3=(La,-2Ra);<cd:notes>a4=(Lb,-2Ra); a5=(Lb-Rb,-2Ra+Rb); a6=(Lb,-2Ra+2Rb);<!a7=(Lc,-2Ra+2Rb); a8=(Lc+Rc,-2Ra+2Rb-Rc); a9=(Lc,-2Ra+2Rb- this is for special remarks that do not fit elsewhere2Rc);a10=(1u, like discovered bugs in specific context versions-2Ra+2Rb-2Rc); <cdpa :note author="(a0--a1..a2..a3--a4..a5..a6--a7..a8.." datea9--a10) rotated 45; path pb;pb :="fullcircle scaled (2.2*(Lc-Lb-Rb)) shifted (center(pa)) ;fill pb withcolor 0.5white;pickup pencircle scaled (1."5*(Rb-Ra)) ;draw pa withcolor white;\stopuseMPgraphic %------------------------------------------------------------------------------  \definesymbol % #2 - Define the drawing as a symbol [myattachmentsym] [\useMPgraphic{myattachmentsymbol}] %------------------------------------------------------------------------------ \setupattachments % #3 - Use the symbol for attachment [symbol=myattachmentsym] %------------------------------------------------------------------------------ \starttext % #4 - Use it Text before \attachment [file={myattachment.txt}, title={attachment title}, location=rightmargin]and after. \stoptext </context></cd:example></cd:noteexamples>--<cd:notes></cd:notes>
<cd:seealso>
<!-- one or more of these:
<cd:commandref name="xx"></cd:commandref>
<cd:wikipage page="xx"></cd:wikipage>
<cd:url url="https://xx"></cd:url>
<cd:manual pdf="xx"></cd:manual>
<cd:source file="xx"></cd:source>
-->
<cd:commandref name="_startattachment" originator="system"></cd:commandref>
<cd:commandref name="defineattachment" originator="system"></cd:commandref>
<cd:commandref name="setupattachment" originator="system"></cd:commandref>
<cd:source file="scrn-wid.mkvi" originator="system"></cd:source> <cd:wikipage originator="system" page="Category:Pdf"></cd:wikipage>
<cd:commandref name="registerattachment"></cd:commandref>
<cd:commandref name="setupattachments"></cd:commandref>
<cd:commandref name="placeattachments"></cd:commandref> </cd:seealso>
</cd:commandgroup>

Navigation menu