Search arXivSearch

arXiv · 2507.06460

Ragged Blocks: Rendering Structured Text with Style

Abstract

Whether it be source code in a programming language, prose in natural language, or otherwise, text is highly structured. Currently, text visualizations are confined either to _flat, line-based_ decorations, which can convey only limited information about textual structure, or _nested boxes_, which convey structure but often destroy the typographic layout of the underlying text. We hypothesize that the lack of rich styling options limits the kinds of information that are displayed alongside text, wherever it may be displayed. In this paper, we show that it is possible to achieve arbitrarily nested decorations while minimally disturbing the underlying typographic layout. Specifically, we present a layout algorithm that generates _ragged blocks_, or _rocks_, which are rectilinear polygons that allow nested text to be compactly rendered even when styled with borders and padding. Our layout algorithm is evaluated on a benchmark suite comprising representative source code files in multiple programming languages. The (ragged block) layouts produced by our algorithm are substantially more compact than the (rectangular block) layouts produced by conventional techniques, when uniformly styling every element in the syntax tree with borders and padding.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Sam Cohen, Ravi Chugh. 2025-12-16. Ragged Blocks: Rendering Structured Text with Style. https://doi.org/10.1145/3746059.3747751

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

TrialCompass: Visual Analytics for Enhancing the Eligibility Criteria Design of Clinical Trials

Eligibility criteria play a critical role in clinical trials by determining the target patient population, which significantly influences the outcomes of medical interventions. However, current approaches for designing eligibility criteria have limitations to support interactive exploration of the large space of eligibility criteria. They also ignore incorporating detailed characteristics from the original electronic health record (EHR) data for criteria refinement. To address these limitations, we proposed TrialCompass, a visual analytics system integrating a novel workflow, which can empower clinicians to iteratively explore the vast space of eligibility criteria through knowledge-driven and outcome-driven approaches. TrialCompass supports history-tracking to help clinicians trace the evolution of their adjustments and decisions when exploring various forms of data (i.e., eligibility criteria, outcome metrics, and detailed characteristics of original EHR data) through these two approaches. This feature can help clinicians comprehend the impact of eligibility criteria on outcome metrics and patient characteristics, which facilitates systematic refinement of eligibility criteria. Using a real-world dataset, we demonstrated the effectiveness of TrialCompass in providing insights into designing eligibility criteria for septic shock and sepsis-associated acute kidney injury. We also discussed the research prospects of applying visual analytics to clinical trials.

cs.HC

PRIMMDebug: Teaching Secondary School Students a Reflective Approach to Debugging

Debugging is a challenging and infuriating experience for many secondary school students learning their first text-based programming language. One frequent problem is the lack of reflection in students' debugging strategies, which makes error resolution unlikely and teacher reliance common. Tools that encourage more reflective and teacher-independent debugging may foster more success with fixing errors, but are lacking. This paper presents PRIMMDebug, an approach for teaching the debugging process to secondary school students. PRIMMDebug consists of an online tool that takes students through the steps of a pedagogical process based on PRIMM, a framework for teaching programming. The tool encourages written articulation throughout the debugging process and limits students' ability to run and edit code at certain stages. A classroom study with PRIMMDebug found a general reluctance among students to engage with the reflection it promotes, despite teachers appreciating this emphasis on reflection. We end by suggesting three considerations for future pedagogical debugging research and tooling: balance structure and flexibility, teach shorter debugging heuristics, and use tooling early on in students' programming journey.

cs.HC

Mirror Skin: In Situ Visualization of Robot Touch Intent on Robotic Skin

Effective communication of robot touch intent is essential for safe and predictable physical human-robot interaction. While intent communication has been widely studied, existing approaches lack the spatial specificity and semantic depth necessary to efficiently convey robot touch intent. We present Mirror Skin, a cephalopod inspired concept that mirrors in-situ visual representations of a human's body parts onto the corresponding robot's touch region to communicate who shall initiate touch, where it will occur, and when it is imminent. We informed the design of Mirror Skin through a structured design exploration with experts and demonstrate the real-world feasibility of Mirror Skin with a proof-of-concept prototype. User studies in VR and with the physical prototype showed that Mirror Skin significantly improves accuracy and response times for interpreting touch intent and improves the user experience during physical human-robot interactions.

cs.HC