Directory macros/latex/contrib/modernruler
modernruler
Advanced Ruler Commands for LaTeX / 高機能な罫線・アンダーノート作成パッケージ
Overview / 概要
modernruler provides enhanced ruler commands, including \mruleth, \mruletv, and \undernote. These commands are designed to be more flexible than standard LaTeX rules, supporting key-value options for styling and full compatibility with vertical writing modes. modernruler は、標準の罫線コマンドを拡張した \mruleth、\mruletv、および \undernote を提供します。色やスタイルの指定をキー値オプションで行える柔軟性を持ち、縦書き環境にも完全に対応しています。
- Version: 1.0.0
- Date: 2025-12-28
- Author: Kosei Kawaguchi (a.k.a. KKTeX)
- License: MIT
- Repository: https://github.com/KKTeX/modernruler
- Support: p.c.aces1056@gmail.com
Acknowledgements / Credits
This package was inspired by discussions on TeX Forum concerning undernote-like constructions using rules.
An improved approach was later presented by Mr. Yusuke Terada, which clarified several implementation details.
The present package is a complete reimplementation and extension, introducing a generalized rule-based engine, redesigned control flow, and additional features such as modern ruler integration and tcolorbox-based abstractions.
Any remaining errors or design decisions are entirely the responsibility of the author.
Key Features / 特徴
- Stylable Rules / スタイル指定可能な罫線
\mrulethand\mruletvallow you to change colors and styles easily via key-value options.\mrulethと\mruletvは、色やスタイルをオプションで簡単にカスタマイズできます。
- Annotations with undernote / 注釈機能(undernote)
- Attach short annotations beneath words or phrases, connected by a clean ruled line.
- 本文の語句の下に、罫線でつながれた短い注釈を配置することができます。
- Vertical Writing Support / 縦書き環境に対応
- Fully compatible with vertical layouts (e.g.,
\documentclass[tate]{jlreq}). jlreqパッケージなどの縦書き設定でも、崩れることなく使用可能です。
- Fully compatible with vertical layouts (e.g.,
Prerequisites / 前提条件
Dependencies / 依存パッケージ:
kvoptions,varwidth,tcolorbox
Usage / 使用方法
For detailed usage and examples, please refer to the documentation and source files. 具体的な使用方法や例については、ドキュメントやソースファイルを参照してください。
License / ライセンス
This package is licensed under the MIT License. 本パッケージは MITライセンス のもとで公開されています。
Copyright (c) 2025 Kosei Kawaguchi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Download the contents of this package in one zip archive (141.9k).
modernruler – Flexible ruler and annotation commands with key-value support and vertical writing compatibility
This package provides a versatile set of commands for drawing rules and creating annotations in LaTeX. While standard LaTeX rules can be rigid, this package introduces more flexible alternatives: \mruleth (horizontal rules), \mruletv (vertical rules), and \undernote (underlined annotations).
Key Features:
- Key-Value Interface: All commands support a consistent key-value syntax for adjust dimensions (width, height, depth), colors, and dash patterns (dash, dash-len, gap-len).
- Underline Annotations: The \undernote command allows users to attach descriptive notes to underlined text. It automatically handles positioning, spacing between multiple notes, and provides options for various border styles (solid or dashed boxes).
- Vertical Writing Compatibility: Designed with multilingual typesetting in mind, the package is compatible with vertical writing modes, ensuring that rules and notes are oriented correctly.
- Customization: Users can update package-wide dfaults at any point in the document using a dedicated set of \SetUNote… commands.
| Package | modernruler |
| Repository | https://github.com/KKTeX/modernruler |
| Version | 1.0.0 2025-12-28 |
| Licenses | MIT License |
| Copyright | 2025 Kosei Kawaguchi |
| Maintainer | KKTeX |
| Topics | Misc support Notes |