Re: links in man2hlp
- From: "Andrew V. Samoilov" <kai cmail ru>
- To: "Andrew V. Samoilov" <kai cmail ru>
- Cc: Pavel Roskin <proski gnu org>, dmartina excite com, mc-devel gnome org
- Subject: Re: links in man2hlp
- Date: Thu, 24 Oct 2002 10:56:47 +0300
Andrew V. Samoilov wrote:
Pavel Roskin wrote:
Hello!
I tried this to get punctuation marks out the link references
avoiding extra spaces (ala .BR or .IR). The best idea I got
was using "\&" as separator because it seems to have no side
effects for groff in the man page. I read something about
"\&" preventing kerning between characters but that doesn't
seem anything to worry about.
Another possible solution is .\" at the same line in .\"LINK2
Please show the examples.
.\"LINK2"
Layout\&).
.\"Layout"
Layout should be highlighted, but ). - no.
\& really is best, and no need to provide .\"LINK3". BTW, we need
something like README.man2hlp for translators. These people have not to
be programmers and have not time to read man2hlp.c.
Current solution is to move ")." two lines below, but this produce extra
space between "Layout" and ")." in the manual.
I produced simple patch for man2hlp.c. ChangeLog entry should be
Englished ;-)
ChangeLog:
* man2hlp.c (handle_link): Print part after \& in the linkname behind
linkname. Reported by David Martin <dmartina excite com>.
--
Regards,
Andrew V. Samoilov
--- man2hlp.c.ori Wed Oct 23 09:37:02 2002
+++ man2hlp.c Thu Oct 24 10:31:33 2002
@@ -593,6 +593,7 @@ handle_link (char *buffer)
{
static char old[80];
int len;
+ char *amp;
switch (link_flag) {
case 1:
@@ -618,8 +619,18 @@ handle_link (char *buffer)
if (len && buffer[len - 1] == '"') {
buffer[--len] = 0;
}
- printf_string ("%c%s%c%s%c\n", CHAR_LINK_START, old,
- CHAR_LINK_POINTER, buffer, CHAR_LINK_END);
+
+ /* "Layout\&)," -- "Layout" should be highlighted, ")," - no */
+ amp = strstr (old, "\\&");
+ if (amp) {
+ *amp = 0;
+ amp += 2;
+ } else {
+ amp = "";
+ }
+
+ printf_string ("%c%s%c%s%c%s\n", CHAR_LINK_START, old,
+ CHAR_LINK_POINTER, buffer, CHAR_LINK_END, amp);
link_flag = 0;
/* Add to the linked list */
if (current_link) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]