Add demo of formatted math in Roxygen header with LaTeX#17
Draft
Add demo of formatted math in Roxygen header with LaTeX#17
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. |
Member
|
@copilot try again |
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Contributor
Author
Done! I've added a comprehensive demo function showing LaTeX math formatting in Roxygen documentation. The
All tests pass, linting is clean, and R CMD check succeeds. Commits: 2d35334, 8c2172a Example output: math_demo(1, -5, 6) # Two real roots
[1] 3 2
math_demo(1, 2, 5) # Complex roots
[1] -1+2i -1-2iThe documentation shows proper LaTeX rendering in help files with equations like the quadratic formula, discriminant notation, and Greek letters. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Copilot
AI
changed the title
[WIP] Add demo of formatted math in Roxygen header with LaTeX
Add demo of formatted math in Roxygen header with LaTeX
Jan 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a comprehensive demonstration of LaTeX math formatting in roxygen2 documentation for R packages.
Changes Made
math_demo()function inR/math_demo.Rthat demonstrates various LaTeX math formatting techniques in roxygen2 documentation\deqn{}(quadratic formula)\eqn{}(Greek letters, variables, expressions)tests/testthat/test-math_demo.Rcovering all scenarios (two real roots, one repeated root, complex roots, error handling)man/math_demo.Rdwith properly formatted LaTeX math expressionsinst/WORDLISTto include "Roxygen" and "roxygen"Testing
The implementation provides a practical example for developers who want to include mathematical notation in their R package documentation using LaTeX syntax, following the tidyverse style guide and using roxygen2 with Markdown syntax.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.