summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-10-18 00:46:16 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2018-10-18 00:46:16 +0200
commite2ee706a3114129601a30908d6b8cbb57068d32c (patch)
tree222b1047f4a7fe1144fefe5d0e52b78604a00f58 /doc
parente5f189d9965a70c8f3043c07c7b07d41ef268e93 (diff)
downloadcontext-e2ee706a3114129601a30908d6b8cbb57068d32c.tar.gz
2018-10-18 00:16:00
Diffstat (limited to 'doc')
-rw-r--r--doc/context/documents/general/manuals/graphics.pdfbin0 -> 291202 bytes
-rw-r--r--doc/context/documents/general/manuals/luatex.pdfbin1517157 -> 1517233 bytes
-rw-r--r--doc/context/documents/general/manuals/musings.pdfbin5761923 -> 5761926 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-cs.pdfbin853368 -> 853367 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-de.pdfbin853968 -> 853966 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-en.pdfbin857333 -> 857326 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-fr.pdfbin849625 -> 849622 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-it.pdfbin856332 -> 856324 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-cs.pdfbin346968 -> 346965 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-de.pdfbin431246 -> 431243 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-en.pdfbin344862 -> 344858 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-fr.pdfbin347384 -> 347386 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-it.pdfbin346375 -> 346369 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-nl.pdfbin345410 -> 345406 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-ro.pdfbin508251 -> 508248 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-nl.pdfbin846863 -> 846867 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-ro.pdfbin851451 -> 851448 bytes
-rw-r--r--doc/context/sources/general/manuals/graphics/graphics.tex286
18 files changed, 286 insertions, 0 deletions
diff --git a/doc/context/documents/general/manuals/graphics.pdf b/doc/context/documents/general/manuals/graphics.pdf
new file mode 100644
index 000000000..455071bc1
--- /dev/null
+++ b/doc/context/documents/general/manuals/graphics.pdf
Binary files differ
diff --git a/doc/context/documents/general/manuals/luatex.pdf b/doc/context/documents/general/manuals/luatex.pdf
index 3af62acd7..19c1aa51e 100644
--- a/doc/context/documents/general/manuals/luatex.pdf
+++ b/doc/context/documents/general/manuals/luatex.pdf
Binary files differ
diff --git a/doc/context/documents/general/manuals/musings.pdf b/doc/context/documents/general/manuals/musings.pdf
index 7573569b9..9d83dd555 100644
--- a/doc/context/documents/general/manuals/musings.pdf
+++ b/doc/context/documents/general/manuals/musings.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf
index db96bb54f..c7d6a120e 100644
--- a/doc/context/documents/general/qrcs/setup-cs.pdf
+++ b/doc/context/documents/general/qrcs/setup-cs.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-de.pdf b/doc/context/documents/general/qrcs/setup-de.pdf
index f65a41e0d..ad88a3407 100644
--- a/doc/context/documents/general/qrcs/setup-de.pdf
+++ b/doc/context/documents/general/qrcs/setup-de.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-en.pdf b/doc/context/documents/general/qrcs/setup-en.pdf
index e1e1bc1cd..5af37d839 100644
--- a/doc/context/documents/general/qrcs/setup-en.pdf
+++ b/doc/context/documents/general/qrcs/setup-en.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-fr.pdf b/doc/context/documents/general/qrcs/setup-fr.pdf
index cca294dfd..051c9b57b 100644
--- a/doc/context/documents/general/qrcs/setup-fr.pdf
+++ b/doc/context/documents/general/qrcs/setup-fr.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-it.pdf b/doc/context/documents/general/qrcs/setup-it.pdf
index 789088c63..d00631ee3 100644
--- a/doc/context/documents/general/qrcs/setup-it.pdf
+++ b/doc/context/documents/general/qrcs/setup-it.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf
index 7d38dea46..fcea50fe8 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-de.pdf b/doc/context/documents/general/qrcs/setup-mapping-de.pdf
index 0fc61cd85..523676873 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-de.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-de.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-en.pdf b/doc/context/documents/general/qrcs/setup-mapping-en.pdf
index 21537aa94..478f26510 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-en.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-en.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf
index 8ca776be2..1deb0f13a 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-it.pdf b/doc/context/documents/general/qrcs/setup-mapping-it.pdf
index a2691c1e8..481c3dcaa 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-it.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-it.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf
index 4e1491898..4fddb97c8 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf
index bbd19ee43..b1febc0aa 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-nl.pdf b/doc/context/documents/general/qrcs/setup-nl.pdf
index a1fdf1440..7eb50d16e 100644
--- a/doc/context/documents/general/qrcs/setup-nl.pdf
+++ b/doc/context/documents/general/qrcs/setup-nl.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-ro.pdf b/doc/context/documents/general/qrcs/setup-ro.pdf
index c67652ac4..e85c12bfe 100644
--- a/doc/context/documents/general/qrcs/setup-ro.pdf
+++ b/doc/context/documents/general/qrcs/setup-ro.pdf
Binary files differ
diff --git a/doc/context/sources/general/manuals/graphics/graphics.tex b/doc/context/sources/general/manuals/graphics/graphics.tex
new file mode 100644
index 000000000..84a5acc22
--- /dev/null
+++ b/doc/context/sources/general/manuals/graphics/graphics.tex
@@ -0,0 +1,286 @@
+% language=uk
+
+\usemodule[article-basic]
+\usemodule[abbreviations-smallcaps]
+\usemodule[setups-basics]
+\usemodule[scite]
+
+% \setupbodyfont
+% [dejavu]
+
+\loadsetups[context-en]
+
+\definecolor
+ [mysetupscolora]
+ [a=1,
+ t=.25,
+ r=.5,
+ g=.5]
+
+\definecolor
+ [mysetupscolorb]
+ [a=1,
+ t=.25,
+ g=.25,
+ b=.25]
+
+\definetextbackground
+ [mysetups]
+ [before=\blank,
+ after=\blank,
+ topoffset=10pt,
+ leftoffset=10pt,
+ location=paragraph,
+ backgroundcolor=mysetupscolora,
+ backgroundcolor=mysetupscolorb,
+ frame=off]
+
+\startsetups xml:setups:start
+ \starttextbackground[mysetups]
+\stopsetups
+
+\startsetups xml:setups:stop
+ \stoptextbackground
+\stopsetups
+
+\starttext
+
+\startbuffer[image]
+ \startluacode
+
+ local min, max, random = math.min, math.max, math.random
+
+ -- kind of self-explaining:
+
+ local xsize = 210
+ local ysize = 297
+ local colordepth = 1
+ local usemask = true
+ local colorspace = "rgb"
+
+ -- initialization:
+
+ local bitmap = graphics.bitmaps.new(xsize,ysize,colorspace,colordepth,usemask)
+
+ -- filling the bitmap:
+
+ local data = bitmap.data
+ local mask = bitmap.mask
+ local minmask = 100
+ local maxmask = 200
+
+ for i=1,ysize do
+ local d = data[i]
+ local m = mask[i]
+ for j=1,xsize do
+ d[j] = { i, max(i,j), j, min(i,j) }
+ m[j] = random(minmask,maxmask)
+ end
+ end
+
+ -- flushing the lot:
+
+ graphics.bitmaps.tocontext(bitmap)
+
+ \stopluacode
+\stopbuffer
+
+\definelayer
+ [page]
+ [width=\paperwidth,
+ height=\paperheight]
+
+\setlayer
+ [page]
+ {\scale
+ [width=\paperwidth]
+ {\ignorespaces
+ \getbuffer[image]%
+ \removeunwantedspaces}}
+
+\setlayer
+ [page]
+ [preset=rightbottom,
+ hoffset=10mm,
+ voffset=45mm]
+ {\scale
+ [width=.6\paperwidth]
+ {Graphics}}
+
+% \setlayer
+% [page]
+% [preset=righttop,
+% hoffset=10mm,
+% voffset=20mm]
+% {\rotate{\scale
+% [width=.3\paperheight]
+% {\ConTeXt\ MkIV}}}
+
+\setlayer
+ [page]
+ [preset=rightbottom,
+ hoffset=10mm,
+ voffset=20mm]
+ {\scale
+ [width=.6\paperwidth]
+ {Hans Hagen}}
+
+\startpagemakeup
+ \flushlayer[page]
+ \vfill
+\stoppagemakeup
+
+\startsubject[title=Introduction]
+
+This manual is about integrating graphics your document. Doing this is not really
+that complex so this manual will be short. Because graphic inclusion is related
+to the backend some options will discussed. It's typical one of these manuals
+that can grow over time.
+
+\stopsubject
+
+\startsubject[title=Inclusion]
+
+The command to include an image is:
+
+\showsetup{externalfigure}
+
+and its related settings are:
+
+\showsetup{setupexternalfigure}
+
+So you can say:
+
+\starttyping[option=TEX]
+\externalfigure[cow.pdf][width=4cm]
+\stoptyping
+
+The suffix is optional, which means that this will also work:
+
+\starttyping[option=TEX]
+\externalfigure[cow][width=4cm]
+\stoptyping
+
+\stopsubject
+
+\startsubject[title=Defining]
+
+{\em todo}
+
+\showsetup{useexternalfigure}
+\showsetup{defineexternalfigure}
+\showsetup{registerexternalfigure}
+
+\stopsubject
+
+\startsubject[title=Analyzing]
+
+{\em todo}
+
+\showsetup{getfiguredimensions}
+
+\showsetup{figurefilename}
+\showsetup{figurefilepath}
+\showsetup{figurefiletype}
+\showsetup{figurefullname}
+\showsetup{figureheight}
+\showsetup{figurenaturalheight}
+\showsetup{figurenaturalwidth}
+\showsetup{figuresymbol}
+\showsetup{figurewidth}
+
+\showsetup{noffigurepages}
+
+\stopsubject
+
+\startsubject[title=Collections]
+
+{\em todo}
+
+\showsetup{externalfigurecollectionmaxheight}
+\showsetup{externalfigurecollectionmaxwidth}
+\showsetup{externalfigurecollectionminheight}
+\showsetup{externalfigurecollectionminwidth}
+\showsetup{externalfigurecollectionparameter}
+\showsetup{startexternalfigurecollection}
+
+\stopsubject
+
+\startsubject[title=Conversion]
+
+{\em todo}
+
+\stopsubject
+
+\startsubject[title=Figure databases]
+
+{\em todo}
+
+\showsetup{usefigurebase}
+
+\stopsubject
+
+\startsubject[title=Overlays]
+
+{\em todo}
+
+\showsetup{overlayfigure}
+\showsetup{pagefigure}
+
+\stopsubject
+
+\startsubject[title=Scaling]
+
+Images are normally scaled proportionally but if needed you can give an
+explicit height and width. The \type {\scale} command shares this property
+and can be used to scale in the same way as \type {\externalfigure}. I will
+illustrate this with an example.
+
+You can define your own bitmaps, like I did with the cover of this manual:
+
+\typebuffer[image][option=LUA]
+
+The actually inclusion of this image happened with:
+
+\starttyping[option=TEX]
+\scale
+ [width=\paperwidth]
+ {\getbuffer[image]}
+\stoptyping
+
+\stopsubject
+
+\startsubject[title=The backend]
+
+Traditionally \TEX\ sees an image as just a box with dimensions and in \LUATEX\
+it is actually a special kind of rule that carries information about what to
+inject in the final (\PDF) file. In regular \LUATEX\ the core formats \type
+{pdf}, \type {png}, \type {jpg} and \type {jp2} are dealt with by the backend but
+in \CONTEXT\ we can use \LUA\ instead. We might default to that method at some
+point but for now you need to enable that explicitly:
+
+\starttyping[option=TEX]
+\enabledirectrive[graphics.pdf.uselua]
+\enabledirectrive[graphics.jpg.uselua]
+\enabledirectrive[graphics.jp2.uselua]
+\enabledirectrive[graphics.png.uselua]
+\stoptyping
+
+All four can be enabled with:
+
+\starttyping[option=TEX]
+\enabledirectrive[graphics.uselua]
+\stoptyping
+
+Performance|-|wise only \PNG\ inclusion can be less efficient, but only when you
+use interlaced images or large images with masks. It makes no real sense in a
+professional workflow to use the (larger) interlaced images, and masks are seldom
+used at high resolutions, so in practice one will not really notice loss of
+performance.
+
+The advantage of this method is that we can provide more options, intercept bad
+images that make the backend abort and lessen the dependency on libraries.
+
+\stopsubject
+
+\stoptext