-
-
Notifications
You must be signed in to change notification settings - Fork 398
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
Fix printing in IJuliaMode #2447
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2447 +/- ##
==========================================
+ Coverage 92.25% 92.26% +0.01%
==========================================
Files 43 43
Lines 4634 4642 +8
==========================================
+ Hits 4275 4283 +8
Misses 359 359
Continue to review full report at Codecov.
|
@@ -201,7 +201,7 @@ end | |||
function model_string(print_mode, model::AbstractModel) | |||
ijl = print_mode == IJuliaMode | |||
sep = ijl ? " & " : " " | |||
eol = ijl ? "\\\\\n" : "\n" | |||
eol = ijl ? "\\\\" : "\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this due to a bug in Documenter that is reported somewhere or a known limitation ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was the same error as this: JuliaDocs/Documenter.jl#1387.
Looking through your PR, I guess the regex needs a suffix "s
so it can match multiline strings:
https://github.com/JuliaDocs/Documenter.jl/pull/1426/files#diff-c34d581afcb6837fd39a6b0b0428090c049d7dad13de417d96dc08a0ed01cf70R1751-R1752
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the newline issue can be fixed upstream, but there is still the issue that we are using alignat
instead of aligned
. With this PR, the tutorials print nicely.
A few printing changes that were needed to fix the printing issues in the tutorials: #2444 (comment)
Fixes some of the points in #2446
\n
. Makes no difference to latex, but Documenter struggled to print these.\\begin{alignat*}{1}
becomes\\begin{aligned}
x binary
becomesx ∈ {0, 1}
x integer
becomesx ∈ Z
\text{}
instead of math.I'll post before/after screenshots from IJulia in a bit.
Before
After