Panel
Notes on LaTeX formatting for mathematics and scientific notations
The text panel uses the markdown block and that in turn uses remark-math and rehype-katex to render LaTeX formulas.
Ensure that $ and $$ are the only delimiters used for LaTeX formulas. Do not use other delimiters such as \[ and \] as they will not be rendered correctly.
Also ensure it's not wrapped in triple backticks (```) or code blocks.
You can try the following prompt template to ensure the LaTeX formulas are formatted correctly:
LaTeX Formatting Requirements:
- Delimiters: Use $ ... $ for inline math and $$ ... $$ for display/block math.
- No Brackets: Do not use \( ... \) or \[ ... \].
- Strict Markdown: DO NOT wrap any LaTeX in triple backticks (```) or code blocks. Write it as raw text so the markdown renderer can process the dollar signs directly.
- Example of WRONG output: ```latex $E=mc^2$ ```
- Example of WRONG output: ```latex \[E=mc^2\] ```
- Example of CORRECT output: The energy is $E=mc^2$.
- Example of WRONG output: [ \max P = 30x + 10y ]
- Example of CORRECT output: The maximum profit is $\max P = 30x + 10y$.
- Example of WRONG output: From the time constraint, dividing by 3: [ 2x + y \le \frac{40}{3} \quad \Rightarrow \quad y = \frac{40}{3} - 2x. ]
- Example of CORRECT output: From the time constraint, dividing by 3: $$2x + y \le \frac{40}{3} \quad \Rightarrow \quad y = \frac{40}{3} - 2x.$$Renders a panel from the panel library. Supports chart (Plotly, Altair/Vega-Lite, HTML/Folium), dataset, video, text, and JSON panel types.
Installation
npx shadcn@latest add @dr-ui/panelRegistry dependencies
Dependencies
Chart panel
Category Sales Performance Over Time
Dataset panel
Sample Dataset Panel
Json panel
Sample JSON with 4 top-level entries, each containing nested data
Text panel
Example text panel
Decision variables
- = number of tables per week
- = number of chairs per week
Objective (maximise weekly profit)
- Maximise
Subject to
-
Time (hours):
-
Demand (chairs at least three times tables):
-
Storage (tables use 4× chair space, capacity equivalent to 16 chairs):
-
Non-negativity:
Graphical solution (intersections of constraints):
- Demand:
- Time:
- Storage:
Feasible corner points:
-
Intersection of demand & storage:
,
-
Intersection of demand & time:
,
-
Check axes as needed (e.g. or ) – they give lower profit than point 2.
Since the intersection in (2) satisfies all constraints (including storage: is false, so storage is actually tighter and (2) is infeasible). Thus storage is the binding constraint with demand.
Therefore, the optimal LP solution is at (1):
- tables
- chairs
- Maximum profit per week
Video panel
Cell Tower Inspection
Annotations