Advanced Search and Replace: emojis to text in a specific font

Our head of support tested the sample file I provided and it worked.

1 Like

Thanks!

Are there any other options, please? I banished Java from my machine some time ago for security and stability reasons. Don’t really want to re-introduce those.

Is there any way that a Compile to any other format could keep the structure I’ve been struggling with (even if I were to put Java on my iMac, It’d still be there until I’ve cracked the main issue of Sections etc; the same would apply to Nisus Writer, which @xiamenese generously pointed me in the direction of) and then import that into LibreOffice, please?

I think you need a little one on one tutoring:

zoom me

The issue at this point is the re-import back into Scrivener. The test project I posted successfully assigns Styles in any outbound format that supports them.

Yes. So is there perhaps another supported format…

  1. into which I could Compile the document
  2. from there which I could export it into LibreOffice
  3. in LibreOffice I could perform the S & R
  4. from LibreOffice I could then export it into perhaps the format which worked in 1 and 2
  5. and from there Import and Split it back into Scrivener

I ask because earlier today I set out to manually perform all the S & Rs throughout the document. I had significantly underestimated just how many there are. Not surprising for a project dedicated to musical notation!

If there is a way to do this, I’d love to think I could achieve it more easily :slight_smile:

As I said, the export from Scrivener is not the problem. DOCX and ODT both work, and in my tests LibreOffice can successfully “see” the styles in either. So you can use any format you want for steps 1, 2, and 3.

The problem is the Import and Split back into Scrivener.
Importing DOCX back into Scrivener preserves the Styles, but doesn’t successfully re-split the document. In our tests, ODT successfully splits, but only with the Java-based format converter.

So, to be more precise, the problem is the “Split,” not the “Import.” That is, you can Import whatever format you used for steps 1, 2, and 3, no problem, but only ODT (+Java) will successfully recover the hierarchy.

2 Likes

Understood. Thanks.

The project in which I actually need to make these replacements has 75 Notes in a total of 29 Folders; the latter are carefully organized to a maximum of four deep.

If the round trip is - for the moment - too problematical to pursue, I’d be happy to record (screengrab, home made XML file, export into Numbers in some way etc) the hierarchical structure of the Project in terms of that outline. In other words, list which Scrivener Notes are in which Folders; and which Folders have (which) children (in which are which grandchildren and Notes etc).

Working with the structure noted/recorded in such a way that I could rebuild it, couldn’t I:

  1. either:
  • export one Scrivener Note into LibreOffice at a time
  • make the font S & R changes there
  • import each Note back into its proper place in the Binder manually according to the ‘recording’ I describe above - without relying on the hierarchical structure which is causing the ‘trouble’?
  1. or:
  • follow the round trip into and out of LibreOffice procedure with which you’ve been kind and patient enough to help me with
  • but not reply on the Structure as the Split, but some sort of (‘artificial’) divider string like ‘999!!!999’
  • and then delete it in each ‘perfected’ (font replaced) Note?

Assuming that not all 75 Notes will need the substitution of MusGlyphs fonts, it might be tedious. But if LibreOffice has some sort of macro to make the half dozen or so substitutions across each document one at a time, surely it’s worth a shot?

Yes, a more automated (because global) round trip is preferable. But it seems somewhat fraught after all this time :slight_smile:

Remember that you’ll still have the original project, with its hierarchy.

You could do that, or you could split manually after import. If you use an artificial divider string, then you can add it to the Section Title on export as a Title Prefix. And you can use a Project-wide Replace to get rid of it when you’re done.

Yes, I would and that would come into play if I did it one Note at a time: simply delete each existing (‘former’) Note and drop each export from LibreOffice in each one’s place, you mean?

Have I concatenated two non-Split-on-Structure routines into one, then here?

Does File > Import > Import and Split > The document will be split by finding separators in the text. not simply look for the divider string (‘9999’ in the default example) and need no further action from me?

So would the workflow be File > Compile . Format Default (?) with Compile for .rtfd (?)

Assign Section Layouts, which gets me here:

Then what, please?

It that divider string were indeed something like !!!9999!!!, would Edit > Find > Project Replace work on a string placed in the Section Title - remembering that I have yet to get to grips with… Sections :slight_smile:

You could do that, but I wouldn’t bother. If it were me, I would simply use the existing original as a reference while I tweaked the outline of the imported (and split) document. Splitting the Editor pane is perfect for this.

Correct.

You want to use a Section Layout that includes the body text of the item, since the whole point is that you need the body text in the exported document. So probably “Text Section with Heading” in your screenshot. Adding a Title Prefix is covered in Section 24.2.4 in the manual.

