From 5135aef167bec739fe429e1aa987671768b237bc Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Sat, 30 Jul 2016 01:22:07 +0200 Subject: 2016-07-30 00:31:00 --- .../manuals/workflows/workflows-contents.tex | 13 -- .../manuals/workflows/workflows-graphics.tex | 157 --------------------- .../manuals/workflows/workflows-injectors.tex | 102 ------------- .../manuals/workflows/workflows-introduction.tex | 25 ---- .../general/manuals/workflows/workflows-mkiv.tex | 32 ----- .../manuals/workflows/workflows-resources.tex | 156 -------------------- .../general/manuals/workflows/workflows-setups.tex | 72 ---------- .../general/manuals/workflows/workflows-style.tex | 49 ------- .../manuals/workflows/workflows-suspects.tex | 54 ------- .../manuals/workflows/workflows-titlepage.tex | 37 ----- .../general/manuals/workflows/workflows-xml.tex | 96 ------------- 11 files changed, 793 deletions(-) delete mode 100644 doc/context/sources/general/manuals/workflows/workflows-contents.tex delete mode 100644 doc/context/sources/general/manuals/workflows/workflows-graphics.tex delete mode 100644 doc/context/sources/general/manuals/workflows/workflows-injectors.tex delete mode 100644 doc/context/sources/general/manuals/workflows/workflows-introduction.tex delete mode 100644 doc/context/sources/general/manuals/workflows/workflows-mkiv.tex delete mode 100644 doc/context/sources/general/manuals/workflows/workflows-resources.tex delete mode 100644 doc/context/sources/general/manuals/workflows/workflows-setups.tex delete mode 100644 doc/context/sources/general/manuals/workflows/workflows-style.tex delete mode 100644 doc/context/sources/general/manuals/workflows/workflows-suspects.tex delete mode 100644 doc/context/sources/general/manuals/workflows/workflows-titlepage.tex delete mode 100644 doc/context/sources/general/manuals/workflows/workflows-xml.tex (limited to 'doc/context/sources/general/manuals/workflows') diff --git a/doc/context/sources/general/manuals/workflows/workflows-contents.tex b/doc/context/sources/general/manuals/workflows/workflows-contents.tex deleted file mode 100644 index a32f4737d..000000000 --- a/doc/context/sources/general/manuals/workflows/workflows-contents.tex +++ /dev/null @@ -1,13 +0,0 @@ -% language=uk - -\environment workflows-style - -\startcomponent workflows-contents - -\starttitle[title=Contents] - - \placelist[chapter] - -\stoptitle - -\stopcomponent diff --git a/doc/context/sources/general/manuals/workflows/workflows-graphics.tex b/doc/context/sources/general/manuals/workflows/workflows-graphics.tex deleted file mode 100644 index 55a8ad701..000000000 --- a/doc/context/sources/general/manuals/workflows/workflows-graphics.tex +++ /dev/null @@ -1,157 +0,0 @@ -% language=uk - -\environment workflows-style - -\startcomponent workflows-graphics - -\startchapter[title=Graphics] - -\startsection[title=Bad names] - -After many years of using \CONTEXT\ in workflows where large amounts of source files -as well as graphics were involved we can safely say that it's hard for publishers to -control the way these are named. This is probably due to the fact that in a -click|-|and|-|point based desktop publishing workflow names don't matter as one stays on -one machine, and names are only entered once (after that these names become abstractions and -get cut and pasted). Proper consistent resource managament is simply not part of the flow. - -This means that you get names like: - -\starttyping -foo_Bar_01_03-a.EPS -foo__Bar-01a_03.eps -foo__Bar-01a_03.eps -foo BarA 01-03.eps -\stoptyping - -Especially when a non proportional screen font is used multiple spaces can look -like one. In fancy screen fonts upper and lowercase usage might get obscured. It -really makes one wonder if copy|-|editing or adding labels to graphics isn't -suffering from the same problem. - -Anyhow, as in an automated rendering workflow the rendering is often the last step you -can imagine that when names get messed up it's that last step that gets blamed. It's not -that hard to sanitize names of files on disk as well as in the files that refer to them, -and we normally do that we have complete control. This is no option when all the resources -are synchronzied from elsewhere. In that case the only way out is signaling potential -issues. Say that in the source file there is a reference: - -\starttyping -foo_Bar_01_03-a.EPS -\stoptyping - -and that the graphic on disk has the same name, but for some reason after an update -has become: - -\starttyping -foo-Bar_01_03-a.EPS -\stoptyping - -The old image is probably still there so the update is not reflected in the final -product. This is not that uncommon when you deal with tens of thousands of files, -many editors and graphic designers, and no strict filename policy. - -For this we provide the following tracing option: - -\starttyping -\enabletrackers[graphics.lognames] -\stoptyping - -This will put information in the log file about included graphics, like: - -\starttyping -system > graphics > start names - -used graphic > asked : cow.pdf -used graphic > comment : not found -used graphic > asked : t:/sources/cow.pdf -used graphic > format : pdf -used graphic > found : t:/sources/cow.pdf -used graphic > used : t:/sources/cow.pdf - -system > graphics > stop names -\stoptyping - -You can also add information to the file itself: - -\starttyping -\usemodule[s-figures-names] -\stoptyping - -Of course that has to be done at the end of the document. Bad names are reported -and suitable action can be taken. - -\stopsection - -\startsection[title=Downsampling] - -You can plug in you rown converter, here is an example: - -\starttyping -\startluacode - -figures.converters.jpg = figures.converters.jpg or { } - -figures.converters.jpg["lowresjpg.pdf"] = - function(oldname,newname,resolution) - figures.programs.run ( - [[gm]], - [[convert -geometry %nx%x%ny% -compress JPEG "%old%" "%new%"]], - { - old = old, - new = new, - nx = resolution or 300, - ny = resolution or 300, - } - ) - end -\stopluacode -\stoptyping - -You can limit the search to a few types and set the resolution with: - -\starttyping -\setupexternalfigures - [order={pdf,jpg}, - resolution=100, - method=auto] -\stoptyping - -And use it like: - -\starttyping -\externalfigure[verybig.jpg][height=10cm] -\stoptyping - -The second string passed to the \type {run} helper contains the arguments to the -first one. The variables between percent signs get replaced by the variables in -the tables passed as third argument. - -\stopsection - -\startsection[title=Trackers] - -If you want a lot of info you can say: - -\starttyping -\enabletrackers[figures.*] -\stoptyping - -But you can be more specific. With \type {graphics.locating} you will get some -insight in where files are looked for. The \type {graphics.inclusion} tracker -gives some more info about actual inclusion. The \type {graphics.bases} is kind -of special and only makes sense when you use the graphic database options. The -\type {graphics.conversion} and related tracker \type {graphics.programs} show if -and how conversion of images takes place. - -The \type {graphics.lognames} will make sure that some extra information about -used graphics is saved in the log file, while \type {graphics.usage} will produce -a file \typ {-figures-usage.lua} that contains information about found -(or not found) images and the way they are used. - -\stopsection - -\stopchapter - -\stopcomponent - diff --git a/doc/context/sources/general/manuals/workflows/workflows-injectors.tex b/doc/context/sources/general/manuals/workflows/workflows-injectors.tex deleted file mode 100644 index daae11c82..000000000 --- a/doc/context/sources/general/manuals/workflows/workflows-injectors.tex +++ /dev/null @@ -1,102 +0,0 @@ -% language=uk - -\environment workflows-style - -\startcomponent workflows-injectors - -\startchapter[title={Injectors}] - -When you have no control over the source but need to manually tweak some aspects -of the typesetting, like an occasional page break of column switch, you can use -the injector mechanism. This mechanism is part of list and register building but -can also be used elsewhere. - -\startbuffer[one] -\startmixedcolumns[balance=yes] - \dotestinjector{test}line 1 \par - \dotestinjector{test}line 2 \par - \dotestinjector{test}line 3 \par - \dotestinjector{test}line 4 \par - \dotestinjector{test}line 5 -\stopmixedcolumns -\stopbuffer - -\startbuffer[two] -\startmixedcolumns[balance=yes] - \dotestinjector{test}line 1 \par - \dotestinjector{test}line 2 \par - \dotestinjector{test}line 3 \par - \dotestinjector{test}line 4 \par - \dotestinjector{test}line 5 -\stopmixedcolumns -\stopbuffer - -We have two buffers: - -\typebuffer[one] - -and - -\typebuffer[two] - -When typeset these come out as: - -\blank \startpacked \bf \getbuffer[one] \stoppacked \blank - -and - -\blank \startpacked \bf \getbuffer[two] \stoppacked \blank - -We can enable (and show) the injectors with: - -\startbuffer -\doactivateinjector{test} \showinjector -\stopbuffer - -\typebuffer \getbuffer - -Now we get: - -\blank \startpacked \bf \getbuffer[one] \stoppacked \blank - -and - -\blank \startpacked \bf \getbuffer[two] \stoppacked \blank - -The small numbers are injector points. These will of course change when we add -more in|-|between. Let's add actions to some of the injection points: - -\startbuffer -\setinjector[test][13][{\column}] -\setinjector[test][17][{\column}] -\stopbuffer - -\typebuffer \getbuffer - -As expected we now get column breaks: - -\blank \startpacked \bf \getbuffer[one] \stoppacked \blank - -and - -\blank \startpacked \bf \getbuffer[two] \stoppacked \blank - -\stopchapter - -\stopcomponent - -% to be described: - -% \setinjector[register][3][\column] -% \setinjector[list] [2][{\blank[3*big]}] - -% \starttext -% \placelist[section][criterium=text] -% \blank[3*big] -% \placeregister[index][criterium=text] -% \page -% \startsection[title=Alpha] first \index{first} \stopsection -% \startsection[title=Beta] second \index{second} \stopsection -% \startsection[title=Gamma] third \index{third} \stopsection -% \startsection[title=Delta] fourth \index{fourth} \stopsection -% \stoptext diff --git a/doc/context/sources/general/manuals/workflows/workflows-introduction.tex b/doc/context/sources/general/manuals/workflows/workflows-introduction.tex deleted file mode 100644 index a88640b27..000000000 --- a/doc/context/sources/general/manuals/workflows/workflows-introduction.tex +++ /dev/null @@ -1,25 +0,0 @@ -% language=uk - -\environment workflows-style - -\startcomponent workflows-introduction - -\startchapter[title=Introduction] - -This manual contains some information about features that can help you to manage -workflows or \CONTEXT\ related processes. Because we use \CONTEXT\ ourselves all -that we need ends up in the distribution. When you discover something workflow -related that is not yet covered here, you can tell me. I simply forget about all -there is, especially if it's made for projects. Don't expect this manual to be -complete or extensive, it's just a goodie. - -\startlines -\documentvariable{author}, -\documentvariable{affiliation} -\documentvariable{location} -\currentdate[month,year] -\stoplines - -\stopchapter - -\stopcomponent diff --git a/doc/context/sources/general/manuals/workflows/workflows-mkiv.tex b/doc/context/sources/general/manuals/workflows/workflows-mkiv.tex deleted file mode 100644 index 3820e04fa..000000000 --- a/doc/context/sources/general/manuals/workflows/workflows-mkiv.tex +++ /dev/null @@ -1,32 +0,0 @@ -\setupbackend[export=yes] - -\environment workflows-style - -\startdocument - [metadata:author=Hans Hagen, - metadata:title=Workflow support in context, - author=Hans Hagen, - affiliation=PRAGMA ADE, - location=Hasselt NL, - title=workflow, - extra=support in context, - support=www.contextgarden.net, - website=www.pragma-ade.nl] - -\component workflows-titlepage - -\startfrontmatter - \component workflows-contents - \component workflows-introduction -\stopfrontmatter - -\startbodymatter - \component workflows-resources - \component workflows-graphics - \component workflows-suspects - \component workflows-injectors - \component workflows-xml - \component workflows-setups -\stopbodymatter - -\stopdocument diff --git a/doc/context/sources/general/manuals/workflows/workflows-resources.tex b/doc/context/sources/general/manuals/workflows/workflows-resources.tex deleted file mode 100644 index cbed64864..000000000 --- a/doc/context/sources/general/manuals/workflows/workflows-resources.tex +++ /dev/null @@ -1,156 +0,0 @@ -% language=uk - -\environment workflows-style - -\startcomponent workflows-resources - -\startchapter[title=Accessing resources] - -One of the benefits of \TEX\ is that you can use it in automated workflows -where large quantities of data is involved. A document can consist of -several files and normally also includes images. Of course there are styles -involved too. At \PRAGMA\ normally put styles and fonts in: - -\starttyping -/data/site/context/tex/texmf-project/tex/context/user//... -/data/site/context/tex/texmf-fonts/data///... -\stoptyping - -alongside - -\starttyping -/data/framework/... -\stoptyping - -where the job management services are put, while we put resources in: - -\starttyping -/data/resources/... -\stoptyping - -The processing happens in: - -\starttyping -/data/work// -\stoptyping - -Putting styles (and resources like logos and common images) and fonts (if the -project has specific ones not present in the distribution) in the \TEX\ tree -makes sense because that is where such files are normally searched. Of course you -need to keep the distributions file database upto|-|date after adding files there. - -Processing has to happen isolated from other runs so there we use unique -locations. The services responsible for running also deal with regular cleanup -of these temporary files. - -Resources are somewhat special. They can be stable, i.e.\ change seldom, but more -often they are updated or extended periodically (or even daily). We're not -talking of a few files here but of thousands. In one project we have 20 thousand -resources, that can be combined into arbitrary books, and in another one, each -chapter alone is about 400 \XML\ and image files. That means we can have 5000 -files per book and as we have at least 20 books, we end up with 100K files. In -the first case accessing the resources is easy because there is a well defined -structure (under our control) so we know exactly where each file sits in the -resource tree. In the 100K case there is a deeper structure which is in itself -predictable but because many authors are involved the references to these files -are somewhat instable (and undefined). It is surprising to notice that publishers -don't care about filenames (read: cannot control all the parties involved) which -means that we have inconsist use of mixed case in filenames, and spaces, -underscores and dashes creeping in. Because typesetting for paper is always at -the end of the pipeline (which nowadays is mostly driven by (limitations) of web -products) we need to have a robust and flexible lookup mechanism. It's a side -effect of the click and point culture: if objects are associated (filename in -source file with file on the system) anything you key in will work, and -consistency completely depends on the user. And bad things then happen when files -are copied, renamed, etc. In that stadium we can better be tolerant than try to -get it fixed. \footnote {From what we normally receive we often conclude that -copy|-|editing and image production companies don't impose any discipline or -probably simply lack the tools and methods to control this. Some of our workflows -had checkers and fixers, so that when we got 5000 new resources while only a few -needed to be replaced we could filter the right ones. It was not uncommon to find -duplicates for thousands of pictures: similar or older variants.} - -\starttyping -foo.jpg -bar/foo.jpg -images/bar/foo.jpg -images/foo.jpg -\stoptyping - -The xml files have names like: - -\starttyping -b-c.xml -a/b-c.jpg -a/b/b-c.jpg -a/b/c/b-c.jpg -\stoptyping - -So it's sort of a mess, especially if you add arbitrary casing to this. Of course -one can argue that a wrong (relative) location is asking for problems, it's less -an issue here because each image has a unique name. We could flatten the resource -tree but having tens of thousands of files on one directory is asking for -problems when you want to manage them. - -The typesetting (and related services) run on virtual machines. The three -directories: - -\starttyping -/data/site -/data/resources -/data/work -\stoptyping - -are all mounted as nfs shares on a network storage. For the styles (and binaries) -this is no big deal as normally these files are cached, but the resources are -another story. Scanning the complete (mounted) resource tree each run is no -option so there we use a special mechanism in \CONTEXT\ for locating files. - -Already early in the development of \MKIV\ one of the locating mechanisms was -the following: - -\starttyping -tree:////data/resources/foo/**/drawing.jpg -tree:////data/resources/foo/**/Drawing.jpg -\stoptyping - -Here the tree is scanned once per run, which is normally quite okay when there -are not that many files and when the files reside on the machine itself. For a -more high performance approach using network shares we have a different -mechanism. This time it looks like this: - -\starttyping -dirlist:/data/resources/**/drawing.jpg -dirlist:/data/resources/**/Drawing.jpg -dirlist:/data/resources/**/just/some/place/drawing.jpg -dirlist:/data/resources/**/images/drawing.jpg -dirlist:/data/resources/**/images/drawing.jpg?option=fileonly -dirfile:/data/resources/**/images/drawing.jpg -\stoptyping - -The first two lookups are wildcard. If there is a file with that name, it will be -found. If there are more, the first hit is used. The second and third examples -are more selective. Here the part after the \type {**} has to match too. So here -we can deal with multiple files named \type {drawing.jpg}. The last two -equivalent examples are more tolerant. If no explicit match is found, a lookup -happens without being selective. The case of a name is ignored but when found, a -name with the right case is used. - -You can hook a path into the resolver for source files, for example: - -\starttyping -\usepath [dirfile://./resources/**] -\setupexternalfigures[directory=dirfile://./resources/**] -\stoptyping - -You need to make sure that file(name)s in that location don't override ones in -the regular \TEX\ tree. These extra paths are only used for source file lookups -so for instance font lookups are not affected. - -When you add, remove or move files the tree, you need to remove the \type -{dirlist.*} files in the root because these are used for locating files. A new -file will be generated automatically. Don't forget this! - -\stopchapter - -\stopcomponent diff --git a/doc/context/sources/general/manuals/workflows/workflows-setups.tex b/doc/context/sources/general/manuals/workflows/workflows-setups.tex deleted file mode 100644 index e9d120f7b..000000000 --- a/doc/context/sources/general/manuals/workflows/workflows-setups.tex +++ /dev/null @@ -1,72 +0,0 @@ -% language=uk - -\environment workflows-style - -\startcomponent workflows-setups - -\startchapter[title={Setups}] - -Setups are a powerful way to organize styles. They are basically macros but live -in their own namespace. One advantage is that spaces in a setup are ignored so -you can code without bothering about spurious spaces. Here is a trick that you -can use when one style contains directives for multiple products: - -\startbuffer -\startsetups tex:whatever - \fastsetup{tex:whatever:\documentvariable{stylevariant}} -\stopsetups - -\startsetups tex:whatever:foo - FOO -\stopsetups - -\startsetups tex:whatever:bar - BAR -\stopsetups -\stopbuffer - -\typebuffer \getbuffer - -Here we define a main setup \type {tex:whatever} that gets expanded in one of two -variants, controlled by a document variable. - -\startbuffer -\setups{tex:whatever} - -\setupdocument - [stylevariant=foo] - -\setups{tex:whatever} - -\setupdocument - [stylevariant=bar] - -\setups{tex:whatever} -\stopbuffer - -\typebuffer - -These lines result in: - -\getbuffer - -In a similar fashion you can define \XML\ setups that are used to render -elements: - -\starttyping -\startxmlsetups xml:whatever - \xmlsetup{#1}{xml:whatever:\documentvariable{stylevariant}} -\stopxmlsetups - -\startxmlsetups xml:whatever:foo - FOO: \xmlflush{#1} -\stopxmlsetups - -\startxmlsetups xml:whatever:bar - BAR: \xmlflush{#1} -\stopxmlsetups -\stoptyping - -\stopchapter - -\stopcomponent diff --git a/doc/context/sources/general/manuals/workflows/workflows-style.tex b/doc/context/sources/general/manuals/workflows/workflows-style.tex deleted file mode 100644 index f29129fcd..000000000 --- a/doc/context/sources/general/manuals/workflows/workflows-style.tex +++ /dev/null @@ -1,49 +0,0 @@ -\startenvironment workflows-style - -\usemodule - [abr-03] - -\setupbodyfont - [bookman,11pt] - -\definecolor - [maincolor] - [s=.35] - -\setuplayout - [height=middle, - width=middle, - footer=0pt] - -\setupwhitespace - [big] - -\setuphead - [chapter] - [style=\bfc, - color=maincolor, - header=high] - -\setuphead - [section] - [style=\bfb, - color=maincolor] - -\setuptyping - [color=maincolor] - -\setuptype - [color=maincolor] - -\setupdocument - [metadata:author=, - metadata:title=, - author=<author>, - affiliation=<affiliation>, - location=<location>, - title=<title>, - extra=<extra>, - support=<support>, - website=<website>] - -\stopenvironment diff --git a/doc/context/sources/general/manuals/workflows/workflows-suspects.tex b/doc/context/sources/general/manuals/workflows/workflows-suspects.tex deleted file mode 100644 index 621fd6f59..000000000 --- a/doc/context/sources/general/manuals/workflows/workflows-suspects.tex +++ /dev/null @@ -1,54 +0,0 @@ -% language=uk - -\environment workflows-style - -\startcomponent workflows-suspects - -\startchapter[title={Suspects}] - -When many authors and editors are involved there is the danger of inconsistent -spacing being applied. We're not only talking of the (often invisible in editing -programs) nobreak spaces, but also spacing inside or outside quotations and -before and after punctuation or around math. - -In \CONTEXT\ we have a built||in suspects checker that you can enable with the -following command: - -\starttyping -\enabletrackers[typesetters.suspects] -\stoptyping - -The next table shows some identified suspects. - -\starttexdefinition ShowSample #1 - \NC \type{#1} - \NC \enabletrackers[typesetters.suspects]#1\disabletrackers[typesetters.spacing] - \NC \NR -\stoptexdefinition - -\starttabulate[|||][before=,after=] - \ShowSample{foo$x$} - \ShowSample{$x$bar} - \ShowSample{foo$x$bar} - \ShowSample{$f+o+o$:} - \ShowSample{;$f+o+o$} - \ShowSample{; bar} - \ShowSample{foo:bar} - \ShowSample{\quote{ foo }} - \ShowSample{\quote{bar }} - \ShowSample{\quote{ bar}} - \ShowSample{(foo )} - \ShowSample{\{foo \}} - \ShowSample{foo{\bf gnu}bar} - \ShowSample{foo{\it gnu}bar} - \ShowSample{foo$x^2$bar} - \ShowSample{foo\nobreakspace bar} -\stoptabulate - -Of course this analysis is not perfect but we use it in final checking of complex -documents that are generated automatically from \XML. \footnote {Think of math -school books where each book is assembled from over a thousands files.} - -\stopchapter - -\stopcomponent diff --git a/doc/context/sources/general/manuals/workflows/workflows-titlepage.tex b/doc/context/sources/general/manuals/workflows/workflows-titlepage.tex deleted file mode 100644 index f184152b3..000000000 --- a/doc/context/sources/general/manuals/workflows/workflows-titlepage.tex +++ /dev/null @@ -1,37 +0,0 @@ -% language=uk - -\environment workflows-style - -\startcomponent workflows-titlepage - -\definefontfeature[LatinModernMonoVariable][default][liga=no] -\definefont[LatinModernMonoVariable][LMTypewriterVarWd-Regular*LatinModernMonoVariable sa 1] - -\startMPpage - - fill fullsquare xysized(PaperWidth,PaperHeight) withcolor .4white ; - - draw image ( - fill arrowhead fullcircle scaled .5 rotated 0 scaled 10 withcolor white ; - fill arrowhead fullcircle scaled .5 rotated 120 scaled 10 withcolor white ; - fill arrowhead fullcircle scaled .5 rotated 240 scaled 10 withcolor white ; - fill arrowhead fullcircle scaled .5 rotated 60 scaled 10 withcolor white ; - fill arrowhead fullcircle scaled .5 rotated 180 scaled 10 withcolor white ; - fill arrowhead fullcircle scaled .5 rotated 300 scaled 10 withcolor white ; - ) xsized (.9PaperWidth) shifted (0,.2PaperWidth) ; - - draw image ( - fill arrowhead fullcircle scaled .5 rotated 0 scaled 10 withcolor .4red withtransparency (1,.5) ; - fill arrowhead fullcircle scaled .5 rotated 120 scaled 10 withcolor .4green withtransparency (1,.5) ; - fill arrowhead fullcircle scaled .5 rotated 240 scaled 10 withcolor .4blue withtransparency (1,.5) ; - fill arrowhead fullcircle scaled .5 rotated 60 scaled 10 withcolor .4cyan withtransparency (1,.5) ; - fill arrowhead fullcircle scaled .5 rotated 180 scaled 10 withcolor .4magenta withtransparency (1,.5) ; - fill arrowhead fullcircle scaled .5 rotated 300 scaled 10 withcolor .4yellow withtransparency (1,.5) ; - ) xsized (.9PaperWidth) shifted (0,.2PaperWidth) ; - - draw textext ("\LatinModernMonoVariable \documentvariable{title}") xsized (.9PaperWidth) shifted (0,-.425PaperWidth) withcolor white ; - draw textext ("\LatinModernMonoVariable \documentvariable{extra}") xsized (.9PaperWidth) shifted (0,-.575PaperWidth) withcolor white ; - -\stopMPpage - -\stopcomponent diff --git a/doc/context/sources/general/manuals/workflows/workflows-xml.tex b/doc/context/sources/general/manuals/workflows/workflows-xml.tex deleted file mode 100644 index 0f29f5f55..000000000 --- a/doc/context/sources/general/manuals/workflows/workflows-xml.tex +++ /dev/null @@ -1,96 +0,0 @@ -% language=uk - -\environment workflows-style - -\startcomponent workflows-xml - -\startluacode - for i=1,10 do - local filename = string.formatters["temp-%02i.xml"](i) - local filedata = string.formatters["<?xml version='1.0'?><p>snippet %i</p>"](i) - io.savedata(filename,filedata) - end -\stopluacode - -\startchapter[title={XML}] - -When you have an \XML\ project with many files involved, finding the right spot -of something that went wrong can be a pain. In one of our project the production of -some 50 books involves 60.000 \XML\ files and 20.000 images. Say that we have the -following file: - -\startbuffer[demo] -<?xml version='1.0'?> -<document> - <include name="temp-01.xml"/> <include name="temp-02.xml"/> - <include name="temp-03.xml"/> <include name="temp-04.xml"/> - <include name="temp-05.xml"/> <include name="temp-06.xml"/> - <include name="temp-07.xml"/> <include name="temp-08.xml"/> - <include name="temp-09.xml"/> <include name="temp-10.xml"/> -</document> -\stopbuffer - -\typebuffer[demo] - -Before we process this file we will merge the content of the files defined -as includes into it. When this happens the filename is automatically -registered so it can be accessed later. - -\startbuffer -\startxmlsetups xml:initialize - \xmlincludeoptions{#1}{include}{filename|name}{recurse,basename} - \xmlsetsetup{#1}{p|document}{xml:*} -\stopxmlsetups - -\startxmlsetups xml:document - \xmlflush{#1} -\stopxmlsetups - -\startxmlsetups xml:p - \inleftmargin{\infofont\xmlinclusion{#1}} - \xmlflush{#1} - \par -\stopxmlsetups - -\xmlregistersetup{xml:initialize} - -\xmlprocessbuffer{main}{demo}{} -\stopbuffer - -\typebuffer - -In this case we put the name of the file in the margin. Depending on when and how -elements are flushed other solutions, like overlays, can be used. - -\startpacked -\getbuffer -\stoppacked - -At any moment you can see what the current node contains. The whole (merged) -document is also available: - -\startbuffer -\xmlshow{main} -\stopbuffer - -\typebuffer - -A small font is used to typeset the (sub)tree: - -\blank \getbuffer \blank - -You can also save the tree: - -\startbuffer -\xmlsave{main}{temp.xml} -\stopbuffer - -\typebuffer \getbuffer - -This file looks like: - -\typefile{temp.xml} - -\stopchapter - -\stopcomponent -- cgit v1.2.3