Brett g Porter | 1 Dec 16:43 2003
Picon

Anonymous hyperlink behavior changed?

Howdy --

I just grabbed a fresh copy of the docutils code from CVS this morning 
(after a loooong time -- probably since June), and some markup that had 
worked fine previously is now broken -- was this relying on an old bug, 
or has the syntax changed?

One example of the text in question:

Label__
    A static text label that may be placed anywhere inside the borders 
of
    the control. You may set the font, color, and attributes of the text.

__ `Label parameters`_

(elsewhere...)

Label Parameters
+++++++++++++++++

Before today, the topmost link here ('Label') was correctly linked to 
the 'Label Parameters' section, but now, I get this error message:

Anonymous hyperlink mismatch: 12 references but 8 targets. See 
"backrefs" attribute for IDs.

--

-- 
//  Today's Oblique Strategy (© Brian Eno/Peter Schmidt):
//  Use `unqualified' people
(Continue reading)

David Goodger | 3 Dec 03:27 2003

Re: Anonymous hyperlink behavior changed?

Brett g Porter wrote:
> I just grabbed a fresh copy of the docutils code from CVS this morning 
> (after a loooong time -- probably since June), and some markup that had 
> worked fine previously is now broken -- was this relying on an old bug, 
> or has the syntax changed?

Neither; it ought to work.  Works fine for me.  Any old code laying
around?

If the problem persists, please send a minimal complete input file, the
command line used, and version info.  The output of tools/publish.py
may also come in handy.

> (elsewhere...)
> 
> Label Parameters
> +++++++++++++++++
> 
> 
> Before today, the topmost link here ('Label') was correctly linked to 
> the 'Label Parameters' section, but now, I get this error message:
> 
> Anonymous hyperlink mismatch: 12 references but 8 targets. See 
> "backrefs" attribute for IDs.

Is there another "Label Parameters" target (incl. section title) in
your document?

--

-- 
David Goodger    http://starship.python.net/~goodger
(Continue reading)

Martin Pool | 10 Dec 10:55 2003
Picon

call-out hyperlinks?

Hi,

The reST web site says that it's possible to have external hyperlinks
called out in a footnote.  I'd like to have this happen in my LaTeX
output, so that the links are visible when it's printed, but I can't
see a way to do it.  What can I do?

http://docutils.sourceforge.net/docs/rst/quickref.html#external-hyperlink-targets

Thanks,
--

-- 
Martin
David Goodger | 10 Dec 14:29 2003

Re: call-out hyperlinks?

Martin Pool wrote:
> The reST web site says that it's possible to have external hyperlinks
> called out in a footnote.  I'd like to have this happen in my LaTeX
> output, so that the links are visible when it's printed, but I can't
> see a way to do it.  What can I do?

Use the "target-notes" directive: 
<http://docutils.sf.net/spec/rst/directives.html#target-notes>.

-- David Goodger

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
Luc Saffre | 12 Dec 12:18 2003
Picon
Picon

Re: registering a directive

On 12/12/2003 0:13, David Goodger wrote:
> Works for me.  In case you haven't solved it yet, here's my front-end
> script, x.py (based on tools/rst2html.py)::

I got this somehow working on 16 nov and missed to tell you about it.
And I committed my code too late to CVS, so now I even cannot reproduce 
my own problem anymore. I hope to learn from my mistakes, please forgive 
me. Your x.py and x.txt works also for me.

My current implementation is here:
http://cvs.sourceforge.net/viewcvs.py/lino/lino/src/lino/webman/xdocutils.py?view=markup
where also the fileref role works, as discussed in another thread. The 
next problem for webman, "intra-site references", is yet to be meditated...

Luc Saffre

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
David Goodger | 11 Dec 23:13 2003

Re: registering a directive

[Clearing the email backlog.  Sorry for the delay.]

