Skip to content

Commit

Permalink
HTML export: print output labels on the left side.
Browse files Browse the repository at this point in the history
Use <mtable side="left">, that seems to work.
  • Loading branch information
daute committed Jan 26, 2025
1 parent c3f17df commit c1e2db0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- CopyAsMathML: improvements (operators and identifiers)
- Fix the check for Gnuplot-Cairo on Windows.
- Fix the (Windows) crash in the suggestions menu (#1980).
- HMTL export: print the output labels on the left side.

# 24.11.0

Expand Down
10 changes: 5 additions & 5 deletions src/cells/Cell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ int Cell::GetLineWidth() const {
if (&tmp != this)
if (tmp.m_isBrokenIntoLines || tmp.m_breakLine ||
(tmp.m_type == MC_TYPE_MAIN_PROMPT))
break;
break;
width += tmp.m_width;
}
return width;
Expand Down Expand Up @@ -516,7 +516,7 @@ void Cell::BreakLines_List()
ResetSize_RecursivelyList();
}

bool Cell::BreakUpCells() {
bool Cell::BreakUpCells() {
int clientWidth =
.8 * m_configuration->GetCanvasSize().x - m_configuration->GetIndent();
if (clientWidth < Scale_Px(50))
Expand Down Expand Up @@ -544,7 +544,7 @@ bool Cell::UnBreakUpCells() {
}
if(retval)
ResetSize_RecursivelyList();

return retval;
}

Expand Down Expand Up @@ -745,14 +745,14 @@ wxString Cell::ListToMathML(bool startofline) const {
if (highlight)
retval += wxS("</mrow>");

// If we grouped multiple cells as a single object we need to cose this group
// If we grouped multiple cells as a single object we need to close this group
// now
if ((multiCell) && (!needsTable))
retval = wxS("<mrow>") + retval + wxS("</mrow>\n");

// If we put the region we exported into a table we need to end this table now
if (needsTable)
retval = wxS("<mtable>\n<mlabeledtr columnalign=\"left\"><mtd>") + retval +
retval = wxS("<mtable side=\"left\">\n<mlabeledtr><mtd>") + retval +
wxS("</mtd></mlabeledtr>\n</mtable>");
return retval;
}
Expand Down

0 comments on commit c1e2db0

Please sign in to comment.