Compile: Use synopsis if there is no text?

Hi.

I have compiled my manuscript (in progress) to do some reading. Every Level 1 (text) is a chapter. Some chapters have a lot of text and some has only title and synopsis.

When I compile I include text but then I get a lot of empty chapters because there are no text. This is natural of course.

What I want is to include synopsis but only when there is no text available. I cannot find this as a feature so when I include synopsis it gets compiled into every chapter even when I have text there.

Is there a way to include synopsis only when there are no text?
Or an option to copy synopsis as text if there are no text?

I can almost see the solution :smiley:

if(text.length == 0 and checkbox.useSynopsisWhenTextIsEmpty == true) {
  compiler.add(synopsis.getText());
} else {
  compiler.add(text.getText());
}

I have posted this topic elsewhere but was recommended to do it here.

-Avec

This isn’t fully automatic, but what I would do is type in “<$synopsis>” into the empty documents (so they are no longer empty).