Scriv placehodlers in LaTeX commands don't work ?

Ar
Arkhaiel
Posts: 37
Joined: Mon Sep 04, 2017 4:36 pm
Platform: Mac + iOS

Tue Dec 04, 2018 1:40 am Post

Hi there,

Just tryin' to display the value of a placeholder in the header of a page, but I don't understand why I doesn't work. =(

In the compile format (MMD>PDF), I have written this in the Document Prefix : (same problem if I write the command in the LaTeX Header)

Code: Select all

```{=latex}
\rhead{<\$label>}
```


And in the PDF :
Screenshot 2018-12-04 at 02.50.03.png
Screenshot 2018-12-04 at 02.50.03.png (11.2 KiB) Viewed 1551 times


In my mind, Scrivener replaces the placeholder with its value before sending everything to mmd then LateX, so ...?

Thanks for the help !
Image

Ar
Arkhaiel
Posts: 37
Joined: Mon Sep 04, 2017 4:36 pm
Platform: Mac + iOS

Tue Dec 04, 2018 11:40 am Post

This morning I tried to write only <$label> in the document prefix, and it appears it doesn't expand at all. Did I miss something about placeholders ?!
Image

Ar
Arkhaiel
Posts: 37
Joined: Mon Sep 04, 2017 4:36 pm
Platform: Mac + iOS

Tue Dec 04, 2018 11:56 am Post

Damn, I solved it.
I just wrote my stuff in the Section prefix (Section Layouts), and not in the Compile Format "Text Layout" pane, and it works like magic !
Image

User avatar
AmberV
Posts: 22425
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Fri Dec 07, 2018 1:46 pm Post

Yes, the overall Text Layout pane is inserted before and after the entire document, it does not relate to any individual items in the binder that are used to create that document. So in that context there isn’t a universal <$label> for the whole project. But it works in Section Layouts because those are applied to individual binder items, which can of course have labels assigned to them.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles