20
21
#include "system.h"
23
26
#include "insertion.h"
25
28
#include "makeinfo.h"
28
32
/* Must match list in insertion.h. */
29
33
static char *insertion_type_names[] =
31
"cartouche", "defcv", "deffn", "defivar", "defmac", "defmethod",
32
"defop", "defopt", "defspec", "deftp", "deftypefn", "deftypefun",
33
"deftypeivar", "deftypemethod", "deftypeop", "deftypevar",
34
"deftypevr", "defun", "defvar", "defvr", "detailmenu", "direntry",
35
"display", "documentdescription", "enumerate", "example", "flushleft",
36
"flushright", "format", "ftable", "group", "ifclear", "ifhtml",
37
"ifinfo", "ifnothtml", "ifnotinfo", "ifnottex", "ifset", "iftex",
38
"itemize", "lisp", "menu", "multitable", "quotation", "rawhtml",
39
"rawtex", "smalldisplay", "smallexample", "smallformat", "smalllisp",
40
"verbatim", "table", "tex", "vtable", "bad_type"
35
"cartouche", "copying", "defcv", "deffn", "defivar", "defmac",
36
"defmethod", "defop", "defopt", "defspec", "deftp", "deftypecv",
37
"deftypefn", "deftypefun", "deftypeivar", "deftypemethod",
38
"deftypeop", "deftypevar", "deftypevr", "defun", "defvar", "defvr",
39
"detailmenu", "direntry", "display", "documentdescription",
40
"enumerate", "example", "float", "flushleft", "flushright", "format",
41
"ftable", "group", "ifclear", "ifdocbook", "ifhtml", "ifinfo",
42
"ifnotdocbook", "ifnothtml", "ifnotinfo", "ifnotplaintext", "ifnottex",
43
"ifnotxml", "ifplaintext", "ifset", "iftex", "ifxml", "itemize", "lisp",
44
"menu", "multitable", "quotation", "rawdocbook", "rawhtml", "rawtex",
45
"rawxml", "smalldisplay", "smallexample", "smallformat", "smalllisp",
46
"verbatim", "table", "tex", "vtable", "titlepage", "bad_type"
43
49
/* All nested environments. */
46
52
/* How deeply we're nested. */
47
53
int insertion_level = 0;
49
/* Whether to examine menu lines. */
52
/* How to examine menu lines. */
53
int in_detailmenu = 0;
55
55
/* Set to 1 if we've processed (commentary) text in a @menu that
56
56
wasn't part of a menu item. */
57
57
int had_menu_commentary;
59
/* How to examine menu lines. */
60
int in_detailmenu = 0;
62
/* Whether to examine menu lines. */
59
65
/* Set to 1 if <p> is written in normal context.
60
66
Used for menu and itemize. */
61
67
int in_paragraph = 0;
63
static const char dl_tag[] = "<dl>\n";
69
/* Since an insertion is already in the stack before we reach the switch
70
statement, we cannot use is_in_insertion_of_type (always returns true.) Also
71
making it return the level found, and comparing it with the current level is
72
no use, due to the order of stack. */
73
static int float_active = 0;
75
/* Unsetting escape_html blindly causes text inside @html/etc. to be escaped if
76
used within a rmacro. */
77
static int raw_output_block = 0;
79
/* Non-zero if a <dl> element has a <dt> element in it. We use this when
80
deciding whether to insert a <br> or not. */
81
static int html_deflist_has_term = 0;
66
init_insertion_stack ()
84
init_insertion_stack (void)
68
86
insertion_stack = NULL;
71
89
/* Return the type of the current insertion. */
72
90
static enum insertion_type
73
current_insertion_type ()
91
current_insertion_type (void)
75
93
return insertion_level ? insertion_stack->insertion : bad_type;
118
142
change it to "@ ", since "@" by itself is not a command. This makes
119
143
"@ ", "@\t", and "@\n" all the same, but their default meanings are
120
144
the same anyway, and let's not worry about supporting redefining them. */
146
get_item_function (void)
124
148
char *item_function;
125
151
get_rest_of_line (0, &item_function);
153
/* If the document erroneously says
154
@itemize @bullet @item foobar
155
it's nicer to give an error up front than repeat `@bullet expected
156
braces' until we get a segmentation fault. */
157
item_loc = strstr (item_function, "@item");
160
line_error (_("@item not allowed in argument to @itemize"));
127
164
/* If we hit the end of text in get_rest_of_line, backing up
128
165
input pointer will cause the last character of the last line
129
166
be pushed back onto the input, which is wrong. */
510
/* Save the copying text away for @insertcopying,
511
typically used on the back of the @titlepage (for TeX) and
512
the Top node (for info/html). */
513
if (input_text[input_text_offset] != '\n')
514
discard_until ("\n"); /* ignore remainder of @copying line */
516
input_text_offset = get_until ("\n@end copying", ©ing_text);
517
canon_white (copying_text);
519
/* For info, output the copying text right away, so it will end up
520
in the header of the Info file, before the first node, and thus
521
get copied automatically to all the split files. For xml, also
522
output it right away since xml output is never split.
523
For html, we output it specifically in html_output_head.
524
For plain text, there's no way to hide it, so the author must
525
use @insertcopying in the desired location. */
528
if (!xml_in_bookinfo)
530
xml_insert_element (BOOKINFO, START);
533
xml_insert_element (LEGALNOTICE, START);
536
if (!html && !no_headers)
537
cm_insert_copying ();
540
xml_insert_element (LEGALNOTICE, END);
434
545
/* @quotation does filling (@display doesn't). */
436
add_word ("<blockquote>\n");
547
add_html_block_elt ("<blockquote>\n");
439
close_single_paragraph ();
550
/* with close_single_paragraph, we get no blank line above
440
553
last_char_was_newline = no_indent = 0;
441
554
indented_fill = filling_enabled = 1;
442
555
inhibit_paragraph_indentation = 1;
444
557
current_indent += default_indentation_increment;
559
xml_insert_quotation (insertion_stack->item_function, START);
560
else if (strlen(insertion_stack->item_function))
561
execute_string ("@b{%s:} ", insertion_stack->item_function);
450
565
case smallexample:
568
in_fixed_width_font++;
571
/* Like @example but no fixed width font. */
453
574
/* Like @display but without indentation. */
454
575
case smallformat:
456
577
close_single_paragraph ();
457
578
inhibit_paragraph_indentation = 1;
458
in_fixed_width_font++;
459
579
filling_enabled = 0;
460
580
last_char_was_newline = 0;
463
/* Kludge alert: if <pre> is followed by a newline, IE3
464
renders an extra blank line before the pre-formatted block.
465
Other browsers seem to not mind one way or the other. */
466
add_word ("<br><pre>");
583
/* Kludge alert: if <pre> is followed by a newline, IE3,
584
mozilla, maybe others render an extra blank line before the
585
pre-formatted block. So don't output a newline. */
586
add_html_block_elt_args ("<pre class=\"%s\">", command);
468
588
if (type != format && type != smallformat)
469
current_indent += default_indentation_increment;
590
current_indent += example_indentation_increment;
593
/* Since we didn't put \n after <pre>, we need to insert
594
the indentation by hand. */
596
for (i = current_indent; i > 0; i--)
560
705
close_single_paragraph ();
710
add_html_block_elt ("<p><table class=\"cartouche\" summary=\"cartouche\" border=\"1\"><tr><td>\n");
716
/* Cannot nest floats, so complain. */
719
line_error (_("%cfloat environments cannot be nested"), COMMAND_PREFIX);
726
{ /* Collect data about this float. */
727
/* Example: @float [FLOATTYPE][,XREFLABEL][,POSITION] */
728
char floattype[200] = "";
729
char xreflabel[200] = "";
730
char position[200] = "";
735
int save_line_number = line_number;
736
int save_input_text_offset = input_text_offset;
739
if (strlen (insertion_stack->item_function) > 0)
741
int i = 0, t = 0, c = 0;
742
while (insertion_stack->item_function[i])
744
if (insertion_stack->item_function[i] == ',')
767
floattype[c] = insertion_stack->item_function[i];
770
xreflabel[c] = insertion_stack->item_function[i];
773
position[c] = insertion_stack->item_function[i];
781
skip_whitespace_and_newlines ();
783
start_of_end = get_until ("\n@end float", &text);
785
/* Get also the @caption. */
786
i = search_forward_until_pos ("\n@caption{",
787
save_input_text_offset, start_of_end);
790
input_text_offset = i + sizeof ("\n@caption{") - 1;
791
get_until_in_braces ("\n@end float", &caption);
792
input_text_offset = save_input_text_offset;
797
/* ... and the @shortcaption. */
798
i = search_forward_until_pos ("\n@shortcaption{",
799
save_input_text_offset, start_of_end);
802
input_text_offset = i + sizeof ("\n@shortcaption{") - 1;
803
get_until_in_braces ("\n@end float", &shortcaption);
804
input_text_offset = save_input_text_offset;
809
canon_white (xreflabel);
810
canon_white (floattype);
811
canon_white (position);
812
canon_white (caption);
813
canon_white (shortcaption);
815
add_new_float (xstrdup (xreflabel),
816
xstrdup (caption), xstrdup (shortcaption),
817
xstrdup (floattype), xstrdup (position));
819
/* Move to the start of the @float so the contents get processed as
821
input_text_offset = save_input_text_offset;
822
line_number = save_line_number;
826
add_html_block_elt ("<div class=\"float\">\n");
828
xml_insert_element (FLOAT, START);
831
xml_insert_element_with_attribute (FLOAT, START,
832
"name=\"%s\"", current_float_id ());
834
xml_insert_element (FLOATTYPE, START);
835
execute_string ("%s", current_float_type ());
836
xml_insert_element (FLOATTYPE, END);
838
xml_insert_element (FLOATPOS, START);
839
execute_string ("%s", current_float_position ());
840
xml_insert_element (FLOATPOS, END);
844
close_single_paragraph ();
845
inhibit_paragraph_indentation = 1;
848
/* Anchor now. Note that XML documents get their
849
anchors with <float name="anchor"> tag. */
850
if ((!xml || docbook) && strlen (current_float_id ()) > 0)
851
execute_string ("@anchor{%s}", current_float_id ());
563
855
/* Insertions that are no-ops in info, but do something in TeX. */
880
if (raw_output_block > 0)
888
/* Some deuglification for improved readability. */
889
extern int xml_in_para;
890
if (xml && !xml_in_para && xml_indentation_increment > 0)
666
case documentdescription:
669
xml_insert_element (QUOTATION, END);
672
xml_insert_element (EXAMPLE, END);
675
xml_insert_element (SMALLEXAMPLE, END);
678
xml_insert_element (LISP, END);
681
xml_insert_element (SMALLLISP, END);
684
xml_insert_element (CARTOUCHE, END);
687
xml_insert_element (FORMAT, END);
690
xml_insert_element (SMALLFORMAT, END);
693
xml_insert_element (DISPLAY, END);
696
xml_insert_element (SMALLDISPLAY, END);
702
xml_end_table (type);
705
xml_end_enumerate (type);
708
xml_insert_element (GROUP, END);
985
case documentdescription:
988
xml_insert_quotation ("", END);
991
xml_insert_element (EXAMPLE, END);
992
if (docbook && current_insertion_type () == floatenv)
993
xml_insert_element (FLOATEXAMPLE, END);
996
xml_insert_element (SMALLEXAMPLE, END);
997
if (docbook && current_insertion_type () == floatenv)
998
xml_insert_element (FLOATEXAMPLE, END);
1001
xml_insert_element (LISP, END);
1002
if (docbook && current_insertion_type () == floatenv)
1003
xml_insert_element (FLOATEXAMPLE, END);
1006
xml_insert_element (SMALLLISP, END);
1007
if (docbook && current_insertion_type () == floatenv)
1008
xml_insert_element (FLOATEXAMPLE, END);
1011
xml_insert_element (CARTOUCHE, END);
1014
if (docbook && xml_in_bookinfo && xml_in_abstract)
1016
xml_insert_element (ABSTRACT, END);
1017
xml_in_abstract = 0;
1020
xml_insert_element (FORMAT, END);
1023
xml_insert_element (SMALLFORMAT, END);
1026
xml_insert_element (DISPLAY, END);
1029
xml_insert_element (SMALLDISPLAY, END);
1035
xml_end_table (type);
1038
xml_end_enumerate ();
1041
xml_insert_element (GROUP, END);
1044
xml_insert_element (TITLEPAGE, END);
714
1050
/* Insertions which have no effect on paragraph formatting. */
715
case documentdescription:
1062
case ifnotplaintext:
1078
if (raw_output_block <= 0)
1085
if ((xml || html) && output_paragraph[output_paragraph_offset-1] == '\n')
1086
output_paragraph_offset--;
1091
xml_insert_element (DETAILMENU, END);
1093
in_detailmenu--; /* No longer hacking menus. */
1097
close_insertion_paragraph ();
731
1101
case direntry: /* Eaten if html. */
759
1126
close_insertion_paragraph ();
760
1127
current_indent -= default_indentation_increment;
762
add_word ("</ol>\n");
1129
add_html_block_elt ("</ol>\n");
767
add_word ("</div>\n");
1134
add_html_block_elt ("</div>\n");
1135
close_insertion_paragraph ();
1140
add_html_block_elt ("</td></tr></table>\n");
768
1141
close_insertion_paragraph ();
773
close_insertion_paragraph ();
1145
if (!xml || docbook)
1146
close_insertion_paragraph ();
1151
xml_insert_element (FLOAT, END);
1155
add_html_block_elt ("<p><strong class=\"float-caption\">");
1162
1) @float Foo,lbl & no caption: Foo 1.1
1163
2) @float Foo & no caption: Foo
1164
3) @float ,lbl & no caption: 1.1
1165
4) @float & no caption: */
1168
indent (current_indent);
1170
if (strlen (current_float_type ()))
1171
execute_string ("%s", current_float_type ());
1173
if (strlen (current_float_id ()) > 0)
1175
if (strlen (current_float_type ()) > 0)
1178
add_word (current_float_number ());
1181
if (strlen (current_float_title ()) > 0)
1183
if (strlen (current_float_type ()) > 0
1184
|| strlen (current_float_id ()) > 0)
1185
insert_string (": ");
1187
execute_string ("%s", current_float_title ());
1190
/* Indent the following paragraph. */
1191
inhibit_paragraph_indentation = 0;
1194
add_word ("</strong></p></div>\n");
785
1210
/* @format and @smallformat are the only fixed_width insertion
786
1211
without a change in indentation. */
787
if (type != format && type != smallformat)
1212
if (type != format && type != smallformat && type != quotation)
1213
current_indent -= example_indentation_increment;
1214
else if (type == quotation)
788
1215
current_indent -= default_indentation_increment;
791
add_word (type == quotation ? "</blockquote>\n" : "</pre>\n");
1218
{ /* The complex code in close_paragraph that kills whitespace
1219
does not function here, since we've inserted non-whitespace
1220
(the </whatever>) before it. The indentation already got
1221
inserted at the end of the last example line, so we have to
1222
delete it, or browsers wind up showing an extra blank line. */
1223
kill_self_indent (default_indentation_increment);
1224
add_html_block_elt (type == quotation
1225
? "</blockquote>\n" : "</pre>\n");
793
1228
/* The ending of one of these insertions always marks the
794
start of a new paragraph. */
795
close_insertion_paragraph ();
1229
start of a new paragraph, except for the XML output. */
1230
if (!xml || docbook)
1231
close_insertion_paragraph ();
1233
/* </pre> closes paragraph without messing with </p>. */
1234
if (html && type != quotation)
1235
paragraph_is_open = 0;
875
1324
&& ((ifclear <= insertion_stack->insertion
876
1325
&& insertion_stack->insertion <= iftex)
1326
|| insertion_stack->insertion == rawdocbook
877
1327
|| insertion_stack->insertion == rawhtml
1328
|| insertion_stack->insertion == rawxml
878
1329
|| insertion_stack->insertion == rawtex))
882
char *offender = insertion_type_pname (insertion_stack->insertion);
1333
const char *offender = insertion_type_pname (insertion_stack->insertion);
884
1335
file_line_error (insertion_stack->filename,
885
insertion_stack->line_number,
886
_("No matching `%cend %s'"), COMMAND_PREFIX,
1336
insertion_stack->line_number,
1337
_("No matching `%cend %s'"), COMMAND_PREFIX,
888
1339
pop_insertion ();
894
1345
/* Insertion (environment) commands. */
900
xml_insert_element (QUOTATION, START);
1350
/* We start the blockquote element in the insertion. */
901
1351
begin_insertion (quotation);
1357
if (docbook && current_insertion_type () == floatenv)
1358
xml_begin_docbook_float (FLOATEXAMPLE);
908
xml_insert_element (EXAMPLE, START);
1362
/* Rollback previous newlines. These occur between
1363
</para> and <example>. */
1364
if (output_paragraph[output_paragraph_offset-1] == '\n')
1365
output_paragraph_offset--;
1367
xml_insert_element (EXAMPLE, START);
1369
/* Make sure example text is starting on a new line
1370
for improved readability. */
909
1375
begin_insertion (example);
1379
cm_smallexample (void)
1381
if (docbook && current_insertion_type () == floatenv)
1382
xml_begin_docbook_float (FLOATEXAMPLE);
916
xml_insert_element (SMALLEXAMPLE, START);
1386
/* See cm_example comments about newlines. */
1387
if (output_paragraph[output_paragraph_offset-1] == '\n')
1388
output_paragraph_offset--;
1389
xml_insert_element (SMALLEXAMPLE, START);
917
1394
begin_insertion (smallexample);
1400
if (docbook && current_insertion_type () == floatenv)
1401
xml_begin_docbook_float (FLOATEXAMPLE);
924
xml_insert_element (LISP, START);
1405
/* See cm_example comments about newlines. */
1406
if (output_paragraph[output_paragraph_offset-1] == '\n')
1407
output_paragraph_offset--;
1408
xml_insert_element (LISP, START);
925
1413
begin_insertion (lisp);
1419
if (docbook && current_insertion_type () == floatenv)
1420
xml_begin_docbook_float (FLOATEXAMPLE);
932
xml_insert_element (SMALLLISP, START);
1424
/* See cm_example comments about newlines. */
1425
if (output_paragraph[output_paragraph_offset-1] == '\n')
1426
output_paragraph_offset--;
1427
xml_insert_element (SMALLLISP, START);
933
1432
begin_insertion (smalllisp);
1438
if (docbook && current_insertion_type () == floatenv)
1439
xml_begin_docbook_float (CARTOUCHE);
940
1442
xml_insert_element (CARTOUCHE, START);
941
1443
begin_insertion (cartouche);
1449
begin_insertion (copying);
1452
/* Not an insertion, despite the name, but it goes with cm_copying. */
1454
cm_insert_copying (void)
1458
warning ("@copying not used before %s", command);
1462
execute_string ("%s", copying_text);
1467
/* Update output_position so that the node positions in the tag
1468
tables will take account of the copying text. */
948
xml_insert_element (FORMAT, START);
1478
if (docbook && xml_in_bookinfo)
1480
xml_insert_element (ABSTRACT, START);
1481
xml_in_abstract = 1;
1485
/* See cm_example comments about newlines. */
1486
if (output_paragraph[output_paragraph_offset-1] == '\n')
1487
output_paragraph_offset--;
1488
xml_insert_element (FORMAT, START);
949
1493
begin_insertion (format);
1497
cm_smallformat (void)
956
xml_insert_element (SMALLFORMAT, START);
1501
/* See cm_example comments about newlines. */
1502
if (output_paragraph[output_paragraph_offset-1] == '\n')
1503
output_paragraph_offset--;
1504
xml_insert_element (SMALLFORMAT, START);
957
1509
begin_insertion (smallformat);
964
xml_insert_element (DISPLAY, START);
1517
/* See cm_example comments about newlines. */
1518
if (output_paragraph[output_paragraph_offset-1] == '\n')
1519
output_paragraph_offset--;
1520
xml_insert_element (DISPLAY, START);
965
1525
begin_insertion (display);
1529
cm_smalldisplay (void)
972
xml_insert_element (SMALLDISPLAY, START);
1533
/* See cm_example comments about newlines. */
1534
if (output_paragraph[output_paragraph_offset-1] == '\n')
1535
output_paragraph_offset--;
1536
xml_insert_element (SMALLDISPLAY, START);
973
1541
begin_insertion (smalldisplay);
1547
if (html || xml || no_headers)
980
1548
command_name_condition ();
982
1550
begin_insertion (direntry);
986
cm_documentdescription ()
1554
cm_documentdescription (void)
989
1557
begin_insertion (documentdescription);
1561
xml_insert_element (DOCUMENTDESCRIPTION, START);
1562
begin_insertion (documentdescription);
991
1566
command_name_condition ();
998
1573
begin_insertion (itemize);
1208
1866
if (!process_tex)
1209
1867
begin_insertion (ifnottex);
1211
1869
command_name_condition ();
1876
begin_insertion (ifxml);
1878
command_name_condition ();
1885
begin_insertion (ifnotxml);
1887
command_name_condition ();
1891
/* Generic xrefable block with a caption. */
1895
begin_insertion (floatenv);
1899
cm_caption (int arg)
1903
/* This is a no_op command for most formats, as we handle it during @float
1904
insertion. For XML though, we handle it here to keep document structure
1905
as close as possible, to the Texinfo source. */
1907
/* Everything is already handled at START. */
1911
/* Check if it's mislocated. */
1912
if (current_insertion_type () != floatenv)
1913
line_error (_("@%s not meaningful outside `@float' environment"), command);
1915
get_until_in_braces ("\n@end float", &temp);
1919
int elt = STREQ (command, "shortcaption") ? SHORTCAPTION : CAPTION;
1920
xml_insert_element (elt, START);
1922
execute_string ("%s", temp);
1923
xml_insert_element (elt, END);
1214
1929
/* Begin an insertion where the lines are not filled or indented. */
1218
1933
begin_insertion (flushleft);
1958
cm_detailmenu (void)
1245
if (current_node == NULL)
1960
if (current_node == NULL && !macro_expansion_output_stream)
1246
1961
{ /* Problems anyway, @detailmenu should always be inside @menu. */
1247
1962
warning (_("@detailmenu seen before first node, creating `Top' node"));
1248
1963
execute_string ("@node top\n@top Top\n");
1250
1965
begin_insertion (detailmenu);
1968
/* Title page commands. */
1973
titlepage_cmd_present = 1;
1974
if (xml && !docbook)
1975
begin_insertion (titlepage);
1977
command_name_condition ();
1984
get_rest_of_line (1, &rest);
1986
if (is_in_insertion_of_type (quotation))
1989
add_word_args ("— %s", rest);
1992
/* FIXME Ideally, we should use an attribution element,
1993
but they are supposed to be at the start of quotation
1994
blocks. So to avoid looking ahead mess, let's just
1995
use mdash like HTML for now. */
1996
xml_insert_entity ("mdash");
2001
xml_insert_element (AUTHOR, START);
2003
xml_insert_element (AUTHOR, END);
2006
add_word_args ("-- %s", rest);
2008
else if (is_in_insertion_of_type (titlepage))
2010
if (xml && !docbook)
2012
xml_insert_element (AUTHOR, START);
2014
xml_insert_element (AUTHOR, END);
2018
line_error (_("@%s not meaningful outside `@titlepage' and `@quotation' environments"),
2025
cm_titlepage_cmds (void)
2029
get_rest_of_line (1, &rest);
2031
if (!is_in_insertion_of_type (titlepage))
2032
line_error (_("@%s not meaningful outside `@titlepage' environment"),
2035
if (xml && !docbook)
2039
if (STREQ (command, "title"))
2041
else if (STREQ (command, "subtitle"))
2044
xml_insert_element (elt, START);
2046
xml_insert_element (elt, END);
1253
2052
/* End existing insertion block. */
1258
enum insertion_type type;
2059
get_rest_of_line (0, &temp);
1260
2061
if (!insertion_level)
1444
static int last_html_output_position = 0;
1446
/* If nothing has been output since the last <dd>,
2240
{ /* If nothing has been output since the last <dd>,
1447
2241
remove the empty <dd> element. Some browsers render
1448
2242
an extra empty line for <dd><dt>, which makes @itemx
1449
2243
conversion look ugly. */
1450
if (last_html_output_position == output_position
1451
&& strncmp ((char *) output_paragraph, "<dd>",
1452
output_paragraph_offset) == 0)
1453
output_paragraph_offset = 0;
2244
rollback_empty_tag ("dd");
1455
2246
/* Force the browser to render one blank line before
1456
each new @item in a table. But don't do that unless
2247
each new @item in a table. But don't do that if
1457
2248
this is the first <dt> after the <dl>, or if we are
1458
2249
converting @itemx.
1460
2251
Note that there are some browsers which ignore <br>
1461
2252
in this context, but I cannot find any way to force
1462
2253
them all render exactly one blank line. */
1464
&& strncmp ((char *) output_paragraph
1465
+ output_paragraph_offset - sizeof (dl_tag) + 1,
1466
dl_tag, sizeof (dl_tag) - 1) != 0)
2254
if (!itemx_flag && html_deflist_has_term)
2255
add_html_block_elt ("<br>");
2257
/* We are about to insert a <dt>, so this <dl> has a term.
2258
Feel free to insert a <br> next time. :) */
2259
html_deflist_has_term = 1;
2261
add_html_block_elt ("<dt>");
1470
2262
if (item_func && *item_func)
1471
2263
execute_string ("%s{%s}", item_func, rest_of_line);
1478
2270
if (current_insertion_type () == vtable)
1479
2271
execute_string ("%cvindex %s\n", COMMAND_PREFIX, rest_of_line);
1480
/* Make sure output_position is updated, so we could
1482
close_single_paragraph ();
1483
last_html_output_position = output_position;
2273
add_html_block_elt ("<dd>");
1486
else if (xml) /* && docbook)*/ /* 05-08 */
1488
xml_begin_table_item ();
2275
else if (xml) /* && docbook)*/ /* 05-08 */
2277
xml_begin_table_item ();
2279
if (!docbook && current_insertion_type () == ftable)
2280
execute_string ("%cfindex %s\n", COMMAND_PREFIX, rest_of_line);
2282
if (!docbook && current_insertion_type () == vtable)
2283
execute_string ("%cvindex %s\n", COMMAND_PREFIX, rest_of_line);
1489
2285
if (item_func && *item_func)
1490
2286
execute_string ("%s{%s}", item_func, rest_of_line);
1492
2288
execute_string ("%s", rest_of_line);
1493
xml_continue_table_item ();
2289
xml_continue_table_item ();
1497
2293
/* We need this to determine if we have two @item's in a row