-
Notifications
You must be signed in to change notification settings - Fork 0
Add demo of formatted math in Roxygen header with LaTeX #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. |
|
@copilot try again |
Co-authored-by: d-morrison <[email protected]>
Co-authored-by: d-morrison <[email protected]>
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:
|
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.