# $levelN\_title losing underscore before processing in header & footer on compile to PDF

**URL:** <https://forum.literatureandlatte.com/t/leveln-title-losing-underscore-before-processing-in-header-footer-on-compile-to-pdf/38981>\
**Category:** Scrivener for macOS\
**Tags:** bug\
**Created:** [December 11, 2017, 4:42pm UTC](https://forum.literatureandlatte.com/t/leveln-title-losing-underscore-before-processing-in-header-footer-on-compile-to-pdf/38981 "2017-12-11T16:42:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carradee](https://forum.literatureandlatte.com/letter_avatar_proxy/v4/letter/c/a9adbd/32.png) [@Carradee](https://forum.literatureandlatte.com/u/Carradee)\
**Post date:** [December 11, 2017, 4:42pm UTC](https://forum.literatureandlatte.com/t/leveln-title-losing-underscore-before-processing-in-header-footer-on-compile-to-pdf/38981/1 "2017-12-11T16:42:27Z")

</div>

The “\<$levelN\_title\>” works fine if I put it in my main document or as a prefix on a section layout, (I’ve tested multiple numbers.)

When I put it in the header or footer, instead of processing to show that level title, I’m getting “\<$levelNtitle\>”. Ergo, my interpretation of the bug. 🙂

I’ve tried the various auto-search and replace settings (both in compile defaults and on compile), and those don’t touch it.

To replicate this error:

- Select something with multiple levels for Compile.
- Select a PDF format.
- Go into Edit Format… \> Page Settings \> Header and Footer Text.
- Use the “\<$levelN\_title\>” in the header and/or footer area.
- Compile.
- You should then see “\<$levelNtitle\>” in the header and/or footer.

---

<div class="post-metadata">

**Author:** ![Silverdragon](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/silverdragon/32/15734_2.png) [@Silverdragon](https://forum.literatureandlatte.com/u/Silverdragon)\
**Post date:** [December 11, 2017, 5:29pm UTC](https://forum.literatureandlatte.com/t/leveln-title-losing-underscore-before-processing-in-header-footer-on-compile-to-pdf/38981/2 "2017-12-11T17:29:43Z")

</div>

According to the complete placeholder list under the Help menu:

> [@](#):
>
> Headers and Footers
> 
> Not all placeholders are supported in headers and footers. In addition to the special header and footer placeholders specified below (which can only be used in headers and footers), only the placeholders listed under the sections Page Numbers, Current Date and Time, and User and Project Information are supported in headers and footers.

$levelN\_title is listed under Document Variables, and so is not available in the headers and footers. I’d like to use the Document Variables in headers myself, which is how I found out. ☹

---

<div class="post-metadata">

**Author:** ![Carradee](https://forum.literatureandlatte.com/letter_avatar_proxy/v4/letter/c/a9adbd/32.png) [@Carradee](https://forum.literatureandlatte.com/u/Carradee)\
**Post date:** [December 11, 2017, 5:51pm UTC](https://forum.literatureandlatte.com/t/leveln-title-losing-underscore-before-processing-in-header-footer-on-compile-to-pdf/38981/3 "2017-12-11T17:51:18Z")

</div>

Ah. Missed that.

Still makes me wonder why the underscore gets stripped. Hmm.

Thanks! 🙂

---

<div class="post-metadata">

**Author:** ![KB](https://forum.literatureandlatte.com/letter_avatar_proxy/v4/letter/k/e47774/32.png) [@KB](https://forum.literatureandlatte.com/u/KB)\
**Post date:** [December 11, 2017, 6:52pm UTC](https://forum.literatureandlatte.com/t/leveln-title-losing-underscore-before-processing-in-header-footer-on-compile-to-pdf/38981/4 "2017-12-11T18:52:13Z")

</div>

Because underscores and asterisks are used to create underlined, italicised and bold text in headers and footers.  
All the best,  
Keith
