diff --git a/doc/Cite.xml b/doc/Cite.xml index 4fb6b7ad..a03268e7 100644 --- a/doc/Cite.xml +++ b/doc/Cite.xml @@ -1,7 +1,7 @@ - + diff --git a/doc/Examples.xml b/doc/Examples.xml index d1d6611b..19143f17 100644 --- a/doc/Examples.xml +++ b/doc/Examples.xml @@ -1,7 +1,7 @@ - + diff --git a/doc/How-it-opens-files.xml b/doc/How-it-opens-files.xml index 853799e3..a7a1bc16 100644 --- a/doc/How-it-opens-files.xml +++ b/doc/How-it-opens-files.xml @@ -1,7 +1,7 @@ - + diff --git a/doc/How-it-works.xml b/doc/How-it-works.xml index 18277cf0..69a243d2 100644 --- a/doc/How-it-works.xml +++ b/doc/How-it-works.xml @@ -1,7 +1,7 @@ - + @@ -55,7 +55,7 @@ VipsPel *pixel = VIPS_REGION_ADDR( region, x, y ); g_object_unref( region ); - The action that vips_region_prepare() takes varies with the type of image. If the image is a file on disc, for example, then VIPS will arrange for a refsect3 of the file to be read in. + The action that vips_region_prepare() takes varies with the type of image. If the image is a file on disc, for example, then VIPS will arrange for a section of the file to be read in. (* there is an image access mode where you can just use a pointer, but it’s rarely used) @@ -136,7 +136,7 @@ g_object_unref( region ); Data sources - VIPS has data sources which can supply pixels for processing from a variety of sources. VIPS can stream images from files in VIPS native format, from tiled TIFF files, from binary PPM/PGM/PBM/PFM, from Radiance (HDR) files, from FITS images and from tiled OpenEXR images. VIPS will automatically unpack other formats to temporary disc files for you but this can obviously generate a lot of disc traffic. It also has a special sequential mode for streaming operations on non-random-access formats. Another refsect3 in these docs explains how libvips opens a file. One of the sources uses the how libvips opens a file. One of the sources uses the ImageMagick (or optionally GraphicsMagick library, so VIPS can read any image format that these libraries can read. diff --git a/doc/Makefile.am b/doc/Makefile.am index 036dcded..8b202858 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -127,7 +127,7 @@ HTML_IMAGES = \ # pandoc makes section headers, we want refsect3 for gtk-doc .md.xml: pandoc -s --template="$(realpath pandoc-docbook-template.docbook)" --wrap=none -V title="$<" -f markdown+smart -t docbook -o $@ $< - sed -e s/section/refsect3/g < $@ > x.$@ && mv x.$@ $@ + sed -i -e 's| - + @@ -66,7 +66,7 @@ operation flags: sequential nocache You can also call vips_dzsave() from any language with a libvips binding, or by using .dz or .szi as an output file suffix. - Writing <link xlink:href="http://en.wikipedia.org/wiki/Deep_Zoom">DeepZoom</link> pyramids + Writing DeepZoom pyramids The --layout option sets the basic mode of operation. With no --layout, dzsave writes DeepZoom pyramids. For example: @@ -102,7 +102,7 @@ $ vips dzsave huge.tif myzoom --layout zoomify - Writing <link xlink:href="https://developers.google.com/maps/">Google Maps</link> pyramids + Writing Google Maps pyramids Use --layout google to write Google maps-style pyramids. These are compatible with Leaflet. For example: diff --git a/doc/Using-vipsthumbnail.xml b/doc/Using-vipsthumbnail.xml index 3cb0ae44..f71be415 100644 --- a/doc/Using-vipsthumbnail.xml +++ b/doc/Using-vipsthumbnail.xml @@ -1,7 +1,7 @@ - + @@ -56,7 +56,7 @@ $ cat k2.jpg | \ $ vipsthumbnail *.jpg - will make a thumbnail for every jpeg in the current directory.  See the Output directory refsect3 below to see how to change where thumbnails are written. + will make a thumbnail for every jpeg in the current directory.  See the Output directory section below to see how to change where thumbnails are written. vipsthumbnail will process images one after the other. You can get a good speedup by running several vipsthumbnails in parallel, depending on how much load you want to put on your system. For example: diff --git a/doc/binding.md b/doc/binding.md index 851fbdb2..dee65318 100644 --- a/doc/binding.md +++ b/doc/binding.md @@ -169,7 +169,7 @@ the method-missing hook and attempt to run any method calls not implemented by the `Image` class as libvips operators. In effect, the binding is generated at runtime. -# Dynamic langauge without FFI +# Dynamic language without FFI PHP does not have a useful FFI, unfortunately, so for this language a small C module implements the general `vips_call()` function for PHP language diff --git a/doc/binding.xml b/doc/binding.xml index 24e30f7b..097651e7 100644 --- a/doc/binding.xml +++ b/doc/binding.xml @@ -1,7 +1,7 @@ - + @@ -173,8 +173,8 @@ VImage VImage::invert( VOption *options ) Since these languages are dynamic, they can add another trick: they intercept the method-missing hook and attempt to run any method calls not implemented by the Image class as libvips operators. In effect, the binding is generated at runtime. - - Dynamic langauge without FFI + + Dynamic language without FFI PHP does not have a useful FFI, unfortunately, so for this language a small C module implements the general vips_call() function for PHP language types, and a larger pure PHP layer makes it convenient to use. diff --git a/doc/libvips-from-C++.xml b/doc/libvips-from-C++.xml index 5511aaf8..381d1bf7 100644 --- a/doc/libvips-from-C++.xml +++ b/doc/libvips-from-C++.xml @@ -1,7 +1,7 @@ - + diff --git a/doc/meson.build b/doc/meson.build index 197f4972..25c6a125 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -67,25 +67,45 @@ markdown_content_files = files( 'Making-image-pyramids.md', ) -markdown_content_files_docbook = [] -foreach markdown_content_file : markdown_content_files +pandoc = find_program('pandoc', required: false) + +if pandoc.found() # we have some files in markdown ... convert to docbook for gtk-doc - # pandoc makes section headers, we want refsect3 for gtk-doc - markdown_content_files_docbook += configure_file( - input: markdown_content_file, - command: [ - find_program('pandoc'), + gen = generator(pandoc, + output: '@BASENAME@.xml', + arguments: [ '@INPUT@', - '--template', files('pandoc-docbook-template.docbook'), + '--template=@0@'.format(join_paths(meson.current_source_dir(), 'pandoc-docbook-template.docbook')), '--wrap=none', '-V', 'title=@BASENAME@', '-f', 'markdown+smart', '-t', 'docbook', '-o', '@OUTPUT@', - ], - output: '@BASENAME@.xml', + ] ) -endforeach + + markdown_content_files_generated = gen.process(markdown_content_files) + + # pandoc makes section headers, we want refsect3 for gtk-doc + markdown_content_files_docbook = custom_target('gen-docs', + output: 'generated', + input: markdown_content_files_generated, + command: [ 'sed', '-i', '-e', 's|