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

Add support for pandoc-include #9

Closed
AmitMY opened this issue Sep 28, 2020 · 4 comments
Closed

Add support for pandoc-include #9

AmitMY opened this issue Sep 28, 2020 · 4 comments

Comments

@AmitMY
Copy link

AmitMY commented Sep 28, 2020

I would like to include files under my main file.

I want to use:
https://hackage.haskell.org/package/pandoc-include

But it seems like its not working with these actions.

Is there a way to add pandoc-include so including files would work?
This is a really basic feature I'm surprised its not in pandoc core.

@florian6973
Copy link

I am very interested in this feature too!
Currently, I use conda and pip to install pandoc and pandoc-include and use it with github action but it is not optimized...

@tarleb
Copy link
Member

tarleb commented Nov 19, 2020

My suggestion would be to use the include-files Lua filter instead. It doesn't require compilation and should serve as a full replacement.

@florian6973
Copy link

Thank for your advice. To do so, I would need to download the filter and put it in the repository? However, I believe there will be problems with the links to the bibliography, the csl style or images (I didn't succeed to set path, or it doesn't work for pandoc), and I don't see in the examples of this repo how to exclude a file (readme). My current script is (after installation of the dependencies : texlive, texlive-lang-french, pandoc, pandoc-include):

all_files=$(find $GITHUB_WORKSPACE -type f -name "*.md")
files_array=($(echo $all_files | tr ' ' "\n"))
for index in ${!files_array[*]}
do  
  f_path=${files_array[$index]}  
  dossier=$(dirname $f_path)
  nom_complet=$(basename $f_path)
  nom="${nom_complet%.*}"
  
  if [ $nom != "README" ]
  then  
    cd $dossier
    mkdir -p Bibliographie
    cp -n $GITHUB_WORKSPACE/Bibliographie/apa.csl Bibliographie/apa.csl
    pandoc --from markdown --to latex --filter /usr/share/miniconda/lib/python3.8/site-packages/pandoc_include.py -C $nom.md -o $GITHUB_WORKSPACE/$nom.pdf --metadata-file=$GITHUB_WORKSPACE/conf.yaml
    cd $GITHUB_WORKSPACE
  else
    echo "Ignoré"
  fi
done

Thank you :)

@tarleb
Copy link
Member

tarleb commented Nov 20, 2020

I'm not quite sure what you are asking. Could you post this to the pandoc-discuss mailing list? There are more people who might be able to help.

Support for the requested Haskell filter is out-of-scope, so I'm closing this. Adding the official Lua filters to the Docker image would be worthwhile. I'm keeping it in mind. You can also open an issue in the pandoc/dockerfiles repo to gather more feedback.

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