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

Failure to convert included files from .org to .rst #5188

Closed
guanqun-yang opened this issue Dec 28, 2018 · 4 comments
Closed

Failure to convert included files from .org to .rst #5188

guanqun-yang opened this issue Dec 28, 2018 · 4 comments

Comments

@guanqun-yang
Copy link

Problem

I am writing blogs using Emacs org-mode. Specifically, I first create contents and get ml.org file and then convert it into ml.rst using pandoc command pandoc -f org -t rst ml.org.

In order to modulize the contents I wrire. I use the
following code in org-mode

* Supervised Learning
** Regression
#+INCLUDE: "ml/linear.org" :minlevel 3
** Classification
#+INCLUDE: "ml/logistic.org" :minlevel 3

* Unsupervised Learning
** Clustering
#+INCLUDE: "ml/kmeans.org" :minlevel 3
#+INCLUDE: "ml/spectral.org" :minlevel 3

** Dimensionality Reduction
#+INCLUDE: "ml/pca.org" :minlevel 3
#+INCLUDE: "ml/tsne.org" :minlevel 3

When converting this file into pdf using LaTex, the structure is correct and is shown here. However, after conversion to ml.rst file, none of these files are included.

What I Have Done

It seems that this could be resolved using template feature in pandoc, but I am not sure what to do.

Could anyone help me, thank you in advance.

@tarleb
Copy link
Collaborator

tarleb commented Dec 28, 2018

Thank you for the report. When testing with the latest pandoc version, the files are included, but the header level is set incorrectly. This means there is a bug in pandoc's handling of the :minlevel attribute.

@tarleb
Copy link
Collaborator

tarleb commented Dec 28, 2018

@leungbk, since you contributed to pandoc's org components, would you like to take a look? I won't get around to do any coding this week.

@leungbk
Copy link
Contributor

leungbk commented Dec 28, 2018

OK, I'll try to finish this by the end of the weekend.

@tarleb
Copy link
Collaborator

tarleb commented Dec 28, 2018

That is great, thanks! (and no rush)

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

No branches or pull requests

3 participants