kevboh / longform

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

Feature request: Sharing notes between Longform projets #192

Open chlorophilo opened 1 year ago

chlorophilo commented 1 year ago

Describe the solution you'd like I use Longform for technical writing projects built from parts, some of which I would like to incorporate into more than one project. I don't want to have to duplicate notes between projects to achieve this purpose as I would end up having to amend all the duplicates to replicate any amendments I make over time. There should be just one version of the note that needs to be amended, and those amendments should then appear in all compiled projects incorporating that note.

Describe alternatives you've considered I have thought of two possibilities:

  1. Use vault-relative paths to identify the notes within a project. This is not currently supported. Perhaps it is related to the other feature request about seeing through into sub-folders. Perhaps "scenes" for inclusion in a project could be selected using something like the pop-up Obsidian uses for identifying where you want a note to move to.
  2. Place all my notes used in these projects in one folder, under one Longform project of a generic nature. The index note populates with the entire collection of notes in that folder. Then I delete those that are irrelevant to each compiled document variant I need to produce. This is far from ideal as there can be, say, 50 parts to one compiled document. A more efficient variant of this would be to maintain a note containing separate lists of parts of each variant compiled document. The list would be formatted like the YAML in the Longform index note. I would then copy and paste the relevant list of parts into the generic index note, replacing the list that is there. I have tried this, however, and the "scenes" tab in the Longform sidebar simply disappears, as do various other headings within the "projects" tab. So, there is clearly a lot more to editing the scenes list in the index note than meets the eye. Guidance on how to edit the index note parts list would be helpful in the absence of a more comprehensive solution.
b-camphart commented 1 year ago

Can this be solved by embedding a note that you want referenced into a "scene"?

kevboh commented 1 year ago

By embedding do you mean transcluding (i.e. ![...])? If so, not without a new compile step that copies over the transcluded note, tracked in #90

chlorophilo commented 1 year ago

That idea would be great if it could be implemented. One thing I have found, though, when trying to embed one note in another in Obsidian is that you end up with a vertical line along the left hand side of the transcluded note, and the note is not flush with the left margin. So, if an additional compile step was added then it would need to address these formatting issues.

b-camphart commented 1 year ago

I know exactly what you're talking about, but that can be changed through your theme or custom css snippets.

chlorophilo commented 1 year ago

Unfortunately I would not know where to begin in pulling any custom coding together, even in CSS. I have used other people's snippets before, but not drafted my own.

Longform's other functionality - eg the easy reordering of scenes - mean that my preferred solution would be for embedding/transcluding to occur within Longform But if you know of a relevant snippet do please share.

wesleyboar commented 8 months ago

a vertical line along the left hand side of the transcluded note, and the note is not flush with the left margin

that can be changed through your theme or custom css snippets

other people's snippets

@chlorophilo, here is CSS I use to make embedded notes appear flush and inline:

/*! customize Obsidian Note Embed */

@media screen, print {
  /* To remove excess negative space around embedded content */
  body {
    --embed-background: inherit;
    --embed-border-left: none;
    --embed-padding: 0;
    --embed-font-style: inherit;
  }
  /* To hide file name of embedded content */
  .markdown-embed-title {
    display: none;
  }
}

Update: I streamlined it and updated it to work on PDF export based on an obsidian forum message.

Update: To also hide the names of the files, add .markdown-embed-title { display: none; }.

I use Obsidian (macOS) Version 1.5.3 (Installer 1.4.16).