longform icon indicating copy to clipboard operation
longform copied to clipboard

Compile Step: Export via Pandoc

Open matthewmerendo opened this issue 2 years ago • 8 comments

What should this step do? I use Pandoc to create Word documents from my manuscript notes. It'd be nice if I could do that as a compile step rather than something I do manually after the compile

Should this step affect scenes, manuscripts, or join the two? Manuscripts

matthewmerendo avatar Feb 07 '23 05:02 matthewmerendo

This is technically doable with a user step right now—I've done it in my own vault. It's complicated to include in Longform directly since pandoc has external dependencies. I've been meaning to look into integrating with another plugin, or perhaps finding a way to do it in Longform. Thanks for the reminder. Happy to share a version of my user step if you're interested.

kevboh avatar Mar 12 '23 12:03 kevboh

Definitely! Share away!

On Sun, Mar 12, 2023 at 8:57 AM Kevin Barrett @.***> wrote:

This is technically doable with a user step right now—I've done it in my own vault. It's complicated to include in Longform directly since pandoc has external dependencies. I've been meaning to look into integrating with another plugin, or perhaps finding a way to do it in Longform. Thanks for the reminder. Happy to share a version of my user step if you're interested.

— Reply to this email directly, view it on GitHub https://github.com/kevboh/longform/issues/142#issuecomment-1465191495, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM64ZHJOY6BG4WL7IBBWTG3W3XI5TANCNFSM6AAAAAAUTQXBEA . You are receiving this because you authored the thread.Message ID: @.***>

--


Matt Merendo https://matthewmerendo.com 724.777.9795 | @.***

matthewmerendo avatar Mar 12 '23 19:03 matthewmerendo

I'd love to see a version of your Pandoc user step if you're still willing to share.

zverhope avatar Jun 07 '23 19:06 zverhope

This is technically doable with a user step right now—I've done it in my own vault. It's complicated to include in Longform directly since pandoc has external dependencies. I've been meaning to look into integrating with another plugin, or perhaps finding a way to do it in Longform. Thanks for the reminder. Happy to share a version of my user step if you're interested.

Yes, please. Share it.

fabioscarsi avatar Oct 01 '23 17:10 fabioscarsi

Here you go—sorry I took so long to do this!

A few notes:

  1. It requires pandoc and pdflatex to be installed. I do this via homebrew, with brew install pandoc and brew install mactex. Note that mactex is gigantic.
  2. There are a bunch of options in the step you probably need to fill out to get it working. Here's what mine looks like:

image

  1. It does a bit of formatting, like prepending the title, that should probably be done as a dedicated step instead. Homework for you, maybe!

kevboh avatar Oct 05 '23 13:10 kevboh

I'm keeping this issue open in case I ever decide to include this in Longform proper, but it's not a high priority at the moment. Hopefully this user script helps!

kevboh avatar Oct 05 '23 13:10 kevboh