Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tldrpoints

tldrpoints is a small LaTeX package for writing section-level and paragraph-level takeaways beside the prose they summarize. It gathers those annotations into a compact hierarchy with two-way PDF links.

\usepackage{tldrpoints}

\section{A result}
\sectiontldr{The high-level result in one sentence.}

The full explanation remains ordinary LaTeX prose.
\tldr{The paragraph's essential claim.}

\printtldr[Paper at a glance]

No paragraph environment or wrapper is required. Point text appears only in the generated summary. Each source location receives a numbered marker in the left margin and a linked TL;DR marker in the right margin; the matching number on the summary's return button makes the destination easy to recognize.

Install

In one document

Download tldrpoints.sty next to the document's main .tex file:

curl -fsSLO https://raw.githubusercontent.com/EvoEvolver/tldrpoints/main/tldrpoints.sty

Then add \usepackage{tldrpoints} to the preamble.

In your personal TeX tree

git clone https://github.com/EvoEvolver/tldrpoints.git
cd tldrpoints
make install

make install uses the TEXMFHOME reported by kpsewhich. Override it when needed with make install TEXMFHOME=/path/to/texmf.

The package requires LaTeX 2021-06-01 or newer plus xcolor, hyperref, l3keys2e, and etoolbox, all included in normal TeX Live and MiKTeX installations.

Commands

Command Effect
\tldr{text} Adds a point for the current prose paragraph
\sectiontldr{text} Adds a point for the current section heading
\printtldr[title] Prints the collected hierarchy
\tldrdisable Stops collecting and rendering annotations
\tldrenable Re-enables the package

Place \tldr after some paragraph text and before the terminating blank line or explicit \par. Multiple points may describe the same paragraph and share one source number. Place \sectiontldr immediately after a supported heading.

The standard tracked heading hierarchy is \part, \chapter, \section, \subsection, \subsubsection, \paragraph, and \subparagraph. Custom sectioning commands implemented with LaTeX's \@startsection are tracked at any non-negative level as well, so the hierarchy can be extended beyond \subparagraph. Commands that do not exist in the active document class are ignored.

Compilation

Compile twice when \printtldr appears before the annotated body. The first run writes a jobname.tldrpoints event log; the second run uses it to render the summary before the source points have been encountered.

pdflatex example.tex
pdflatex example.tex

When the summary comes after all annotations, it can render current-run data, although a second compilation is still recommended for stable PDF links.

Agent skill

The repository includes skills/tldrpoints-paper/SKILL.md, which teaches an AI agent how to identify grounded takeaways, introduce the style file, annotate section and paragraph sources, place the overview, and validate the resulting PDF navigation. Install that skill from this repository or provide it directly to an agent working on a LaTeX paper.

Disable annotations

Build the same source without markers or a summary:

\usepackage[disabled]{tldrpoints}

The alias disable is also accepted as a package option. \tldrdisable and \tldrenable are useful for preamble-level conditional builds.

Customize markers

The colors and three button labels are public customization points:

\colorlet{tldrAccent}{violet!70!black}
\colorlet{tldrMarkerBackground}{violet!5}
\renewcommand\tldrmarkertext{Summary}
\renewcommand\tldrsectionmarkertext{Section summary}
\renewcommand\tldrbacktext{$\leftarrow$}

Limitations

  • One \printtldr call is supported per document.
  • \tldr must be used in horizontal mode inside its source paragraph.
  • Margin markers follow the normal \marginpar restrictions and should not be placed in environments such as minipage that prohibit margin notes.
  • Classes with nonstandard sectioning internals may require an adapter.
  • Extremely deep hierarchies may become visually wide because indentation is proportional to the heading level.

Development

make check

The optional regression suite compiles article, book, disabled, and summary-first documents using your local TeX installation.

About

Navigable hierarchical TL;DR annotations for LaTeX documents

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages