google-code-export / wiki2latex

Automatically exported from code.google.com/p/wiki2latex
0 stars 1 forks source link

Image Processing: latex width not like the width defined in wiki tag #59

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a wiki page with an image tag, like [[Datei:file.jpg | 2cm ]]
2. Run LateX export.

What is the expected output? What do you see instead?
Expected LaTeX:
\begin{center} 
\resizebox{2cm}{!}{\includegraphics{/var/www/mediawiki/images/2/2e/Userstories_s
print2.jpg}}\\ \textit{}\end{center}

Instead LaTeX:
\begin{center} \resizebox{10cm}{!}{\includegraphics{file.jpg}}\\ 
\textit{}\end{center}

What version of Wiki2LaTeX are you using? On which Mediawiki version?
w2l 0.11
mediawiki 1.16.0

Please provide any additional information below.

As you can see the width in LaTeX code is not like the width defined in the 
wiki tag.
I analyzed the w2l code (w2lParser.php) and the position of the issue is 
located inside the case "case NS_IMAGE:" of the function "internalLinkHelper".

I fixed the issue by changing the line
$parts = explode("|", $link_int);
to
$parts = explode("|", $matches[1]);

Original issue reported on code.google.com by Manuel.P...@googlemail.com on 18 Nov 2010 at 8:09

GoogleCodeExporter commented 9 years ago
Thanks for your report. It is fixed now.

Original comment by hansgeorg.kluge@gmail.com on 15 Feb 2011 at 8:22