Yes. Project Replace works everywhere. Make a backup first.

By ‘outline’ here you mean:

  1. that I can (I shall by splitting the Editor) have the entire (Compiled/Exported/font-changed/re-imported) document - as a Scrivening in one pane? And that I shall use its ‘outline’ to move individual Notes and Folders into their correct hierarchy in the Binder; and not
  2. that I shall be making any layout changes necessary to the appearance (outline, hierarchical arrangement) of an individual Scrivener Note

don’t you, Katherine?

I tried this (I also read this thread, which seemed to be relevant in helping me understand Sections etc) without any success:

  1. loaded a (backup) of my test file because it so closely resembles practically the main thing I want to do eventually with my music theory one… retain the outline structures of Folders and Notes section types.zip (82.9 KB)
  2. File > Compile: Format is Default; Compile for .rtfd
  3. Assign Section Layouts
  4. Do I have to make the necessary settings for each of my Levels in the Binder?
  5. tried double-clicking on various of the items in the right hand side pane
  6. didn’t get very far… re-importing by splitting on that string gave me nothing like the structure I thought I had compiled.

Surely there’s some way to tell Scrivener that I just want each entity (all five Folder levels any and all Notes anywhere in the hierarchy) separate so that I can import by splitting on, say, ‘!!!9999!!!’?

Correct.

Since you aren’t going to use Styles to re-split the document, you don’t need to use different formatting for each outline level.

  • Use the Default Compile Format, compiling to RTF.

  • Right-click on it in the main Compile screen, and choose the option to Duplicate and Edit.

  • In the Format Editor, choose the Section Layout tab, then the Text Section with Heading Layout.

  • Click the Title Options tab down below the list of layouts. Put whatever you want in the Title Prefix box. (Again, see Section 24.2.4 in the manual.)

  • Save that.

  • Then, in the center pane of the main Compile screen, assign the “Text Section with Heading” layout to everything.

1 Like

At last, I think I’m very nearly there. I got a good round trip with contents edited as I expect to be able to do but with S&R in LibreOffice.

The only thing I have obviously not got set up correctly is the distinction between Folders and Notes; because everything got imported as a Note… no Folders.

So can I simply have two types - named regardless of their position in the Binder hierarchy:

  1. Folders - all folders, at any/all level(s)
  2. Notes - all notes, at any/all level(s)

We have been referring to ‘Headings’ and ‘Sections’, which I have consistently failed to appreciate as a relatively arbitrary way to describe Sections - as they are handled in terms of Section Types. But now that I think I understand this, the name - and its incidental use as part of a document is irrelevant. I could even call them ‘Topic title’ and ‘Substance’ if I wanted to, couldn’t I?

Why not ODT?

This also comes up from Double-left-click, doesn’t it?

I missed this the first time I ran through this. It has to be both because I’m inserting the divider string into both types of Section, doesn’t it?
… … …

So that - again - it is applied to both types/levels of Scrivener entity, Folder as well as file, Yes?

I expect you’ll be as relieved to know as I am that I really do think that - at last - I’m very close to being able to do this all now.

Nothing imported as Notes. The resulting documents are folders and files in the parlance (in English at least). Every document has an attached Note, empty until you fill it with text. Look for that in the Inspector.

You can have any number of section types. Levels are not a factor unless you use the compile by structure feature, which I personally do not recommend. Choose section types based on the semantic meaning of documents and/or the range of formats you want to give them. Name them accordingly. Mine are named Chapter, Epilogue, Front Matter, Image, Scene with Separator, and such.

1 Like

Thanks, Bobby!

I’m really grateful for everyone’s help here :slight_smile:

That’s the expected behavior. The Folder/document distinction barely exists within Scrivener, and doesn’t exist at all in Scrivener’s output document. You can use the Documents → Convert → To Folder command as needed once you’ve got everything else squared away.

Yes.

Yes, although you should remember that an item in the Binder does (usually) have a title, and you can tell the Section Layout to include (or not) that title in the output document.

Yes, ODT is fine, too.
Yes, double (left) click will edit Compile Formats as well.

Yes, you need the divider string in every (exported) Binder item that you’ll want to re-split when you re-import. You need a Section Layout that includes the item title because you want to recover the item title when you re-import.

Mark is using “Notes” to refer to the sub-topical sections of his project. We are not talking about Scrivener’s Document Notes. Apologies for the confusion.

You are coming in to the middle of the conversation. For the purposes of Mark’s project (and therefore this thread), the other potential section types are not relevant.

But the process is, and it doesn’t seem that is understood. I was answering a specific question. You answered the same question with “Yes.”