File: cexcerpt.man

package info (click to toggle)
infernal 1.1.5-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 74,208 kB
  • sloc: ansic: 230,749; perl: 14,433; sh: 6,147; makefile: 3,071; python: 1,247
file content (73 lines) | stat: -rwxr-xr-x 1,389 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
.TH "cexcerpt" 1 "@SSDK_DATE@" "SSDK @SSDK_VERSION@" "SSDK"

.SH NAME
.TP 
cexcerpt - extract tagged code chunks for verbatim inclusion in documentation


.SH SYNOPSIS
.B cexcerpt
.I file.c
.I dir



.SH DESCRIPTION

.I cexcerpt 
processes a C source file 
.I file.c,
extracts tagged excerpts, 
and puts these excerpts in a file in directory 
.I dir.

.PP
An excerpt is marked with special comments in the C file, as in
this example:

.nf
/*::cexcerpt::my_example::begin::*/ 
  while (esl_sq_Read(sqfp, sq) == eslOK)
    { n++; }
/*::cexcerpt::my_example::end::*/
.fi

.PP
The tag's format is "::cexcerpt::<tag>::begin::" (or end).
The tag is used to construct the file name, as 
.I <tag>.tex. 
In the example, the tag my_example creates a file
.I my_example.tex
in 
.I dir.

.PP
All the text between the cexcerpt tags is put in the file.
In addition, this text is wrapped in a {cchunk} environment.
So in the example above, 
.I my_example.tex 
will contain:

.nf
 \\begin{cchunk}
   while (esl_sq_Read(sqfp, sq) == eslOK)
    { n++; }
 \\end{cchunk}
.fi

.PP
This file can then be included in a LaTeX file, with
\\input{<dir>/<tag>}.

.PP
For best results, the C source should be free of TAB characters.
"M-x untabify" on the region to clean them out.

.PP
Cexcerpts can't overlap or nest in any way in the C file; only
one can be active at any given time.

.SH OPTIONS

Currently none.