texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

texinfo/makeinfo cmds.c,1.13,1.14 html.c,1.3,1.4


From: dirt
Subject: texinfo/makeinfo cmds.c,1.13,1.14 html.c,1.3,1.4
Date: Mon, 5 Jan 2004 15:37:54 +0100

Update of /cvsroot/texinfo/texinfo/makeinfo
In directory sheep:/tmp/cvs-serv31011/makeinfo

Modified Files:
        cmds.c html.c 
Log Message:
2004-01-05  Alper Ersoy  <address@hidden>

        * makeinfo/html.c (html_output_head): new CSS entry span.sc for
        small-caps font variant.

        * makeinfo/cmds.c (cm_sc): use span with class attribute sc, instead
        of small.



Index: cmds.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/cmds.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** cmds.c      2004/01/04 13:56:09     1.13
--- cmds.c      2004/01/05 14:37:52     1.14
***************
*** 88,94 ****
  static void cm_obsolete ();
  
- /* A random string.  */
- static const char small_tag[] = "small";
- 
  /* The dispatch table.  */
  COMMAND command_table[] = {
--- 88,91 ----
***************
*** 945,980 ****
    else
      {
!   not_fixed_width (arg);
  
!   if (arg == START)
!     {
!       if (html)
!       insert_html_tag (arg, small_tag);
!     }
!   else
!     {
!       int all_upper;
  
!       if (html)
!         start_pos += sizeof (small_tag) + 2 - 1; /* skip <small> */
  
!       /* Avoid the warning below if there's no text inside @sc{}, or
!          when processing menus under --no-headers.  */
!       all_upper = start_pos < end_pos;
  
!       while (start_pos < end_pos)
!         {
!           unsigned char c = output_paragraph[start_pos];
!           if (!isupper (c))
!             all_upper = 0;
!           output_paragraph[start_pos] = coerce_to_upper (c);
!           start_pos++;
          }
-       if (all_upper)
-         warning (_("@sc argument all uppercase, thus no effect"));
-         
-       if (html)
-       insert_html_tag (arg, small_tag);
-     }
      }
  }
--- 942,983 ----
    else
      {
!       not_fixed_width (arg);
  
!       if (arg == START)
!         {
!           if (html)
!             {
!               insert_html_tag (arg, "span");
!               /* Rollback closing > char.  */
!               output_paragraph_offset--;
!               insert_string (" class=\"sc\">");
!             }
!         }
!       else
!         {
!           int all_upper;
  
!           if (html)
!             start_pos += sizeof ("<span class=\"sc\">") - 1; /* skip <span> */
  
!           /* Avoid the warning below if there's no text inside @sc{}, or
!              when processing menus under --no-headers.  */
!           all_upper = start_pos < end_pos;
  
!           while (start_pos < end_pos)
!             {
!               unsigned char c = output_paragraph[start_pos];
!               if (!isupper (c))
!                 all_upper = 0;
!               if (!html)
!                 output_paragraph[start_pos] = coerce_to_upper (c);
!               start_pos++;
!             }
!           if (all_upper)
!             warning (_("@sc argument all uppercase, thus no effect"));
! 
!           if (html)
!             insert_html_tag (arg, "span");
          }
      }
  }

Index: html.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/html.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** html.c      2003/12/28 12:40:34     1.3
--- html.c      2004/01/05 14:37:52     1.4
***************
*** 147,150 ****
--- 147,155 ----
      add_word_args ("  pre.smalllisp    { %s }\n", CSS_FONT_SMALLER);
  
+     /* Since HTML doesn't have a sc element, we use span with a bit of
+        CSS spice instead.  */
+ #define CSS_FONT_SMALL_CAPS "font-variant:small-caps"
+     add_word_args ("  span.sc { %s }\n", CSS_FONT_SMALL_CAPS);
+ 
      /* Write out any css code from the user's --css-file.  */
      if (css_inline)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]