Export formatter with leading whitespace gobbles initial reference whitespace


(Nathan) #1

When I make an export formatter that has leading whitespace (for example, I want a tab at the beginning of each entry), it correctly places the leading whitespace on every entry except the first.

It appears that the export formatter is gobbling leading whitespace after-the-fact or something.

I’m trying to make a reference list that is indented 1 level, so I can include it a separate document. Obviously, I need the first reference also indented, not just the later ones. Are there any suggestions?


(Tobias Diez) #2

With export formatter you mean a custom .layout file? I had a look at the code and it appears that all entries are treated exactly the same way (so no special handling of the very first entry). It may be worth a shot if you create a sameNameAsBefore.begin.layout file next to the original layout file which contains only whitespace /tabs (or some other text as test). The contents of this file will be inserted before the entries are written.


(Nathan) #3

Yes I mean a .layout file. I realized I made a mistake; in fact no entry has a tab.

So you’re right – they are all treated the same. So for some reason if you write a layout file like this:

    blah

It will be the same as:

blah

Is there any format code to insert whitespace that will not be gobbled up?


(Christoph) #4

You could try to use the   html whitespace character.

If you are creating html exports, then you could also wrap that thin a div container or pre tag and format it with css. For a complex example see the tablerefs.layout files