Ulf Kronman | 4 Mar 19:33 2007
Picon
Picon

Re: UnicodeDecodeError

David Goodger <goodger <at> python.org> writes:

> 
> [J P Abrahamsen]
> > I think there is a bug in the newest svn checkout 4891. I get a 
> > UnicodeDecodeError. This is fixed by saving the file 
> > writers\html4css1\html4css1.css as plain ASCII (it was saved as UTF-8).
> 
> I don't see a problem.  html4css1.css contains no non-ASCII
> characters; saving it as UTF-8 would make no difference.  Unless
> there's a byte-order mark (BOM) in your copy, which might happen
> if you save the file on a Windows platform.  There's no BOM in
> the file in SVN.

Actually, it DOES contain a non-ASCII character. Look at the 4th line,
containing an abbreviation of a Swedish date: sö (for sunday):

/*
:Author: David Goodger
:Contact: goodger <at> python.org
:Date: $Date: 2006-05-21 22:44:42 +0200 (sö, 21 maj 2006) $

I changed that to sun instead of sö, and got rid of the UnicodeDecodeError.

The non-ASCII code is also present in the repository at the fourth line of the
file writers\html4css1\html4css1.css

Could someone please correct that?

Regards,
(Continue reading)

Felix Wiemann | 4 Mar 20:38 2007
Picon

Re: UnicodeDecodeError

Ulf Kronman wrote:

> Actually, it DOES contain a non-ASCII character. Look at the 4th line,
> containing an abbreviation of a Swedish date: sö (for sunday):
> 
> :Date: $Date: 2006-05-21 22:44:42 +0200 (sö, 21 maj 2006) $

You seem to be using a localized check-out.  This is a known problem; 
please read 
<http://docutils.sf.net/docs/dev/repository.html#workaround-for-localized-dates> 
for how to fix this.

I'm sorry that there is no better solution right now.

Best wishes,

     Felix

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Docutils-users mailing list
Docutils-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
(Continue reading)

Felix Wiemann | 4 Mar 22:31 2007
Picon

Re: UnicodeDecodeError

Felix Wiemann wrote:

> You seem to be using a localized check-out.

I've now replaced $Date$ and $Revision$ with $Id$, which will never get 
expanded to non-ASCII.  The test suite will run without warnings or 
errors even if I do a global "s/\$Date: /\$Däŧe: /gi".  This is because 
only .txt files use $Date$ now, as far as I can see; and all .txt files 
are encoded with UTF-8.

So Docutils will work fine even if you have a locale other than "C".

It seems to me that the workaround for localized dates is obsolete now. 
  If there are no objections, I'll remove it from docs/dev/repository.txt.

Best wishes,

     Felix

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Docutils-users mailing list
Docutils-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
(Continue reading)

Eur Ing Chris Green | 5 Mar 12:24 2007
Picon

'Right' way to set default CSS for reStructuredText?

I have just started using reStructuredText for my own notes,
documentation, etc.  It seems to have just about the right set of
facilities for what I want, in particular the table capability is why
I prefer it to Markdown.

My question is what is the best/neatest/easiest way to set default CSS
styles for use in reStructuredText documents?  In particular I want to
change the borders etc. for tables.

--

-- 
Chris Green

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Eur Ing Chris Green | 5 Mar 13:23 2007
Picon

Re: 'Right' way to set default CSS for reStructuredText?

On Mon, Mar 05, 2007 at 11:24:20AM +0000, Eur Ing Chris Green wrote:
> 
> My question is what is the best/neatest/easiest way to set default CSS
> styles for use in reStructuredText documents?  In particular I want to
> change the borders etc. for tables.
> 
OK, I've found the answer, in the command line arguments for
rst2html.py, however that raises a further question, --help produces:-

--stylesheet=<URL>      Specify a stylesheet URL, used verbatim.  Overrides
                        --stylesheet-path.

--stylesheet-path=<file> Specify a stylesheet file, relative to the current
                        working directory.  The path is adjusted relative to
                        the output HTML file.  Overrides --stylesheet.
                        Default: "/usr/lib/python2.4/site-
                        packages/docutils/writers/html4css1/html4css1.css"

Er, they both override each other?

More to the point is there a way to have an additional style sheet
which just overrrides some of the styles in the default style sheet? I
want to keep the defaults for everything except tables.

--

-- 
Chris Green

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
(Continue reading)

Alan G Isaac | 5 Mar 14:11 2007
Picon

Re: 'Right' way to set default CSS for reStructuredText?

On Mon, 5 Mar 2007, Eur Ing Chris Green apparently wrote: 
> OK, I've found the answer, in the command line arguments for 
> rst2html.py, however that raises a further question, --help produces:- 

> --stylesheet=<URL>      Specify a stylesheet URL, used verbatim.  Overrides 
>                         --stylesheet-path. 

> --stylesheet-path=<file> Specify a stylesheet file, relative to the current 
>                         working directory.  The path is adjusted relative to 
>                         the output HTML file.  Overrides --stylesheet. 
>                         Default: "/usr/lib/python2.4/site- 
>                         packages/docutils/writers/html4css1/html4css1.css" 

> Er, they both override each other? 

> More to the point is there a way to have an additional style sheet 
> which just overrrides some of the styles in the default style sheet? I 
> want to keep the defaults for everything except tables. 

Presumably the over-ride arrangement means that order 
matters.

Order should matter, but no over-riding should take place.
The problem with this lies in the default handling.

I should be able to use a URL for my global settings and 
a file for local changes.  But the handling of the default
makes this unworkable.

It would also be nice, as you are pointing out, to be able 
(Continue reading)

Felix Wiemann | 5 Mar 18:08 2007
Picon

Re: 'Right' way to set default CSS for reStructuredText?

Eur Ing Chris Green wrote:

> More to the point is there a way to have an additional style sheet
> which just overrrides some of the styles in the default style sheet?

No, that's not possible, at least right now.  You need to do something like

      <at> import url(html4css1.css)

in your own stylesheet.

Best wishes,

     Felix

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Eur Ing Chris Green | 5 Mar 17:35 2007
Picon

Any way to get <H2>, <H3> sizes without first using <H1>?

I know this may sound a bit of a strange request but still....

I'm creating lots of small bits of documentation in reStructuredText
and, for some, the size of the first section or heading (which uses
<H1>) is too large really, I want to use the smaller sizes without
having a bigger one above.

I know I could use a style sheet but then that would affect all my
documentation and I *do* want to use <H1> headings in some of them.

Is there any way to get what I want in reStructuredText?

--

-- 
Chris Green

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Felix Wiemann | 5 Mar 18:40 2007
Picon

Re: Any way to get <H2>, <H3> sizes without first using <H1>?

Eur Ing Chris Green wrote:

> I want to use [h2, h3] without having a bigger one above.
> 
> I know I could use a style sheet but then that would affect all my
> documentation and I *do* want to use <H1> headings in some of them.

You can use --initial-header-level; see 
<http://docutils.sf.net/docs/user/config.html#initial-header-level>.

Best wishes,

     Felix

--

-- 
Felix Wiemann -- http://www.ososo.de/

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Eur Ing Chris Green | 5 Mar 21:35 2007
Picon

Re: Any way to get <H2>, <H3> sizes without first using <H1>?

On Mon, Mar 05, 2007 at 12:40:23PM -0500, Felix Wiemann wrote:
> Eur Ing Chris Green wrote:
> 
> > I want to use [h2, h3] without having a bigger one above.
> > 
> > I know I could use a style sheet but then that would affect all my
> > documentation and I *do* want to use <H1> headings in some of them.
> 
> You can use --initial-header-level; see 
> <http://docutils.sf.net/docs/user/config.html#initial-header-level>.
> 
Yes, I saw that, but it would mean that I need to run with different
parameters for different bits of documentation, something I was hoping
to avoid.

--

-- 
Chris Green

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Gmane