kevboh / longform

A plugin for Obsidian that helps you write and edit novels, screenplays, and other long projects.
Other
664 stars 31 forks source link

Compile Step: Export via Pandoc #142

Open matthewmerendo opened 1 year ago

matthewmerendo commented 1 year ago

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

kevboh commented 1 year ago

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.

matthewmerendo commented 1 year ago

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 | @.***

zverhope commented 1 year ago

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

fabioscarsi commented 1 year ago

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.

kevboh commented 1 year ago

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 commented 1 year ago

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!

kerim commented 4 months ago

This was posted a while ago. I'm wondering if this is still the best way to do this? Currently I'm using the Enhancing Export plugin to export with Pandoc.

kevboh commented 4 months ago

As far as I know, yes—I haven't messed much with pandoc since posting this.