rstfmt icon indicating copy to clipboard operation
rstfmt copied to clipboard

Unknown directive type "bibliography"

Open KulikDM opened this issue 1 year ago • 3 comments

This package has helped a lot to format my rst files, but it seems to be having an issue with this:

docutils.utils.SystemMessage: :347: (ERROR/3) Unknown directive type "bibliography".

.. bibliography::
   :cited:
   :labelprefix:

In general it seems to not work too well with sphinxcontrib-bibtex as :cite: also leads to errors (ERROR/3) Unknown interpreted text role "cite".

Looking forward to carrying on using this library and thanks for all the great work so far!

KulikDM avatar Apr 16 '23 09:04 KulikDM

Get the same on bibliography, and some other like only:

> rstfmt --ext txt -w 80 .
:12: (ERROR/3) Unknown directive type "only".

.. only:: html or text

If the program could just skip formatting unknown directives, it would be helpful.

ghost avatar May 25 '23 07:05 ghost

I just discovered this tool, and agree about skipping unknown directives.

Unknown directive type "todo".

Which is available as an official sphinx plugin.

conf.py

extensions = [
    'sphinx.ext.todo',  # enable to-do sections
]
todo_include_todos = True

And, I have a lot of other directives provided by plugins, so would need a way to skip them or something.

ReenigneArcher avatar Aug 31 '23 15:08 ReenigneArcher

Thanks for this tool. Thanks!!

However, I too encounter the mentioned error for:

.. seealso::

which is not even an extension I think (see help).

And also for

.. tabs::

from sphinx_tabs.tabs.

There should be a way to (either):

  1. Format in spite of not knowing the directive (in a 'panic' mode maybe).
  2. Add some information on them from the command-line.
  3. Add some information on them in a config (yaml) file.

There should also be a link to https://github.com/dzhu/rstfmt/issues/14

tdegeus avatar Dec 08 '23 10:12 tdegeus