X-Git-Url: https://git.distorted.org.uk/~mdw/cfd/blobdiff_plain/3dc9c14b343e27b17e149dd6c474d613c337bbd9..1f79a056146f0b172111b8379ccc344002848e66:/common.texi diff --git a/common.texi b/common.texi index 377058e..8336428 100644 --- a/common.texi +++ b/common.texi @@ -1,7 +1,5 @@ \input texinfo.tex @c -*-texinfo-*- @c -@c $Id: common.texi,v 1.2 2003/11/09 16:12:11 mdw Exp $ -@c @c Documentation for `common' @c @c (c) 1997 Mark Wooding @@ -128,8 +126,8 @@ Distribution. * Copying:: * Introduction:: * The file repository:: -* Text libraries:: +@detailmenu --- The Detailed Node Listing --- The file repository @@ -137,10 +135,7 @@ The file repository * The mklinks command:: * The findlinks command:: -Text libraries - -* Anatomy:: Structure of a text library. -* The txtlib program:: +@end detailmenu @end menu @c -------------------------------------------------------------------------- @@ -172,7 +167,7 @@ used as the basis of other similar scripts. @c -------------------------------------------------------------------------- -@node The file repository, Text libraries, Introduction, Top +@node The file repository, , Introduction, Top @chapter The file repository @@ -234,93 +229,6 @@ by default: findlinks >.links @end example - -@c -------------------------------------------------------------------------- -@node Text libraries, , The file repository, Top -@chapter Text libraries - - -Just being able to share files isn't always good enough: it's sometimes -useful to able to share small parts of files. The Common Files Distribution -comes with a simple system for extracting requested parts from a @dfn{text -library}. - - -@menu -* Anatomy:: Structure of a text library. -* The txtlib program:: -@end menu - - - -@node Anatomy, The txtlib program, Text libraries, Text libraries -@section Anatomy of a library file - -Text libraries contain a @dfn{header} followed by a number of @dfn{chunks}. -The start of a chunk is marked by a line containing a string of the form -@samp{*@@-@var{name}-@@*}; the chunk continues until the start of the next -chunk, or the end of the file. The header is simply the text preceding the -first chunk. - -Here's a simple example of a text library. - -@example -% -*-tex-*- -% -% Collection of useful macros -% - -% *@@-todo-@@* - -\newcommand\todo[1]@{% - \par% - \dimen@@\linewidth% - \advance\dimen@@-\tw@@\fboxsep% - \advance\dimen@@-\tw@@\fboxrule% - \fbox@{\expandafter\parbox\expandafter@{\the\dimen@@@}@{% - \begin@{note@}[To do:]% - #1% - \end@{note@}% - @}@}% - \par% -@} - -% *@@-indexing-@@* - -\newindex@{default@}@{idx@}@{ind@}@{Index@} -\atdef^@{\index@} -\atdef_@{\index*@} -@end example - -The file contains a short header containing a line to tell Emacs what mode -to use when editing it and a brief description of the file. It contains two -chunks, named @code{todo} and @code{indexing} - - -@node The txtlib program, , Anatomy, Text libraries -@section The @code{txtlib} program - -The @code{txtlib} program can be used to perform some simple operations on -text libraries: - -@example -txtlib [-x] [-o @var{file}] @var{library}... -txtlib -l @var{library}... -@end example - -By default, or if the @code{-x} option is given, @code{txtlib} extracts -chunks from libraries. It reads a list of chunk names from standard input, -one per line. It then examines each @var{library} named on the command line, -and extracts the requested chunks, writing them to standard output, or to a -named file. Note that the chunks are extracted in the order they appear in -the libraries, not the order in which their chunk names were listed. - -If the @code{-l} option is given, @code{txtlib} scans each @var{library} in -turn, writing the names of all the chunks it finds to standard output. - - - - @c -------------------------------------------------------------------------- @contents