# Compile style moves question mark to beginning

**URL:** <https://forum.literatureandlatte.com/t/compile-style-moves-question-mark-to-beginning/128687>\
**Category:** Scrivener for macOS\
**Tags:** bug, compile, styles\
**Created:** [June 24, 2022, 11:19pm UTC](https://forum.literatureandlatte.com/t/compile-style-moves-question-mark-to-beginning/128687 "2022-06-24T23:19:45Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![drmajorbob](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/drmajorbob/32/15777_2.png) [@drmajorbob](https://forum.literatureandlatte.com/u/drmajorbob)\
**Post date:** [June 24, 2022, 11:19pm UTC](https://forum.literatureandlatte.com/t/compile-style-moves-question-mark-to-beginning/128687/1 "2022-06-24T23:19:45Z")

</div>

Here is a bit of text in the Editor; yellow highlighting marks the Babel character style. The first line ends with `?`:

 ![editor](https://forum.literatureandlatte.com/uploads/default/original/3X/3/4/349294c443f3deea6dcfd45c2a71fdbe3e6a5ed5.png)

This is the style pane in Compile. It adds a star (𐫰) in the Prefix and Suffix:

 ![compile](https://forum.literatureandlatte.com/uploads/default/original/3X/6/2/6217d2a64668bf6ad3377cc77d4cc2a4aeb97779.png)

And this is the result in a PDF. As you can see, the question mark moved to the beginning of the sentence:

 ![pdf](https://forum.literatureandlatte.com/uploads/default/original/3X/6/1/614e80be20dcde2da0ca87e3686bc64a5f0f5883.png)

That’s weird, right?

---

<div class="post-metadata">

**Author:** ![Vincent\_Vincent](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/vincent_vincent/32/19680_2.png) [@Vincent\_Vincent](https://forum.literatureandlatte.com/u/Vincent_Vincent)\
**Post date:** [June 24, 2022, 11:25pm UTC](https://forum.literatureandlatte.com/t/compile-style-moves-question-mark-to-beginning/128687/2 "2022-06-24T23:25:50Z")

</div>

The period also.  
. . . . . . . .

---

<div class="post-metadata">

**Author:** ![November\_Sierra](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/november_sierra/32/41086_2.png) [@November\_Sierra](https://forum.literatureandlatte.com/u/November_Sierra)\
**Post date:** [June 24, 2022, 11:25pm UTC](https://forum.literatureandlatte.com/t/compile-style-moves-question-mark-to-beginning/128687/3 "2022-06-24T23:25:57Z")

</div>

The period moved, too (second line). Does this happen with all common punctuation marks or with every last character in general?

---

<div class="post-metadata">

**Author:** ![drmajorbob](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/drmajorbob/32/15777_2.png) [@drmajorbob](https://forum.literatureandlatte.com/u/drmajorbob)\
**Post date:** [June 24, 2022, 11:38pm UTC](https://forum.literatureandlatte.com/t/compile-style-moves-question-mark-to-beginning/128687/4 "2022-06-24T23:38:17Z")

</div>

Those are my only tests so far. I’ll get to trying others when I have more time. Thanks for noticing the period. I’ll create a bare-bones example too.

---

<div class="post-metadata">

**Author:** ![drmajorbob](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/drmajorbob/32/15777_2.png) [@drmajorbob](https://forum.literatureandlatte.com/u/drmajorbob)\
**Post date:** [June 25, 2022, 12:46am UTC](https://forum.literatureandlatte.com/t/compile-style-moves-question-mark-to-beginning/128687/5 "2022-06-25T00:46:40Z")

</div>

I’ve tested a few punctuation marks, and I tested with a second manichaean symbol in the prefix/suffix, since 𐫰 is called _manichaean punctuation star_. Punctuation moves; other characters do not. Here’s a bare-bones test project and pdf output.

[manichaean.zip](https://forum.literatureandlatte.com/uploads/short-url/x3EWec95NjWvXKl0WLAZiKpNqNr.zip) (100.3 KB)

---

<div class="post-metadata">

**Author:** ![November\_Sierra](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/november_sierra/32/41086_2.png) [@November\_Sierra](https://forum.literatureandlatte.com/u/November_Sierra)\
**Post date:** [June 25, 2022, 1:42am UTC](https://forum.literatureandlatte.com/t/compile-style-moves-question-mark-to-beginning/128687/6 "2022-06-25T01:42:08Z")

</div>

Okay, some observations…

1. One of the Compiler styles was named “another emoji”, so it wouldn’t be affected by the (not) matching editor style. Fixing this results in both causing the same trouble:

 ![s1](https://forum.literatureandlatte.com/uploads/default/original/3X/3/9/391114990a9eac8b16ca39b9536bb3f1e6dde9a6.png)

2. Both symbols also cause problems in the Compiler settings when I try to edit the prefix / suffix input fields. Like placing the cursor behind the symbol and press `⌫`. Won’t work. Marking the symbol and then deleting it works. This is already odd.

3. Choosing another symbol (with no “punctuation” in the name, don’t know if that matters) works just fine:

 ![s2](https://forum.literatureandlatte.com/uploads/default/original/3X/e/6/e6d78ac06aa173b3c7fadad256331b9f96baa654.png)

So something it definetily wrong with the “manichaean punctuation” symbols which derails the Compiler. 🤔

Wait, I found something! [Manichaean script - Wikipedia](https://en.wikipedia.org/wiki/Manichaean_script#Characters)  
“Like most abjads, **Manichaean is written from right to left** ”

---

<div class="post-metadata">

**Author:** ![drmajorbob](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/drmajorbob/32/15777_2.png) [@drmajorbob](https://forum.literatureandlatte.com/u/drmajorbob)\
**Post date:** [June 25, 2022, 1:50am UTC](https://forum.literatureandlatte.com/t/compile-style-moves-question-mark-to-beginning/128687/7 "2022-06-25T01:50:06Z")

</div>

Yeah, I did the test properly and got your results here, but then I renamed the style and lost the thread.

> [@November\_Sierra](#):
>
> with no “punctuation” in the name, don’t know if that matters

I suspect all the manichaean symbols will behave this way, but I haven’t the patience to test a lot of them. If you want to find them, search for manichaean in the Mac’s emoji & symbols viewer. This must be a character set intended for a right-to-left language, but my google searches didn’t confirm anything like that so far.

 ![manichaean](https://forum.literatureandlatte.com/uploads/default/original/3X/f/2/f2ef95d7210cbae2d15a5a0a67a323e9cb8b89db.png)

Oops, I skipped over your comment about the manichaean script. I’m always in a hurry, but never getting anywhere.

---

<div class="post-metadata">

**Author:** ![November\_Sierra](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/november_sierra/32/41086_2.png) [@November\_Sierra](https://forum.literatureandlatte.com/u/November_Sierra)\
**Post date:** [June 25, 2022, 1:52am UTC](https://forum.literatureandlatte.com/t/compile-style-moves-question-mark-to-beginning/128687/8 "2022-06-25T01:52:11Z")

</div>

Yup, same conclusion. RTL characters seem to confuse the Compiler. Could be a bug (maybe even in macOS) or by design. Short solution: Don’t use those.

---

<div class="post-metadata">

**Author:** ![drmajorbob](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/drmajorbob/32/15777_2.png) [@drmajorbob](https://forum.literatureandlatte.com/u/drmajorbob)\
**Post date:** [June 25, 2022, 3:08am UTC](https://forum.literatureandlatte.com/t/compile-style-moves-question-mark-to-beginning/128687/9 "2022-06-25T03:08:45Z")

</div>

It may be markdown behavior.

---

<div class="post-metadata">

**Author:** ![November\_Sierra](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/november_sierra/32/41086_2.png) [@November\_Sierra](https://forum.literatureandlatte.com/u/November_Sierra)\
**Post date:** [June 25, 2022, 3:20am UTC](https://forum.literatureandlatte.com/t/compile-style-moves-question-mark-to-beginning/128687/10 "2022-06-25T03:20:38Z")

</div>

Hmmm. How does Scrivener create the PDF? Is there even Markdown involved (internally)? 🤔 I compiled directly to PDF.

While I can’t explain _why_ it happens in this weird way, it kind of makes sense (well…) in hindsight. If a character associated with an RTL language “triggers” a change of the writing direction, the end of the sentence would then have to be on the left side. And so its final sentence punctuation.

I’d bet even deleting the character in Compiles’s style settings works if you try it the other way around (placing the caret before it and then delete… or forward delete? 🤔). But honestly. I’m lazy and very tired now.

---

<div class="post-metadata">

**Author:** ![drmajorbob](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/drmajorbob/32/15777_2.png) [@drmajorbob](https://forum.literatureandlatte.com/u/drmajorbob)\
**Post date:** [June 25, 2022, 3:33am UTC](https://forum.literatureandlatte.com/t/compile-style-moves-question-mark-to-beginning/128687/11 "2022-06-25T03:33:00Z")

</div>

As I understand it, a basic part of the Scrivener 3 design involved converting rtf to markdown, and all other exports from the markdown.

---

<div class="post-metadata">

**Author:** ![November\_Sierra](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/november_sierra/32/41086_2.png) [@November\_Sierra](https://forum.literatureandlatte.com/u/November_Sierra)\
**Post date:** [June 25, 2022, 3:22pm UTC](https://forum.literatureandlatte.com/t/compile-style-moves-question-mark-to-beginning/128687/12 "2022-06-25T15:22:01Z")

</div>

Hmmm. Most of it could be outside of Scrivener’s control (e.g. judging from the way the input fields reacted to this character, which would be on the OS level). Not just from a conversion point of view, but also later down the road (think: display hickups in eBook readers). Maybe @AmberV has more insight. I’d say: if it hasn’t to be _exactly_ this symbol, choose a similar one that’s not RTL-related.

---

<div class="post-metadata">

**Author:** ![drmajorbob](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/drmajorbob/32/15777_2.png) [@drmajorbob](https://forum.literatureandlatte.com/u/drmajorbob)\
**Post date:** [June 25, 2022, 5:01pm UTC](https://forum.literatureandlatte.com/t/compile-style-moves-question-mark-to-beginning/128687/13 "2022-06-25T17:01:46Z")

</div>

I’ll use something else, of course. It was an experiment, with a symbol chosen at random; not a big deal if I can’t actually use it. It was a startling behavior, though!

---

<div class="post-metadata">

**Author:** ![AmberV](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/amberv/32/13021_2.png) [@AmberV](https://forum.literatureandlatte.com/u/AmberV)\
**Post date:** [June 25, 2022, 5:14pm UTC](https://forum.literatureandlatte.com/t/compile-style-moves-question-mark-to-beginning/128687/14 "2022-06-25T17:14:24Z")

</div>

I haven’t done too much looking into this, but I think the clue that November\_Sierra uncovered about this being an RTL glyph could explain oddities. Putting RTL characters around LTR text, and potentially putting the software into a position of having to decide whether a “prefix” should go on the left or right of the selection, added with potential confusion over the illogical (from an RTL standpoint) punctuation placement, is surely causing issues—but given how much of an edge-case-of-one this surely is, finding another glyph is probably the best route forward.

> As I understand it, a basic part of the Scrivener 3 design involved converting rtf to markdown, and all other exports from the markdown.

It wouldn’t have anything to do with the macOS PDF printer, if that’s what you meant—you can get much the same by copying some text into TextEdit and using `File/Print` and saving as PDF. Markdown on the other hand is used internally to produce components of the HTML for ebooks, since macOS itself has such an ancient HTML converter that the specification it produces is something people were still using Netscape to load, when the spec was still new. It has the nice side-effect of producing way cleaner HTML than the text engine’s RTF → HTML generate ever could, though, so all around it’s a good choice.

Scrivener has extensive Markdown integration, but only uses it directly in its non-MD compile formats for that one task.
