Physikerwelt has uploaded a new change for review.
https://gerrit.wikimedia.org/r/134088
Change subject: Fix: Use LaTeX comments in relevance section
......................................................................
Fix: Use LaTeX comments in relevance section
Not all macros work well in the relevance section.
Therefore, we use comments in that section for now.
Change-Id: I0126e51cf1186e0b404399cf54a3fc8e25c6d856
---
M MathQueryObject.php
1 file changed, 10 insertions(+), 10 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MathSearch
refs/changes/88/134088/1
diff --git a/MathQueryObject.php b/MathQueryObject.php
index 79938e3..d05b2bc 100644
--- a/MathQueryObject.php
+++ b/MathQueryObject.php
@@ -60,22 +60,22 @@
public function exportTexDocument(){
$texInput = htmlspecialchars( $this->getUserInputTex());
+ $texInputComment = preg_replace("/[\n\r]/","\n%",$texInput);
$title = Title::newFromId( $this->getPageID() );
$absUrl =
$title->getFullURL(array("oldid"=>$title->getLatestRevID()))."#math{$this->getAnchorID()}";
return <<<TeX
\begin{topic}{{$this->getPageTitle()}-{$this->getAnchorID()}}
\begin{fquery}\${$this->getTeXQuery()}\$\end{fquery}
-\begin{private}
- \begin{relevance}
- find result similar to
- <a href="$absUrl">
- $texInput
- </a>
- \end{relevance}
- \examplehit{{$absUrl}}
- \contributor{Moritz Schubotz}
-\end{private}
+ \begin{private}
+ \begin{relevance}
+ find result similar to Formula {$this->getAnchorID()}
on page {$this->getPageTitle()}:
+ %\href{{$absUrl}}{\${$texInputComment}\$}
+ \end{relevance}
+ \examplehit{{$absUrl}}
+ \contributor{Moritz Schubotz}
+ \end{private}
\end{topic}
+
TeX;
}
--
To view, visit https://gerrit.wikimedia.org/r/134088
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0126e51cf1186e0b404399cf54a3fc8e25c6d856
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits