Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speaker changes in dialogues #105

Closed
Omikhleia opened this issue Jan 16, 2024 · 5 comments
Closed

Speaker changes in dialogues #105

Omikhleia opened this issue Jan 16, 2024 · 5 comments
Labels
enhancement New feature or request report to SILE Issue should be generalized and reported to SILE

Comments

@Omikhleia
Copy link
Owner

Omikhleia commented Jan 16, 2024

In French (at least), it's common do have speaker changes in dialogues introduced by an em-dash:

— Lorem ipsum dolor sit amet, consectetur adipiscing elit, dit il.
— C’est sûr !

For comparison, English does not use such dashes normally.

“Lorem ipsum dolor sit amet, consectetur adipiscing elit,” he said.
“Sure!”

(English may used em-dashes, but at the end of a quote. Anyway, that's not the point).

The tricky thing here is that the following space ought to be fixed (= not stretched or shrinked by line justification) so that subsequent dialogue lines start identically.

Of course, I need to typeset such dialogues...

I was first tempted to do it in SILE itself (as we do for other fancy Unicode character and French punctuation, etc.) but it is not completely obvious to do there (I'm pulling my hair out trying, and I don't have much hair left, lol) and it requires awaiting a release...

It would be fairly obvious to do here, intercepting —[ ]+ at the start of a paragraph (where the is native or derives from --- in Markdown or Djot, it ends up as — anyway in the SILE AST).

The workaround is to manually enforce it, working in Djot only (attributes on anything, here a nbsp):

---\ {.fixed}Lorem .... 

---\ {.fixed}Sure!

Cumbersome and annoying when copying/pasting text....

I dunno. Try harder to implement it in SILE for any input (incl. SIL), or push my already working attempt here?

@Omikhleia
Copy link
Owner Author

Expected:

image

Weird, but that is the only proper way.

@alerque
Copy link
Contributor

alerque commented Jan 16, 2024

Turkish also uses this pattern. I believe from bookstore observation that many publishers use a thin space after it in their internal style guides while others fall victim to the same stretching problem you note here to rather unsightly effect.

Do you have branch(es) with attempts to make this work on the SILE side?

@Omikhleia
Copy link
Owner Author

Turkish also uses this pattern.

Interesting!

Do you have branch(es) with attempts to make this work on the SILE side?

I don't know what I was thinking in those attempts, trying to do it in SILE.nodeMakers with an insane attempt at keeping tracks of paragraphs. A newer attempt at typesetter level seems better --> I'll report to SILE and push a PR there.

@alerque
Copy link
Contributor

alerque commented Jan 22, 2024

Interesting!

Interesting perhaps but not that surprising. Back about 100 years ago when Turkish orthography was being switched over from the (Arabic-like) RTL script to a Latin-derived script, it was a team a largely French linguists that were tasked with adapting the orthography and many (but not all) of the typography rules were invented by some folks with largely French training.

That being said, there are probably more languages out there with French influence.

@Omikhleia
Copy link
Owner Author

Hence, issue rejected here:

  • The better solution made its way to SILE 0.14.15 👍
  • I just updated silex's special typesetter in silex.sile (0.4.1) with a backport of the changes.
  • Tested successfully with a resilient document in Djot.

@Omikhleia Omikhleia closed this as not planned Won't fix, can't repro, duplicate, stale Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request report to SILE Issue should be generalized and reported to SILE
Projects
None yet
2 participants