[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug#277754: texinfo: Please add a command for sans serif font
From: |
Frank Küster |
Subject: |
Bug#277754: texinfo: Please add a command for sans serif font |
Date: |
Thu, 21 Oct 2004 23:27:33 +0200 |
Package: texinfo
Version: 4.7-2.2
Severity: wishlist
Tags: patch, upstream
The texinfo.tex file generally defines commands for the use of sans
serif fonts, but there is no command in texinfo that would allow such
use. Consequently, ugly @iftex... constructs have to be used.
I know that such physical markup is generally not advisable, but there
are circumstances where this really make sense - I came about it when
I tried to document in auctex.texi the functions AUCTeX offers for
inserting font specifications, including sans serif.
I suggest to introduce the command @s, analogous to @b, @i etc., for
this purpose. In info and txt output, it would just do nothing, just
as the others currently do. I am not sure about html, because I don't
know that language at all - is there a command to switch font for
single words in html, instead of using some file-wide default (CSS or
the like)?
I have tested the patch with info and pdf Output. Please consider
using it. I am submitting this also to the Debian bugtracking system,
mainly in order to get an automated notification when and if it will
be fixed.
Regards, Frank
-- System Information
Debian Release: 3.0-bunk-2
Architecture: i386
Kernel: Linux alhambra 2.4.27 #1 Sam Sep 25 11:29:41 CEST 2004 i686
Locale: address@hidden, address@hidden
Versions of packages texinfo depends on:
ii libc6 2.2.5-11.5 GNU C Library: Shared libraries an
diff -Nur --exclude=debian texinfo-4.7.orig/doc/texinfo.tex
texinfo-4.7/doc/texinfo.tex
--- texinfo-4.7.orig/doc/texinfo.tex Wed Apr 7 17:18:16 2004
+++ texinfo-4.7/doc/texinfo.tex Wed Oct 20 22:55:21 2004
@@ -1721,6 +1721,7 @@
\def\b#1{{\bf #1}}
\let\strong=\b
+\def\s#1{{\sf #1}}
% We can't just use \exhyphenpenalty, because that only has effect at
% the end of a paragraph. Restore normal hyphenation at the end of the
diff -Nur --exclude=debian texinfo-4.7.orig/makeinfo/cmds.c
texinfo-4.7/makeinfo/cmds.c
--- texinfo-4.7.orig/makeinfo/cmds.c Mon Oct 11 14:41:33 2004
+++ texinfo-4.7/makeinfo/cmds.c Wed Oct 20 23:17:07 2004
@@ -280,6 +280,7 @@
{ "ringaccent", cm_accent, MAYBE_BRACE_ARGS },
{ "rmacro", cm_rmacro, NO_BRACE_ARGS },
{ "samp", cm_code, BRACE_ARGS },
+ { "s", cm_s, BRACE_ARGS },
{ "sc", cm_sc, BRACE_ARGS },
{ "section", cm_section, NO_BRACE_ARGS },
{ "set", cm_set, NO_BRACE_ARGS },
@@ -1148,6 +1149,21 @@
xml_insert_element (R, arg);
else if (html)
insert_html_tag_with_attribute (arg, "span", "class=\"roman\"");
+ else
+ not_fixed_width (arg);
+}
+
+void
+cm_s (int arg)
+{
+ /* See cm_i comments. */
+ extern int printing_index;
+ if (docbook && !filling_enabled && !printing_index)
+ xml_insert_element (LINEANNOTATION, arg);
+ else if (xml)
+ xml_insert_element (R, arg);
+ else if (html)
+ insert_html_tag_with_attribute (arg, "span", "class=\"roman\""); /* must
be changed to proper html font */
else
not_fixed_width (arg);
}
diff -Nur --exclude=debian texinfo-4.7.orig/makeinfo/cmds.h
texinfo-4.7/makeinfo/cmds.h
--- texinfo-4.7.orig/makeinfo/cmds.h Wed Apr 7 22:17:38 2004
+++ texinfo-4.7/makeinfo/cmds.h Wed Oct 20 22:52:16 2004
@@ -110,6 +110,7 @@
/* Emphasis and markup. */
extern void cm_acronym (int arg),
cm_b (int arg),
+ cm_s (int arg),
cm_cite (int arg, int position),
cm_code (int arg),
cm_dfn (int arg, int position),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Bug#277754: texinfo: Please add a command for sans serif font,
Frank Küster <=