From f5d86ff086f23a08d909307250981cefdb90be56 Mon Sep 17 00:00:00 2001 From: franckgaga Date: Thu, 20 Aug 2026 14:59:24 -0400 Subject: [PATCH 1/2] doc: continue line numbers in "Manual" section --- docs/src/manual/installation.md | 4 ++++ docs/src/manual/linmpc.md | 4 ++++ docs/src/manual/mtk.md | 4 ++++ docs/src/manual/nonlinmpc.md | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/docs/src/manual/installation.md b/docs/src/manual/installation.md index 90dc0d819..ac0d5f5b8 100644 --- a/docs/src/manual/installation.md +++ b/docs/src/manual/installation.md @@ -1,5 +1,9 @@ # Manual: Installation +```@codeblocks +line_counter = :continue +``` + To install the `ModelPredictiveControl` package, run this command in the Julia REPL: ```julia diff --git a/docs/src/manual/linmpc.md b/docs/src/manual/linmpc.md index 9a1a1c109..b92eb8b12 100644 --- a/docs/src/manual/linmpc.md +++ b/docs/src/manual/linmpc.md @@ -4,6 +4,10 @@ Pages = ["linmpc.md"] ``` +```@codeblocks +line_counter = :continue +``` + ## Linear Model The example considers a continuously stirred-tank reactor (CSTR) with a cold and hot water diff --git a/docs/src/manual/mtk.md b/docs/src/manual/mtk.md index 90181d439..8cb11ca76 100644 --- a/docs/src/manual/mtk.md +++ b/docs/src/manual/mtk.md @@ -4,6 +4,10 @@ Pages = ["mtk.md"] ``` +```@codeblocks +line_counter = :continue +``` + ```@setup 1 using Logging; errlogger = ConsoleLogger(stderr, Error); old_logger = global_logger(); global_logger(errlogger); diff --git a/docs/src/manual/nonlinmpc.md b/docs/src/manual/nonlinmpc.md index dd6802edc..709ee9a38 100644 --- a/docs/src/manual/nonlinmpc.md +++ b/docs/src/manual/nonlinmpc.md @@ -4,6 +4,10 @@ Pages = ["nonlinmpc.md"] ``` +```@codeblocks +line_counter = :continue +``` + ## Nonlinear Model In this example, the goal is to control the angular position ``θ`` of a pendulum From c9fe1a9afd30d28317d79101b677ae8c36def6d3 Mon Sep 17 00:00:00 2001 From: franckgaga Date: Thu, 20 Aug 2026 15:47:37 -0400 Subject: [PATCH 2/2] change: trying placing `:continue` a bit latter It does not seems to work locally --- docs/make.jl | 2 +- docs/src/manual/installation.md | 4 ++-- docs/src/manual/linmpc.md | 8 ++++---- docs/src/manual/mtk.md | 8 ++++---- docs/src/manual/nonlinmpc.md | 8 ++++---- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index d0c6161e8..e1f715550 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -28,7 +28,7 @@ makedocs( sitename = "ModelPredictiveControl.jl", #format = Documenter.LaTeX(platform = "none"), doctest = true, - plugins = [links,CodeBlocks()], + plugins = [links, CodeBlocks()], format = Documenter.HTML( prettyurls = get(ENV, "CI", nothing) == "true", edit_link = "main" diff --git a/docs/src/manual/installation.md b/docs/src/manual/installation.md index ac0d5f5b8..4b2c57b07 100644 --- a/docs/src/manual/installation.md +++ b/docs/src/manual/installation.md @@ -1,11 +1,11 @@ # Manual: Installation +To install the `ModelPredictiveControl` package, run this command in the Julia REPL: + ```@codeblocks line_counter = :continue ``` -To install the `ModelPredictiveControl` package, run this command in the Julia REPL: - ```julia using Pkg; Pkg.activate(); Pkg.add("ModelPredictiveControl") ``` diff --git a/docs/src/manual/linmpc.md b/docs/src/manual/linmpc.md index b92eb8b12..df2fe2a9b 100644 --- a/docs/src/manual/linmpc.md +++ b/docs/src/manual/linmpc.md @@ -4,10 +4,6 @@ Pages = ["linmpc.md"] ``` -```@codeblocks -line_counter = :continue -``` - ## Linear Model The example considers a continuously stirred-tank reactor (CSTR) with a cold and hot water @@ -51,6 +47,10 @@ the following linear model accurately describes the plant dynamics: We first need to construct a [`LinModel`](@ref) objet with [`setop!`](@ref) to handle the operating points: +```@codeblocks +line_counter = :continue +``` + ```@example 1 using ModelPredictiveControl, ControlSystemsBase G = [ tf(1.90, [18, 1]) tf(1.90, [18, 1]); diff --git a/docs/src/manual/mtk.md b/docs/src/manual/mtk.md index 8cb11ca76..5c3c43897 100644 --- a/docs/src/manual/mtk.md +++ b/docs/src/manual/mtk.md @@ -4,10 +4,6 @@ Pages = ["mtk.md"] ``` -```@codeblocks -line_counter = :continue -``` - ```@setup 1 using Logging; errlogger = ConsoleLogger(stderr, Error); old_logger = global_logger(); global_logger(errlogger); @@ -28,6 +24,10 @@ the last section. We first construct and instantiate the pendulum model: +```@codeblocks +line_counter = :continue +``` + ```@example 1 using ModelPredictiveControl, ModelingToolkit using ModelingToolkit: D_nounits as D, t_nounits as t diff --git a/docs/src/manual/nonlinmpc.md b/docs/src/manual/nonlinmpc.md index 709ee9a38..671f0d25a 100644 --- a/docs/src/manual/nonlinmpc.md +++ b/docs/src/manual/nonlinmpc.md @@ -4,10 +4,6 @@ Pages = ["nonlinmpc.md"] ``` -```@codeblocks -line_counter = :continue -``` - ## Nonlinear Model In this example, the goal is to control the angular position ``θ`` of a pendulum @@ -44,6 +40,10 @@ the end of the pendulum in kg, all bundled in the parameter vector ``\mathbf{p} constructor assumes by default that the state function `f` is continuous in time, that is, an ordinary differential equation system (like here): +```@codeblocks +line_counter = :continue +``` + ```@example man_nonlin using ModelPredictiveControl function f(x, u, _ , p)