Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion Mathlib/Geometry/Manifold/MFDeriv/NormedSpace.lean
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,23 @@ open scoped Bundle Manifold ContDiff

open Lean Meta Elab Tactic

open Doc
@[doc_command] def foobar (n : Ident) : DocM <| Block ElabInline ElabBlock := do
let doc ← realizeGlobalConstNoOverloadWithInfo n
let some docStr ← findDocString? (← getEnv) doc
| throwError "No doc-string for `{.ofConstName doc}`"
-- Future: once there is a better auto-converter between markdown and verso doc-strings,
-- rewrite this code accordingly!
-- Perhaps, it could be nice to write .verso here.
return .para #[.text docStr]

set_option doc.verso true in
set_option doc.verso.suggestions false in
/-- `d% f x` (scoped to the `Manifold` namespace) elaborates to `mvfderiv I J f x`,
trying to determine `I` and `J` from the local context. -/
trying to determine `I` and `J` from the local context.

{foobar} -/
-- goal: now insert the doc-string of mvfderiv
scoped elab:max "d%" ppSpace t:term:arg : term => do
let e ← ensureIsFunction <| ← Term.elabTerm t none
let (srcI, _tgtI) ← findModels e none
Expand Down
Loading
Loading