CTAN Comprehensive TeX Archive Network

Verzeichnis macros/latex/contrib/sharedline

README.md

The sharedline Package

A package for typesetting shared lines in dramatic verse.

The Problem

Typesetting dramatic verse, such as in the plays of Shakespeare, presents a unique challenge: a single metrical line is often shared between two or more characters, and hence is spread over multiple lines, with subsequent lines indented to create visual continuity, but (potentially) with character prompts at the beginning of the subsequent lines.

This package provides two simple commands, \shareline and \linefeed, that work together to solve this problem.

Requirements

  • A modern distribution (like Live, MiK, or Mac).
  • The xparse package (this is part of the standard kernel and should require no extra installation).

Usage

The package provides two commands, \shareline and \linefeed.

Core Concept

  1. sharedline works in, but does not depend on, the verse environment.
  2. You start a shared line with \shareline{...}.
  3. You use \linefeed[...]{...} for all subsequent parts of that same shared line.
  4. You are responsible for manually adding line breaks (\\) after each segment to move to the next physical line.

Command Reference

\shareline{full text}

This command starts a shared line.

  • Syntax: It takes a single mandatory argument containing the entire first segment of the line, including any speaker prompt.
  • Action: It typesets the <full text> and saves its horizontal width as the baseline for the following segment.

\linefeed[intro]{verse}

This command continues a shared line.

  • Syntax: It takes an optional argument for introductory text (like a speaker prompt) and a mandatory argument for the verse text.
  • Action: It calculates the correct indentation based on the total width of all previous parts, typesets its own text, and then updates the total width for the next \linefeed command.

Examples

Two-Way Split

\begin{verse}
  \shareline{ANNE: I would I knew thy heart.}\\
  \linefeed[GLOUCESTER: ]{'Tis figured in my tongue.}\\
\end{verse}

Three-Way Split

Note that \linefeed is used for both the second and third parts. A manual line break is required after each segment.

\begin{verse}
  \shareline{GUARD 1: Who goes there?}\\
  \linefeed[GUARD 2: ]{Speak now, or I swear}\\
  \linefeed[GUARD 1: ]{I'll shoot!}\\
\end{verse}

Without Speaker Prompts

The syntax remains clean when no prompts are needed. Simply omit the optional argument for \linefeed.

\begin{verse}
  \shareline{A path of dust and dreams beneath the sun,}\\
  \linefeed{a journey to a star.}\\
\end{verse}

Speaker Prompts on a Separate Line

Regular lines can come between a \shareline and its continuing \linefeeds. Therefore one can do:

\begin{verse}
HORATIO:
  
\shareline{Tush, tush, 'twill not appear.}
  
BARNARDO:
  
\linefeed{Sit down awhile,}\\
And let us once again assail your ears,\\
That are so fortified against our story,\\
What we have two nights seen.
\end{verse}

License

This work is distributed under the Project Public License (LPPL), version 1.3c or later.

Contributing & Issues

Found a bug or have a suggestion for improvement? Please open an issue on the GitHub repository.

Herunterladen des vollständigen Inhalts dieses Pakets in einem Zip-Archiv (329.3k).

sharedline – Typeset shared lines in dramatic verse

This package provides a robust and flexible solution for typesetting shared lines in dramatic verse, such as in the plays of Shakespeare. It allows a single line of verse to be split across multiple speakers while maintaining perfect horizontal alignment, creating the visual effect of a single, continuous line of iambic pentameter.

Paketsharedline
Repositoryhttps://github.com/saggingmeniscus/sharedline
Version1.0 2025-06-26
LizenzenThe Project Public License 1.3c
Copyright2025 Jacob Smullyan
BetreuerJacob Smullyan
ThemenGedichte
...
Gästebuch Seiten-Struktur Impressum Autor kontaktieren