Luc Saffre wrote:
 > I tried to register a new directive, using the instructions on
 > http://docutils.sourceforge.net/spec/howto/rst-directives.html
 >
 > My directive would be something like this::
 >
 >   .. script::
 >     import sys
 >     print "Generated using *Python* (version `%s`)" % repr(sys.version)
 >
 > Here is the code that defines this directive::
 >
 >   def exec_script(name, arguments, options, content, lineno,
 >            content_offset, block_text, state, state_machine):
 >     raise "has been called"
 >     # todo: execute script and return something
 >
 >   exec_script.content = True
 >
 >   from docutils.parsers.rst import directives
 >   directives.register_directive('script',exec_script)
 >
 >   from docutils.parsers.rst.languages import en
 >   en.directives['script'] = 'script'
 >
 >   publish_file(...)
 >
 > But when running it (on a file containing such a 'script' directive)
(Continue reading)

Graydon Saunders | 12 Dec 17:16 2003

building documents from multiple files

I have a bunch of restructured text content files which get collected
via a couple layers of files with nothing in them but headings and
include directives to build documentation.   (All the content is in the
leaves of the tree.)

The top level such 'includes' file also includes a 'glossary' file and a
'detailed reference' file; the other documentation refers to these files
pretty indiscriminately.  (so `widget`_ shows up in the text a lot; if
the reader wants a reminder of what a widget is, they can click on it
and wind up in the glossary or the detailed reference where _`widget` is
defined.)

The main documentation has now grown to a size where having it all in
one file is unwieldy and awkward.

I would like to be able to break the main documentation up, so that
instead of one top level file full of include directives, I can have
four or five sections which build independently.  What I don't know how
to do is how I can keep the common glossary and detailed references
without including it in each section.

So what I've got is:

Top Level
:::::::::

.. include:: section_one.txt
.. include:: section_two.txt
.. include:: section_three.txt

(Continue reading)

David Goodger | 12 Dec 17:33 2003

Re: building documents from multiple files

For everyone's benefit (I already told Graydon), there are some
existing notes on the subject:
<http://docutils.sf.net/spec/notes.html#large-documents>.  Follow
the links in the first paragraph for other relevant notes.

-- David Goodger

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
Graydon Saunders | 12 Dec 17:54 2003

parsed-literal flag for *include* directive?

So, I've got a couple of config file sections to include in a document,
to show where the user (well, deployment engineer) the changes they're
supposed to make.

Right now, the config file sections are being included in the document -

.. include:: examplefile.eg
    :literal:

What I'd like to do is highlight specific parts of the examples, *while
keeping them as external, included files.*

So .. parsed-literal:: doesn't seem to be the way to go, though I'm
still experimenting with ways to do that with text replacement.

Anyway, the solution I'd prefer for this is to be able to use a
parsed-literal flag with the "include" directive, like so:

.. include:: examplefile.eg
    :parsed-literal:

Is this possible? practical? useful for anybody else?

--

-- 
Graydon Saunders
graydon.saunders <at> sajus.com
mobile: (416) 452 0085

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
(Continue reading)

David Goodger | 12 Dec 18:06 2003

Re: parsed-literal flag for *include* directive?

Graydon Saunders wrote:
> What I'd like to do is highlight specific parts of the examples,
> *while keeping them as external, included files.*

If the external, included file has inline markup, it can't be a
working config file, correct?  So just make the included file
contain a parsed-literal directive.  If it doesn't have inline
markup, "parsed-literal" doesn't apply; just use "include".

I suspect you may be talking about something much more complex.
If so, examples please.

> Is this possible? practical? useful for anybody else?

Possible: I guess so.  Practical: I don't think so.  We'd need to
see more details and examples.

--

-- 
David Goodger    http://starship.python.net/~goodger
For hire: http://starship.python.net/~goodger/cv
Docutils: http://docutils.sourceforge.net/
(includes reStructuredText: http://docutils.sf.net/rst.html)

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click

Gmane