Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown directive type "bibliography" #30

Open
KulikDM opened this issue Apr 16, 2023 · 3 comments
Open

Unknown directive type "bibliography" #30

KulikDM opened this issue Apr 16, 2023 · 3 comments

Comments

@KulikDM
Copy link

KulikDM commented Apr 16, 2023

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!

@ghost
Copy link

ghost commented May 25, 2023

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.

@ReenigneArcher
Copy link

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.

@tdegeus
Copy link

tdegeus commented Dec 8, 2023

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 #14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants