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

How to use include RST directive #799

Open
asmeurer opened this issue May 16, 2023 · 1 comment
Open

How to use include RST directive #799

asmeurer opened this issue May 16, 2023 · 1 comment

Comments

@asmeurer
Copy link

I am trying to use the include RST directive to split my paper into multiple documents. However, when I try doing this, I get an error building the paper like:

Building: 01_arrayapi
Traceback (most recent call last):
  File "/Users/aaronmeurer/Documents/scipy_proceedings/publisher/build_paper.py", line 381, in rst2tex
    rst, = glob.glob(os.path.join(out_path, '*.rst'))
ValueError: too many values to unpack (expected 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/aaronmeurer/Documents/scipy_proceedings/publisher/build_paper.py", line 679, in <module>
    build_paper(paper_id)
  File "/Users/aaronmeurer/Documents/scipy_proceedings/publisher/build_paper.py", line 660, in build_paper
    rst2tex(out_path)
  File "/Users/aaronmeurer/Documents/scipy_proceedings/publisher/build_paper.py", line 383, in rst2tex
    raise RuntimeError("Found more than one input .rst--not sure which "
RuntimeError: Found more than one input .rst--not sure which one to use.
Error building paper papers/01_arrayapi/. Aborting.

I tried using a different extension from rst but then I just get the error

docutils.utils.SystemMessage: <string>:866: (SEVERE/4) Problems with "include" directive path:
InputError: [Errno 2] No such file or directory: 'test.txt'.
@deniederhut
Copy link
Member

Yup so we are doing the foolish thing of assuming there will only be one .rst file, and that the file will be your paper. Would it work to have the include files in a sub-directory?

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

2 participants