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

Scrivomatic only works with markdown files named .md #11

Closed
oWretch opened this issue Mar 12, 2018 · 3 comments
Closed

Scrivomatic only works with markdown files named .md #11

oWretch opened this issue Mar 12, 2018 · 3 comments
Assignees

Comments

@oWretch
Copy link

oWretch commented Mar 12, 2018

Hi Ian,

I've noticed in my testing that Scrivomatic only works with an input markdown file with a .md suffix. If I use a suffix such as .mdown, or no suffix at all (which is the default when exporting out of Scrivener) then Scrivomatic fails to find the resulting LaTeX file.

I'm not sure what the simplest way to handle this would be, without having to maintain a large list of possible suffixes. If it is possible to have Scrivomatic work without a suffix, that would be ideal.

Thanks,

Jerome

@iandol iandol self-assigned this Mar 25, 2018
@iandol
Copy link
Owner

iandol commented Mar 25, 2018

OK, I'll work out why I hard coded this (I always use .md but I agree it should ideally be suffix agnostic). Thanks for reporting this.

@iandol
Copy link
Owner

iandol commented Apr 7, 2018

@oWretch — OK, I was hard coding .md in the postBuild function (when using the -b flag). I've updated scrivomatic to V1.0.17 to fix this, I tested using:

❯ scrivomatic -v -b -i Behaviour\ Platform.txt

And it all worked fine (see log below). It should now work with any file extension, please can you confirm it works and reopen if it doesn't. Thanks!

=== ------------------------------------------------------ ===
=== Scrivomatic V1.0.17 Report @ 2018-04-07 17:39:18 +0800 ===
=== ------------------------------------------------------ ===
 Running under Ruby 2.3.3
 Working directory: /Users/ian/Desktop/reviews_mmd
===------ Input Options: ------===
#<struct Scrivomatic::OPT input="Behaviour\\ Platform.txt", output=nil, to=nil, yaml=nil, command="pandocomatic", envpath="/Users/ian/.rbenv/shims:/Users/ian/miniconda3/bin:/Library/TeX/texbin:/Users/ian/bin:/usr/local/bin", build=true, verbose=true, dry_run=false, open_log=false>
===------ Final ENV PATH: ------===
/Users/ian/.rbenv/shims:/Users/ian/miniconda3/bin:/Library/TeX/texbin:/Users/ian/bin:/usr/local/bin:/usr/local/Cellar/rbenv/1.1.1/libexec:/Users/ian/.rbenv/shims:/Users/ian/bin:/usr/local/sbin:/Applications/MATLAB_R2017b.app/bin:/Library/TeX/texbin:/Users/ian/.zplug/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
===------ TOOL PATHS: ------===
---pandoc: /usr/local/bin/pandoc | V: 2.1.3
---pandocomatic: /Users/ian/.rbenv/shims/pandocomatic | V: Pandocomatic version 0.2.2.1
---ruby: /Users/ian/.rbenv/shims/ruby | V: ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]
---rbenv: /usr/local/bin/rbenv
---python: /Users/ian/miniconda3/bin/python
---xelatex: /Library/TeX/texbin/xelatex
---latexmk: /Library/TeX/texbin/latexmk

 … running pandocomatic, please wait …
===------ COMMAND OUTPUT: ------===
:: Running: /Users/ian/.rbenv/shims/pandocomatic --debug Behaviour\ Platform.txt
::: pandoc	--bibliography=/Users/ian/.pandoc/Core.json \
::: 	--csl=/Users/ian/.pandoc/csl/apa-ian.csl \
::: 	--from=markdown \
::: 	--to=latex \
::: 	--standalone \
::: 	--filter=/Users/ian/.pandoc/filters/removeHR \
::: 	--filter=/usr/local/bin/pandoc-citeproc \
::: 	--dpi=72 \
::: 	--template=/Users/ian/.pandoc/templates/eisvogel.latex \
::: 	--toc \
::: 	--base-header-level=2
::: Pandocomatic needed 1.5 seconds to convert 'Behaviour Platform.txt'.
:: exit status: pid 62047 exit 0

===------ RUN LATEXMK on Behaviour\ Platform.tex: ------===
:: directory: /Users/ian/Desktop/reviews_mmd
:: command: latexmk -logfilewarnings -interaction=nonstopmode -gg -pv -time -xelatex -f Behaviour\ Platform.tex
::: Latexmk: This is Latexmk, John Collins, 17 Jan. 2018, version: 4.55.
::: Latexmk: Removing all generated files
::: Run number 1 of rule 'xelatex'
::: Running 'xelatex -no-pdf  -interaction=nonstopmode -recorder  "Behaviour Platform.tex"'
::: Latexmk: applying rule 'xelatex'...
::: This is XeTeX, Version 3.14159265-2.6-0.99998 (TeX Live 2017) (preloaded format=xelatex)
::: LaTeX2e <2017-04-15>
::: LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
::: Latexmk: References changed.
::: Latexmk: References changed.
::: Latexmk: Log file says output to 'Behaviour Platform.xdv'
::: Run number 2 of rule 'xelatex'
::: Running 'xelatex -no-pdf  -interaction=nonstopmode -recorder  "Behaviour Platform.tex"'
::: === TeX engine is 'XeTeX'
::: Latexmk: applying rule 'xelatex'...
::: This is XeTeX, Version 3.14159265-2.6-0.99998 (TeX Live 2017) (preloaded format=xelatex)
::: LaTeX2e <2017-04-15>
::: LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
::: Latexmk: References changed.
::: Latexmk: Log file says output to 'Behaviour Platform.xdv'
::: Run number 3 of rule 'xelatex'
::: Running 'xelatex -no-pdf  -interaction=nonstopmode -recorder  "Behaviour Platform.tex"'
::: === TeX engine is 'XeTeX'
::: Latexmk: applying rule 'xelatex'...
::: This is XeTeX, Version 3.14159265-2.6-0.99998 (TeX Live 2017) (preloaded format=xelatex)
::: LaTeX2e <2017-04-15>
::: Latexmk: Log file says output to 'Behaviour Platform.xdv'
::: Run number 1 of rule 'xdvipdfmx'
::: Running 'xdvipdfmx -o "Behaviour Platform.pdf"  "Behaviour Platform.xdv"'
::: === TeX engine is 'XeTeX'
::: Latexmk: applying rule 'xdvipdfmx'...
::: Running 'start open "Behaviour Platform.pdf"'
::: Latexmk: All targets (Behaviour Platform.pdf Behaviour Platform.xdv) are up-to-date
::: Accumulated processing time = 8.5
:: exit status: pid 62279 exit 0
:: clean-up: used latexmk -c, but kept the latex build log as latexlog_Behaviour\ Platform.log

@iandol iandol closed this as completed Apr 7, 2018
@oWretch
Copy link
Author

oWretch commented Apr 20, 2018

Works wonderfully now for me, thank you. Now I can just breeze through the compile settings out of Scrivener.

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