I understand, probably the director's commands are indeed sufficient for what i intend to do.
Hello. This is a very valid issue. Unfortunately, I did not manage to solve this…
You are using the center
style for characters, which is defined here. The issue is that a line break is inserted at the end of the center
environment, there. I do not know how to prevent LaTeX from breaking a page there, sorry…
I leaving this issue open in case someone (maybe me in the future) might want to give it a try?
Thanks a lot for these ressources, i'll take a look to it ! And thanks also for the feature request.
As i am currently using this wonderful package that is Thalie, i came upon the fact that this is useful when you are writing a play, as an author.
However, it happens often that the author is also the director, so he has to deal with more concrete aspects when realising a play, such as creating a set, chose a cast, include cues (such as light, music, special effects), managing a list of props or costumes, etc...
So i was wondering if thalie would be suitable also for a director, by adding some features to add those different technical aspects, even maybe so it would be easy to chose the final rendering (as an author to display only lines, dramatis... or as a director, with the display of the more technical aspects)
I'm aware that some features could be typed by simply using general latex environment, but i'm convinced some others could be added because they are more specific to theatre field.
I am not sure that this feature is relevant to Thalie.
See the attached file for an implementation. Just comment/uncomment the line \directortrue
to hide/display the director's comments (command \inlinedirector
and environment director
).
Hello!
I'm back after a few moments. I would like to learn and try to contribute on this subject, but i am really a "noob" in latex package development. I should see i there is any resources on how to learn to make one, before trying to solve that particular issue. If you have any pointers about that i'll take them gladly.
To learn how to write a LaTeX package, you can see answers to this question. This could be sufficient to count characters' lines (as in répliques). To count characters' lines, words and characters (as in letters), I think one would have to use Lua. You would have to learn the https://www.lua.org/ programming language, and then to learn how to use it with LaTeX. The technical documentation is here, but I could not find a nice introduction to writing Lua packages…
One thought i'd like to add to the subject : in french dubbing (doublage), the notion of line (ligne, not réplique) as a metric is defined such as 1 line = 50 characters (character as caractère d'imprimerie, not personnage of course). Could the counting of characters (nombre de caractères) could be added in the ToDo list with lines (i've leant that you can also say prompt), lines and words ?
I have added this as a feature request: ac873012.
Louis (ac873012) at 17 Aug 20:37
[feature-request] Count characters' characters (that is, how many *...
As i am currently using this wonderful package that is Thalie, i came upon the fact that this is useful when you are writing a play, as an author.
However, it happens often that the author is also the director, so he has to deal with more concrete aspects when realising a play, such as creating a set, chose a cast, include cues (such as light, music, special effects), managing a list of props or costumes, etc...
So i was wondering if thalie would be suitable also for a director, by adding some features to add those different technical aspects, even maybe so it would be easy to chose the final rendering (as an author to display only lines, dramatis... or as a director, with the display of the more technical aspects)
I'm aware that some features could be typed by simply using general latex environment, but i'm convinced some others could be added because they are more specific to theatre field.
As i don't know if it is a more general Latex issue or something specific to thalie, i raise the issue here.
It happens when compiling that if a line (prompt, réplique) starts at the end of a page, the character name appeared at the bottom and the line itself starts on top of the next page.
Currently i have to manually add blank lines (lignes) to address this, which is not really the latex spirit in my opinion.
Of course if Latex detects there's is space for one line at the beginning then continue the prompt on the other page you can't solve this other than manually, but i often saw the issue as if space between character name and the first words of the line can be split into two pages instead of one unbreakable block.
You can see it in the example i provide at page 4, 5 ...
Thank you for reading me
Hello !
I'm back after a few moments. I would like to learn and try to contribute on this subject, but i am really a "noob" in latex package development. I should see i there is any resources on how to learn to make one, before trying to solve that particular issue. If you have any pointers about that i'll take them gladly.
One thought i'd like to add to the subject : in french dubbing (doublage), the notion of line (ligne, not réplique) as a metric is defined such as 1 line = 50 characters (character as caractère d'imprimerie, not personnage of course). Could the counting of characters (nombre de caractères) could be added in the ToDo list with lines (i've leant that you can also say prompt), lines and words ?
Thank you for your consideration, also i will add another idea and an issue i have found as i am currently typing some plays for an author friend.
Hi Louis !
Sorry to be late as i was the one who proposed the subject, thank you a lot for your try ! I didn't realised how hard it would be, and to manage to do an implementation working even approximately is already great ! Maybe someday... Thank you again and see you around !
Mixed news, everyone!
I have managed to implement word, line (ligne) and line (réplique) counters: counters.pdf.
I won't merge it because it very inaccurate and dirty.
I won't implement it myself: it is a lot of work for a not-so-important feature. Nonetheless, I will leave !6 open for discussions, in case someone wants to chime in.
Sorry…
This pull request won't be merged. It is dirty. More information in TODO.md:
Bugs
Implementation of counters (how many lines, lines, or words have every character spoken?) is not satisfactory.
- Line count is not accurate: It takes into account stage directions.
- Word counts is even less accurate: It also includes the character's name, and stage directions.
This might be fixed by included empty nodes (as described in the luatex documentation) to mark when word counting should start and stop, but this is far more work than I am willing to do.
One could implement the répliques counter alone, but I could not manage to do it without Lua (see registerthaliecounters LaTeX command and associated Lua function). One should be able to implement the
\character
command so that\character[cmd=alice]{Alice}
make\alice
call\stepcounter{alice}
, but I could not manage to do so (maybe with the right amount of\expandafter
?). And I do not want to require Lua for such a simple feature.Future implementation
Once the previous issues has been addressed, there are still more work to do:
- Fix the various TODO in thalie.lua.
- Store counters in the .aux file (or whatever external file) so that counters can be accessed before the end of the document.
- Make the previous feature work when there are several dramatis personae in the document.
- Thalie should be still usable using pdflatex (the counter features being disabled without LuaLaTeX).
- Make acts, scene, etc. as well as chapter, sections, etc. (as well as other commands) call
\resetspeaking
.- Implement a command that dumps counters for every single characters.
- Optionaly include counters in the dramatis personae?
- Document everything.
- Think about every weird corner case I have forgotten.
Louis (bbc6bef4) at 26 Apr 20:12
Comment counters
Louis (e7bc78ac) at 19 Apr 21:06
Spell check of documentation.
Louis (44a125d5) at 11 Apr 21:32
Example: Several characters speak at one
Good news, everyone! I manage to (approximatively) count lines, lines and words of characters. There is still a lot of work to do, but the complex one is (almost) done.
See !6.
See !6.