We are currently planning to migrate to a different platform for the forum. We will announce this fact both here and on Twitter, once we have settled on a solution.

New file with pre-existing headings and YAML?

edited October 26 in General

Hi,

Just wondering if it's possible to have a template for new files? Basically so that whenever I make a new file, the file starts with some per-established headings and a YAML frontmatter.

Thanks!

Comments

  • This would be handy, but a list of yaml heading blanks, could be really useful.

    For instance two personal quick set ups that create the file "THESIS" and "FOOTNOTE" using placement and a user designed form:

    1) TITLE, SECTION, declared as %YAML-TITLE%, %YAML-SECTION%
    2) Standard generation variables %Z-DATE% %Z-ID%
    3) Location reference %Z-dir+1% %Z-dir+2%, %Z-dir+3%
    4) citeation source %@Whatever%
    5) literals

    `---
    title: (%YAML-SECTION%) %YAML-TITLE%
    chapter-title: %YAML-TITLE%
    section: %YAML-SECTION%
    author: 'Greg Schofield'
    date: '%Z-DATE%
    subdivision: %Z-dir+1%
    division: %Z-dir+2%
    project: '%Z-dir+3%
    status: 'draft'

    keywords: [thesis]
    id: '%Z-ID%'
    endnotes: []
    ...
    `

    `---
    title: %YAML-TITLE%
    type: "Footnote"
    source: %@Whatever%
    id: %Z-ID%
    ...

    %YAML-TITLE%: %@Whatever%

    text`

  • @Greg_Schofield_Perth is this what you copy paste in when you make a new note?

  • edited October 26

    @mrklmb said:
    @Greg_Schofield_Perth is this what you copy paste in when you make a new note?

    Its basically an editing thing, as the research I am doing often leads to radical restructuring and there are lot of very long footnotes, copy and pasting becomes hazardous and going back and between documents was leading to a lot of mistakes, distractions and wasted time.

    In the end I want to be able to copy a slab of text, footnotes and all, and plonk it down elsewhere with everything intact, but that depends on features in zettlr -- so I am trying to plan ahead. The idea is a box of papers where nothing is wasted, so I have Sources, Notes , Comments and Manuscript Fragments as sub-directories within a general directory __Folgezettel.

    Ideally tags become topical references, and yaml holds specific reference points that I do not want to appear on export.

    Over time I would like to see a feature where I am writing a link reference in the normal 'filename', a click to open and change, but with #include in front of it #include' [filename]([[id]]) a preview shows me the lot assembled. Its is a to fragment checking

    It is overkill, I know, I just want to future-proof things and Yaml seems really well suited because it is external to content. If #Include is added as feature I can assemble footnotes from paragraph fragments, which makes the notes much more zettelkasten, but also practical bits that can be directly called.

    Sorry for the long reply, this is certainly a very specific use of zettr, and I am in the process of leaning form all my very costly mistakes --- the bibliography is very big, and I spend far too much time searching for a quote I deleted when I can only remember fragments (author's last name, part of the title, etc.,.). I also spend too much time, making silly mistakes, moving things from one directory to another.

  • @mrklmb said:
    Hi,

    Just wondering if it's possible to have a template for new files? Basically so that whenever I make a new file, the file starts with some per-established headings and a YAML frontmatter.

    Thanks!

    See my Oct. 22 post about espanso.

  • Greg,

    Where you have things like %YAML-TITLE%, how would you initialize the value?

Sign In or Register to comment.