Loading ...
Sorry, an error occurred while loading the content.

Re: Convert2HTML Again

Expand Messages
  • Edward L. Fox
    Hi developers, ... This script works perfectly. Edd Barrett also solved another problem made by the previous maintainer that the leading space doesn t appear
    Message 1 of 23 , Sep 22, 2006
    • 0 Attachment
      Hi developers,

      On 9/22/06, Bram Moolenaar <Bram@...> wrote:
      >
      > Edd -
      >
      > > I have spoken to your development team and I think we have come to a conclusion.
      > >
      > > I draw your attention to this thread:
      > >
      > > http://tech.groups.yahoo.com/group/vimdev/message/44853
      > >
      > > Lemme know your opinions.
      >
      > I haven't heard from people who have actually made changes to this
      > script in the past. Most remarks I have seen are "I think...", which
      > isn't definitive.
      >
      > I still don't know why the <p> </p> was there. There must have been a
      > reason, it didn't get there by accicent. I last talked about this with
      > Edward Fox, let me copy this message to him. Edward, what is your opinion
      > about this patch?

      This script works perfectly. Edd Barrett also solved another problem
      made by the previous maintainer that the leading space doesn't appear
      under xhtml mode, which I didn't solved last time I modified this
      script. Thanks Edd!

      But we should change one thing before we include this patch into the
      official version. In the patch file, line 97:

      + execute "normal! A\npre { font-family: courier; color: " . s:fgc
      . "; background-color: " . s:bgc . "; }\e"

      Should be:

      + execute "normal! A\npre { font-family: Courier, monospace; color:
      " . s:fgc . "; background-color: " . s:bgc . "; }\e"

      As W3C suggested, every "font-family" indication must finish with a
      *GENERIC* font family name, possible values are "serif", "sans-serif"
      or "monospace". So I added "monospace" here.

      >
      > - Bram
      >
      > --
      > Zen Microsystems: we're the om in .commmmmmmmm
      >
      > /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      > /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      > \\\ download, build and distribute -- http://www.A-A-P.org ///
      > \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
      >

      Best regards,


      Edward L. Fox
    • George V. Reilly
      ... I d like to request that the wretchedly ugly Courier font *NOT* be hardcoded in to 2html.vim. I always end up removing it when I use 2html. The font-family
      Message 2 of 23 , Sep 23, 2006
      • 0 Attachment
        Edward L. Fox wrote:
        >
        > But we should change one thing before we include this patch into the
        > official version. In the patch file, line 97:
        >
        > + execute "normal! A\npre { font-family: courier; color: " . s:fgc
        > . "; background-color: " . s:bgc . "; }\e"
        >
        > Should be:
        >
        > + execute "normal! A\npre { font-family: Courier, monospace; color:
        > " . s:fgc . "; background-color: " . s:bgc . "; }\e"
        >
        > As W3C suggested, every "font-family" indication must finish with a
        > *GENERIC* font family name, possible values are "serif", "sans-serif"
        > or "monospace". So I added "monospace" here.
        >

        I'd like to request that the wretchedly ugly Courier font *NOT* be
        hardcoded in to 2html.vim. I always end up removing it when I use 2html.
        The font-family should either be just "monospace" or allow a global
        variable to set the font.

        (Under Windows, Courier is the bitmapped font with the hexagonal letter
        forms and Courier New is the less ugly Truetype font with the spindly
        strokes. For a picture of the two fonts, see
        http://www.georgevreilly.com/courier.png
        Under Kubuntu, Courier looks a lot more like Courier New.)

        --
        /George V. Reilly george@...
        http://www.georgevreilly.com/blog
        The biggest mistake is not learning from all your other mistakes.
      • Edd Barrett
        Hello all, ... Agreed. I didn t know this until now. I will update my patch later today. ... I favour the variable, but courier is a good default. Most books
        Message 3 of 23 , Sep 23, 2006
        • 0 Attachment
          Hello all,

          On 23/09/06, George V. Reilly <george@...> wrote:
          > Edward L. Fox wrote:
          > >
          > > But we should change one thing before we include this patch into the
          > > official version. In the patch file, line 97:
          > >
          > > + execute "normal! A\npre { font-family: courier; color: " . s:fgc
          > > . "; background-color: " . s:bgc . "; }\e"
          > >
          > > Should be:
          > >
          > > + execute "normal! A\npre { font-family: Courier, monospace; color:
          > > " . s:fgc . "; background-color: " . s:bgc . "; }\e"
          > >
          > > As W3C suggested, every "font-family" indication must finish with a
          > > *GENERIC* font family name, possible values are "serif", "sans-serif"
          > > or "monospace". So I added "monospace" here.
          > >

          Agreed. I didn't know this until now. I will update my patch later today.

          >
          > I'd like to request that the wretchedly ugly Courier font *NOT* be
          > hardcoded in to 2html.vim. I always end up removing it when I use 2html.
          > The font-family should either be just "monospace" or allow a global
          > variable to set the font.

          I favour the variable, but courier is a good default. Most books use
          the courier font for verbatim text like code, it is the globally
          recognized "this part is code" font.

          Again I will update my patch and reply when done.

          Best Regards

          Edd
        • A.J.Mechelynck
          ... I second the motion; and since the font actually used is the first one found from the font-family item, I suggest (all on one line): + execute
          Message 4 of 23 , Sep 23, 2006
          • 0 Attachment
            George V. Reilly wrote:
            > Edward L. Fox wrote:
            >>
            >> But we should change one thing before we include this patch into the
            >> official version. In the patch file, line 97:
            >>
            >> + execute "normal! A\npre { font-family: courier; color: " . s:fgc
            >> . "; background-color: " . s:bgc . "; }\e"
            >>
            >> Should be:
            >>
            >> + execute "normal! A\npre { font-family: Courier, monospace; color:
            >> " . s:fgc . "; background-color: " . s:bgc . "; }\e"
            >>
            >> As W3C suggested, every "font-family" indication must finish with a
            >> *GENERIC* font family name, possible values are "serif", "sans-serif"
            >> or "monospace". So I added "monospace" here.
            >>
            >
            > I'd like to request that the wretchedly ugly Courier font *NOT* be
            > hardcoded in to 2html.vim. I always end up removing it when I use 2html.
            > The font-family should either be just "monospace" or allow a global
            > variable to set the font.
            >
            > (Under Windows, Courier is the bitmapped font with the hexagonal letter
            > forms and Courier New is the less ugly Truetype font with the spindly
            > strokes. For a picture of the two fonts, see
            > http://www.georgevreilly.com/courier.png
            > Under Kubuntu, Courier looks a lot more like Courier New.)
            >

            I second the motion; and since the font actually used is the first one found
            from the "font-family" item, I suggest (all on one line):

            + execute "normal! A\npre { font-family: 'Courier New', monospace; color: "
            . s:fgc . "; background-color: " . s:bgc . "; }\e"

            which will pick "Courier New" if found, and some generic "monospace" font
            otherwise. (Note: I don't know how it got here, but I have "Courier New"
            installed not only on my Windoze box but also on this SuSE-Linux box where I
            am now.)


            Best regards,
            Tony.
          • A.J.Mechelynck
            ... s/the courier font/some Courier font/ Courier New is a fixed-width scalable font which has the typical Courier look, but unlike the bitmapped Courier
            Message 5 of 23 , Sep 23, 2006
            • 0 Attachment
              Edd Barrett wrote:
              > Hello all,
              >
              > On 23/09/06, George V. Reilly <george@...> wrote:
              >> Edward L. Fox wrote:
              >> >
              >> > But we should change one thing before we include this patch into the
              >> > official version. In the patch file, line 97:
              >> >
              >> > + execute "normal! A\npre { font-family: courier; color: " . s:fgc
              >> > . "; background-color: " . s:bgc . "; }\e"
              >> >
              >> > Should be:
              >> >
              >> > + execute "normal! A\npre { font-family: Courier, monospace; color:
              >> > " . s:fgc . "; background-color: " . s:bgc . "; }\e"
              >> >
              >> > As W3C suggested, every "font-family" indication must finish with a
              >> > *GENERIC* font family name, possible values are "serif", "sans-serif"
              >> > or "monospace". So I added "monospace" here.
              >> >
              >
              > Agreed. I didn't know this until now. I will update my patch later today.
              >
              >>
              >> I'd like to request that the wretchedly ugly Courier font *NOT* be
              >> hardcoded in to 2html.vim. I always end up removing it when I use 2html.
              >> The font-family should either be just "monospace" or allow a global
              >> variable to set the font.
              >
              > I favour the variable, but courier is a good default. Most books use
              > the courier font for verbatim text like code, it is the globally

              s/the courier font/some Courier font/

              "Courier New" is a fixed-width scalable font which has the typical "Courier"
              look, but unlike the bitmapped "Courier" font, it displays correctly (with
              curves, not enlarged bitmaps) in all font sizes. I use it in Vim on Windoze
              when editing Russian (because my favourite font, Lucida_Console, is not
              actually fixed-width in bold Cyrillic) or Arabic (because Lucida_Console
              simply lacks Arabic glyphs).

              An alternative to hardcoding the font face name would be inferring it from
              e.g. the 'guifont' option; but this might be less than obvious on non-GTK2
              non-kvim X11 versions of the GUI (cf. ":help XLFD"), and it would of course
              not be possible in Console Vim.

              > recognized "this part is code" font.
              >
              > Again I will update my patch and reply when done.
              >
              > Best Regards
              >
              > Edd
              >

              Best regards,
              Tony.
            • Edd Barrett
              ... I ll hold off until a decision is reached then. Best Regards Edd
              Message 6 of 23 , Sep 23, 2006
              • 0 Attachment
                > > I favour the variable, but courier is a good default. Most books use
                > > the courier font for verbatim text like code, it is the globally
                >
                > s/the courier font/some Courier font/
                >
                > "Courier New" is a fixed-width scalable font which has the typical "Courier"
                > look, but unlike the bitmapped "Courier" font, it displays correctly (with
                > curves, not enlarged bitmaps) in all font sizes. I use it in Vim on Windoze
                > when editing Russian (because my favourite font, Lucida_Console, is not
                > actually fixed-width in bold Cyrillic) or Arabic (because Lucida_Console
                > simply lacks Arabic glyphs).
                >
                > An alternative to hardcoding the font face name would be inferring it from
                > e.g. the 'guifont' option; but this might be less than obvious on non-GTK2
                > non-kvim X11 versions of the GUI (cf. ":help XLFD"), and it would of course
                > not be possible in Console Vim.
                >

                I'll hold off until a decision is reached then.

                Best Regards

                Edd
              • Michael Schaap
                ... I beg you, please don t hardcode Courier New! Not only is it the worst possible monospaced screen font, it is also Microsoft specific (in spite of it
                Message 7 of 23 , Sep 23, 2006
                • 0 Attachment
                  A.J.Mechelynck wrote:
                  >
                  > I second the motion; and since the font actually used is the first one
                  > found from the "font-family" item, I suggest (all on one line):
                  >
                  > + execute "normal! A\npre { font-family: 'Courier New', monospace;
                  > color: " . s:fgc . "; background-color: " . s:bgc . "; }\e"
                  >
                  > which will pick "Courier New" if found, and some generic "monospace"
                  > font otherwise. (Note: I don't know how it got here, but I have "Courier
                  > New" installed not only on my Windoze box but also on this SuSE-Linux
                  > box where I am now.)
                  >

                  I beg you, please don't hardcode Courier New!

                  Not only is it the worst possible monospaced screen font, it is also
                  Microsoft specific (in spite of it finding its way onto Tony's Linux box).
                  (Even Microsoft has seen the light, and changed the default monospaced
                  font to Consolas in Windows Vista.)

                  The proper thing to do is to only list "font-family: monospace". That
                  will use the default monospaced font on any platform, which is Courier
                  New by default in any case on current Windows browsers. Only people who
                  have consciously chosen to change their monospaced font (and people on
                  non-Windows platforms) will not see Courier New.

                  - Michael
                • Steve Hall
                  ... Hear, hear! ... It s not just the proper way, it s the first thing discussed in the specification:
                  Message 8 of 23 , Sep 23, 2006
                  • 0 Attachment
                    On Sun, 2006-09-24 at 00:31 +0200, Michael Schaap wrote:
                    >
                    > I beg you, please don't hardcode Courier New!

                    Hear, hear!

                    > Not only is it the worst possible monospaced screen font, it is also
                    > Microsoft specific (in spite of it finding its way onto Tony's Linux
                    > box). (Even Microsoft has seen the light, and changed the default
                    > monospaced font to Consolas in Windows Vista.)
                    >
                    > The proper thing to do is to only list "font-family: monospace".
                    > That will use the default monospaced font on any platform, which is
                    > Courier New by default in any case on current Windows browsers. Only
                    > people who have consciously chosen to change their monospaced font
                    > (and people on non-Windows platforms) will not see Courier New.

                    It's not just the proper way, it's the first thing discussed in the
                    specification:

                    http://www.w3.org/TR/REC-CSS2/fonts.html#font-specification



                    --
                    Steve Hall [ digitect dancingpaper com ]
                  • Edd Barrett
                    ... Again ... I await a decision Regards Edd
                    Message 9 of 23 , Sep 23, 2006
                    • 0 Attachment
                      > >
                      > > I beg you, please don't hardcode Courier New!
                      >
                      > Hear, hear!
                      >
                      > > Not only is it the worst possible monospaced screen font, it is also
                      > > Microsoft specific (in spite of it finding its way onto Tony's Linux
                      > > box). (Even Microsoft has seen the light, and changed the default
                      > > monospaced font to Consolas in Windows Vista.)
                      > >
                      > > The proper thing to do is to only list "font-family: monospace".
                      > > That will use the default monospaced font on any platform, which is
                      > > Courier New by default in any case on current Windows browsers. Only
                      > > people who have consciously chosen to change their monospaced font
                      > > (and people on non-Windows platforms) will not see Courier New.
                      >
                      > It's not just the proper way, it's the first thing discussed in the
                      > specification:
                      >
                      > http://www.w3.org/TR/REC-CSS2/fonts.html#font-specification

                      Again

                      ...


                      I await a decision

                      Regards

                      Edd
                    • Benji Fisher
                      ... Does that mean that you are waiting for Bram to give his blessing? IMHO that is not necessary, since the consensus seems to clear. Do not hard code any
                      Message 10 of 23 , Sep 24, 2006
                      • 0 Attachment
                        On Sun, Sep 24, 2006 at 02:16:27AM +0100, Edd Barrett wrote:
                        > >>
                        > >> I beg you, please don't hardcode Courier New!
                        > >
                        > >Hear, hear!
                        > >
                        > >> Not only is it the worst possible monospaced screen font, it is also
                        > >> Microsoft specific (in spite of it finding its way onto Tony's Linux
                        > >> box). (Even Microsoft has seen the light, and changed the default
                        > >> monospaced font to Consolas in Windows Vista.)
                        > >>
                        > >> The proper thing to do is to only list "font-family: monospace".
                        > >> That will use the default monospaced font on any platform, which is
                        > >> Courier New by default in any case on current Windows browsers. Only
                        > >> people who have consciously chosen to change their monospaced font
                        > >> (and people on non-Windows platforms) will not see Courier New.
                        > >
                        > >It's not just the proper way, it's the first thing discussed in the
                        > >specification:
                        > >
                        > > http://www.w3.org/TR/REC-CSS2/fonts.html#font-specification
                        >
                        > Again
                        >
                        > ...
                        >
                        >
                        > I await a decision

                        Does that mean that you are waiting for Bram to give his blessing?
                        IMHO that is not necessary, since the consensus seems to clear. Do not
                        hard code any font. The simple solution is to leave it at "monospace".
                        If you, as the author of the patch, are willing to add a few lines of
                        code, you could check for the existence of a global variable in order to
                        give the user a little more control. Something like

                        if exists("g:2html_font")
                        let s:msfont = g:2html_font . ", monospace"
                        else
                        let s:msfont = "monospace"
                        endif

                        or the more compact

                        let s:msfont = (exists("g:2html_font") ? g:2html_font . ", " : "") . "monospace"

                        and then use the s:msfont variable later in the script. Then, the
                        occasional user who cares can either set

                        let g:2html_font = "myFavoritefont, Courier New"

                        in his or her vimrc file or even define it before :source'ing 2html.vim .

                        The more complex solution would satisfy one of the design goals:

                        :help design-flexible

                        HTH --Benji Fisher
                      • A.J.Mechelynck
                        ... It is said nowhere in that document that a generic-family should be the only element in a font-face specification. Quite to the contrary, under
                        Message 11 of 23 , Sep 24, 2006
                        • 0 Attachment
                          Steve Hall wrote:
                          > On Sun, 2006-09-24 at 00:31 +0200, Michael Schaap wrote:
                          >> I beg you, please don't hardcode Courier New!
                          >
                          > Hear, hear!
                          >
                          >> Not only is it the worst possible monospaced screen font, it is also
                          >> Microsoft specific (in spite of it finding its way onto Tony's Linux
                          >> box). (Even Microsoft has seen the light, and changed the default
                          >> monospaced font to Consolas in Windows Vista.)
                          >>
                          >> The proper thing to do is to only list "font-family: monospace".
                          >> That will use the default monospaced font on any platform, which is
                          >> Courier New by default in any case on current Windows browsers. Only
                          >> people who have consciously chosen to change their monospaced font
                          >> (and people on non-Windows platforms) will not see Courier New.
                          >
                          > It's not just the proper way, it's the first thing discussed in the
                          > specification:
                          >
                          > http://www.w3.org/TR/REC-CSS2/fonts.html#font-specification
                          >
                          >
                          >

                          It is said nowhere in that document that a generic-family should be the only
                          element in a font-face specification. Quite to the contrary, under
                          http://www.w3.org/TR/REC-CSS2/fonts.html#font-family-prop I see the example:

                          --8<--
                          BODY { font-family: Baskerville, "Heisi Mincho W3", Symbol, serif }
                          -->8--

                          and a little further down:

                          --8<--
                          <generic-family>
                          The following generic families are defined: 'serif', 'sans-serif',
                          'cursive', 'fantasy', and 'monospace'. Please see the section on generic font
                          families for descriptions of these families. Generic font family names are
                          keywords, and therefore must not be quoted.

                          Authors are encouraged to offer a generic font family as a last
                          alternative, for improved robustness.

                          For example:

                          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
                          <HTML>
                          <HEAD>
                          <TITLE>Font test</TITLE>
                          <STYLE type="text/css">
                          BODY { font-family: "new century schoolbook", serif }
                          </STYLE>
                          </HEAD>
                          <BODY>
                          <H1 style="font-family: 'My own font', fantasy">Test</H1>
                          <P>What's up, Doc?
                          </BODY>
                          </HTML>
                          -->8--

                          In fact that W3C document mentions "selecting a font by a single string" only
                          to dismiss it as inappropriate because of lack of standardization.


                          Best regards,
                          Tony.
                        • Edd Barrett
                          ... Na, just that it s not my decision to make. I ll just do the code. Best Regards Edd
                          Message 12 of 23 , Sep 24, 2006
                          • 0 Attachment
                            > Does that mean that you are waiting for Bram to give his blessing?

                            Na, just that it's not my decision to make. I'll just do the code.

                            Best Regards

                            Edd
                          • Steve Hall
                            ... [snip] ... [snip] ... My point was that the generic families were designed for an obvious reason...to fall back to something that works everywhere. Why
                            Message 13 of 23 , Sep 24, 2006
                            • 0 Attachment
                              On Sun, 2006-09-24 at 16:41 +0200, A.J.Mechelynck wrote:
                              > Steve Hall wrote:
                              > > On Sun, 2006-09-24 at 00:31 +0200, Michael Schaap wrote:
                              > > > I beg you, please don't hardcode Courier New!
                              [snip]
                              > > It's not just the proper way, it's the first thing discussed in the
                              > > specification:
                              > >
                              > > http://www.w3.org/TR/REC-CSS2/fonts.html#font-specification
                              >
                              > It is said nowhere in that document that a generic-family should be
                              > the only element in a font-face specification.
                              >
                              [snip]
                              >
                              > In fact that W3C document mentions "selecting a font by a single
                              > string" only to dismiss it as inappropriate because of lack of
                              > standardization.

                              My point was that the generic families were designed for an obvious
                              reason...to fall back to something that works everywhere. Why wouldn't
                              we want Vim to work just this way?

                              Designers, not converters, should select font faces. If the converter
                              is going to attempt to select one, than it had better do a good job of
                              understanding what platform I am writing for, what fonts are available
                              for that platform, and selecting one that follows my intentions within
                              all the details of that specification.


                              --
                              Steve Hall [ digitect dancingpaper com ]
                            • George V. Reilly
                              [Resending because Thunderbird sent the original email in HTML, which vim.org promptly bounced. Grrr.] ... Whatever is chosen should be compatible with CSS,
                              Message 14 of 23 , Sep 24, 2006
                              • 0 Attachment
                                [Resending because Thunderbird sent the original email in HTML, which
                                vim.org promptly bounced. Grrr.]

                                Steve Hall wrote:
                                > On Sun, 2006-09-24 at 16:41 +0200, A.J.Mechelynck wrote:
                                >
                                >> Steve Hall wrote:
                                >>
                                >>> On Sun, 2006-09-24 at 00:31 +0200, Michael Schaap wrote:
                                >>>
                                >>>> I beg you, please don't hardcode Courier New!
                                >>>>
                                > [snip]
                                >
                                >>> It's not just the proper way, it's the first thing discussed in the
                                >>> specification:
                                >>>
                                >>> http://www.w3.org/TR/REC-CSS2/fonts.html#font-specification
                                >>>
                                >> It is said nowhere in that document that a generic-family should be
                                >> the only element in a font-face specification.
                                >>
                                >>
                                > [snip]
                                >
                                >> In fact that W3C document mentions "selecting a font by a single
                                >> string" only to dismiss it as inappropriate because of lack of
                                >> standardization.
                                >>
                                >
                                > My point was that the generic families were designed for an obvious
                                > reason...to fall back to something that works everywhere. Why wouldn't
                                > we want Vim to work just this way?
                                >
                                > Designers, not converters, should select font faces. If the converter
                                > is going to attempt to select one, than it had better do a good job of
                                > understanding what platform I am writing for, what fonts are available
                                > for that platform, and selecting one that follows my intentions within
                                > all the details of that specification.
                                >
                                Whatever is chosen should be compatible with CSS, allowing the designer
                                to specify a font for pre or #vim-pre (or whatever the class is).

                                --
                                /George V. Reilly george@...
                                http://www.georgevreilly.com/blog
                                The biggest mistake is not learning from all your other mistakes.
                              • Charles E Campbell Jr
                                ... Since there s a fair amount of anti-Courier feelings, and undoubtedly no matter what font is selected someone won t like it, why not set things up to
                                Message 15 of 23 , Sep 25, 2006
                                • 0 Attachment
                                  Edward L. Fox wrote:

                                  >
                                  > But we should change one thing before we include this patch into the
                                  > official version. In the patch file, line 97:
                                  >
                                  > + execute "normal! A\npre { font-family: courier; color: " . s:fgc
                                  > . "; background-color: " . s:bgc . "; }\e"
                                  >
                                  > Should be:
                                  >
                                  > + execute "normal! A\npre { font-family: Courier, monospace; color:
                                  > " . s:fgc . "; background-color: " . s:bgc . "; }\e"
                                  >
                                  > As W3C suggested, every "font-family" indication must finish with a
                                  > *GENERIC* font family name, possible values are "serif", "sans-serif"
                                  > or "monospace". So I added "monospace" here.

                                  Since there's a fair amount of anti-Courier feelings, and undoubtedly no
                                  matter
                                  what font is selected someone won't like it, why not set things up to
                                  default
                                  to whatever but to be easily overridden in one's .vimrc. In other words,

                                  if !exists("g:Convert2Html_font")
                                  let g:Convert2Html_font= '...whatever font gets selected for a
                                  default...'
                                  endif

                                  then later, when you're about to use it:

                                  exe "norm!
                                  A\npre{font-family:".g:Convert2Html_font.';color:'.s:fgc.';background-color:'.s:bgc.";}\e"

                                  Regards,
                                  Chip Campbell
                                • Bram Moolenaar
                                  ... On my system just using monospace looks better than Courier New . This completely depends on the system, of course. When using monospace on
                                  Message 16 of 23 , Sep 26, 2006
                                  • 0 Attachment
                                    Michael Schaap wrote:

                                    > A.J.Mechelynck wrote:
                                    > >
                                    > > I second the motion; and since the font actually used is the first one
                                    > > found from the "font-family" item, I suggest (all on one line):
                                    > >
                                    > > + execute "normal! A\npre { font-family: 'Courier New', monospace;
                                    > > color: " . s:fgc . "; background-color: " . s:bgc . "; }\e"
                                    > >
                                    > > which will pick "Courier New" if found, and some generic "monospace"
                                    > > font otherwise. (Note: I don't know how it got here, but I have "Courier
                                    > > New" installed not only on my Windoze box but also on this SuSE-Linux
                                    > > box where I am now.)
                                    > >
                                    >
                                    > I beg you, please don't hardcode Courier New!
                                    >
                                    > Not only is it the worst possible monospaced screen font, it is also
                                    > Microsoft specific (in spite of it finding its way onto Tony's Linux box).
                                    > (Even Microsoft has seen the light, and changed the default monospaced
                                    > font to Consolas in Windows Vista.)
                                    >
                                    > The proper thing to do is to only list "font-family: monospace". That
                                    > will use the default monospaced font on any platform, which is Courier
                                    > New by default in any case on current Windows browsers. Only people who
                                    > have consciously chosen to change their monospaced font (and people on
                                    > non-Windows platforms) will not see Courier New.

                                    On my system just using "monospace" looks better than "Courier New".
                                    This completely depends on the system, of course.

                                    When using "monospace" on MS-Windows, don't you get the same font as
                                    with "Courier New" anyway?

                                    Perhaps just using "monospace" works best for most people. At least we
                                    should avoid using "Courier", I think everybody agrees with that.

                                    The suggestion from Benji Fisher to add a variable to allow people to
                                    use another font sounds good to me. Make sure it's properly documented,
                                    especially about using more than one name and quotes around the name.

                                    --
                                    Every time I lose weight, it finds me again!

                                    /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                                    /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                                    \\\ download, build and distribute -- http://www.A-A-P.org ///
                                    \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
                                  • Edd Barrett
                                    ... Great, Ill add this in as soon as I can, but university work is coming in hard at the moment so it might not be until the weekend. Best Regards Edd
                                    Message 17 of 23 , Sep 26, 2006
                                    • 0 Attachment
                                      > The suggestion from Benji Fisher to add a variable to allow people to
                                      > use another font sounds good to me. Make sure it's properly documented,
                                      > especially about using more than one name and quotes around the name.
                                      >

                                      Great,

                                      Ill add this in as soon as I can, but university work is coming in
                                      hard at the moment so it might not be until the weekend.

                                      Best Regards

                                      Edd
                                    • Edd Barrett
                                      (Sorry if you recieve this twice, I don t think the first one made it onto the list for whatever reason.) ... Greetings all, Hope your enjoying your weekend.
                                      Message 18 of 23 , Oct 1, 2006
                                      • 0 Attachment
                                        (Sorry if you recieve this twice, I don't think the first one made it
                                        onto the list for whatever reason.)

                                        On 26/09/06, Edd Barrett <vext01@...> wrote:
                                        > Ill add this in as soon as I can, but university work is coming in
                                        > hard at the moment so it might not be until the weekend.

                                        Greetings all,

                                        Hope your enjoying your weekend.

                                        As promised i have ammended the patch. I have run some tests as before
                                        and uploaded them (along with the new patch) here:

                                        http://arameus.net/users/edd/vim-test2/

                                        All of the files with _courier.html as a suffix are with a font set
                                        using :let html_font="courier". This sets all css/font tags to this
                                        font and appends ", monospace" as a fallback incase the user does not
                                        have that font.

                                        Also i realized that style= in a body tag is css and replaced that
                                        with a big old font tag around the whole text if html_use_css is not
                                        set.

                                        Best Regards

                                        Edd
                                      • Edd Barrett
                                        ... Hi Guys, I havent recieved any feedback on this patch yet, did anyone get a chance to look at it? Sorry to be a bore. Best Regards Edd
                                        Message 19 of 23 , Oct 10, 2006
                                        • 0 Attachment
                                          On 01/10/06, Edd Barrett <vext01@...> wrote:

                                          > Hope your enjoying your weekend.
                                          >
                                          > As promised i have ammended the patch.


                                          Hi Guys,

                                          I havent recieved any feedback on this patch yet, did anyone get a
                                          chance to look at it?

                                          Sorry to be a bore.

                                          Best Regards

                                          Edd
                                        • Benji Fisher
                                          ... Be careful about what you ask (or wish) for: you just might get it! ;) The samples look fine to me (using Mozilla 1.7.12 on Linux). I would like to see
                                          Message 20 of 23 , Oct 10, 2006
                                          • 0 Attachment
                                            On Tue, Oct 10, 2006 at 01:40:04PM +0100, Edd Barrett wrote:
                                            > On 01/10/06, Edd Barrett <vext01@...> wrote:
                                            >
                                            > > Hope your enjoying your weekend.
                                            > >
                                            > >As promised i have ammended the patch.
                                            >
                                            >
                                            > Hi Guys,
                                            >
                                            > I havent recieved any feedback on this patch yet, did anyone get a
                                            > chance to look at it?
                                            >
                                            > Sorry to be a bore.
                                            >
                                            > Best Regards
                                            >
                                            > Edd

                                            Be careful about what you ask (or wish) for: you just might get
                                            it! ;)

                                            The samples look fine to me (using Mozilla 1.7.12 on Linux). I
                                            would like to see an example where the background color changes, if only
                                            so that I can see some situation where

                                            <span class="foo"> (text) </span>

                                            looks simpler (by rudimentary measures such as character count) than

                                            <font color="#EEE"> (text) </font>

                                            How does the encoding get set? For example, in xhtml.html I see

                                            <?xml version="1.0" encoding="iso-8859-1"?>

                                            If I have
                                            :set enc=utf-8
                                            will I get utf-8 in that line?

                                            Have you actually tested for W3C compliance?

                                            Very minor points: you might want to change the line

                                            if exists("html_font")

                                            to

                                            if exists("g:html_font")

                                            Some readers will find this clearer, and if those lines ever get wrapped
                                            in a function, then it will actually make a difference. Please fix the
                                            indentation in places like this:

                                            - if exists("use_xhtml")
                                            - let s:LeadingSpace = ' '
                                            - else
                                            let s:LeadingSpace = ' '
                                            - endif

                                            HTH --Benji Fisher
                                          • Edd Barrett
                                            Hi Guys, ... I tryed to make it sound as polite as i could, I m not very good at this. My aplogies :) ... I m not sure what you mean here. Please explain...
                                            Message 21 of 23 , Oct 11, 2006
                                            • 0 Attachment
                                              Hi Guys,

                                              On 10/10/06, Benji Fisher <benji@...> wrote:
                                              > On Tue, Oct 10, 2006 at 01:40:04PM +0100, Edd Barrett wrote:

                                              > Be careful about what you ask (or wish) for: you just might get
                                              > it! ;)

                                              I tryed to make it sound as polite as i could, I'm not very good at
                                              this. My aplogies :)

                                              >
                                              > The samples look fine to me (using Mozilla 1.7.12 on Linux). I
                                              > would like to see an example where the background color changes, if only
                                              > so that I can see some situation where
                                              >
                                              > <span class="foo"> (text) </span>
                                              >
                                              > looks simpler (by rudimentary measures such as character count) than
                                              >
                                              > <font color="#EEE"> (text) </font>

                                              I'm not sure what you mean here. Please explain...

                                              >
                                              > How does the encoding get set? For example, in xhtml.html I see
                                              >
                                              > <?xml version="1.0" encoding="iso-8859-1"?>
                                              >
                                              > If I have
                                              > :set enc=utf-8
                                              > will I get utf-8 in that line?

                                              I have a feeling that this is hardcoded. Ill add it to my list.

                                              >
                                              > Have you actually tested for W3C compliance?

                                              Yes. All 8 tests fully pass.
                                              >
                                              > Very minor points: you might want to change the line
                                              >
                                              > if exists("html_font")
                                              >
                                              > to
                                              >
                                              > if exists("g:html_font")

                                              Will do

                                              >
                                              > Some readers will find this clearer, and if those lines ever get wrapped
                                              > in a function, then it will actually make a difference. Please fix the
                                              > indentation in places like this:
                                              >
                                              > - if exists("use_xhtml")
                                              > - let s:LeadingSpace = ' '
                                              > - else
                                              > let s:LeadingSpace = ' '
                                              > - endif

                                              I thought I had. Ill have a look.

                                              >
                                              > HTH --Benji Fisher
                                              >


                                              Thanks for your time Benji!

                                              Best Regards

                                              Edd
                                            • Benji Fisher
                                              ... I just mean that, looking at the above example and just thinking about how easy it is to read the source, there does not seem to be any advantage to using
                                              Message 22 of 23 , Oct 12, 2006
                                              • 0 Attachment
                                                On Wed, Oct 11, 2006 at 06:48:47PM +0100, Edd Barrett wrote:
                                                >
                                                > On 10/10/06, Benji Fisher <benji@...> wrote:
                                                > >
                                                > > The samples look fine to me (using Mozilla 1.7.12 on Linux). I
                                                > >would like to see an example where the background color changes, if only
                                                > >so that I can see some situation where
                                                > >
                                                > > <span class="foo"> (text) </span>
                                                > >
                                                > >looks simpler (by rudimentary measures such as character count) than
                                                > >
                                                > > <font color="#EEE"> (text) </font>
                                                >
                                                > I'm not sure what you mean here. Please explain...

                                                I just mean that, looking at the above example and just thinking
                                                about how easy it is to read the source, there does not seem to be any
                                                advantage to using CSS. With CSS, there will be extra material in the
                                                header (defining the attributes for the foo class) and the markup in the
                                                body will be about as complicated. However, if the bar class defines
                                                foreground and background colors, then the CSS version will still have
                                                something like

                                                <span class="bar"> (text) </span>

                                                in the body, while the non-CSS version will have something like

                                                <font color="#EEE" bgcolor="333"> (text) </font>

                                                and now the CSS version is easier to read.

                                                If you add a syntax error to your example file, then it should show
                                                up with Error highlighting. With most color schemes, this will change
                                                the background color as well as the text color. Then we can see how
                                                this gets translated into HTML or XHTML.

                                                HTH --Benji Fisher
                                              • Edd Barrett
                                                ... Yes I see, If i had written this from scratch i would have not included tags atall because they are depricated. I was just respecting the existing
                                                Message 23 of 23 , Oct 12, 2006
                                                • 0 Attachment
                                                  On 12/10/06, Benji Fisher <benji@...> wrote:
                                                  > <span class="bar"> (text) </span>
                                                  >
                                                  > in the body, while the non-CSS version will have something like
                                                  >
                                                  > <font color="#EEE" bgcolor="333"> (text) </font>
                                                  >
                                                  > and now the CSS version is easier to read.

                                                  Yes I see,

                                                  If i had written this from scratch i would have not included <font>
                                                  tags atall because they are depricated. I was just respecting the
                                                  existing code to be honest. This would have to be something you take
                                                  up with the original writer(?) or Bram(?).

                                                  I'll check the syntax error highlight for you too.

                                                  Will probably get a chance at the weekend.

                                                  Thanks for your time.

                                                  Best Regards

                                                  Edd
                                                Your message has been successfully submitted and would be delivered to recipients shortly.