Hi Jesse,
Here's what I did:
* Edited WEB-INF/xwiki.cfg to add xhtml/1.0 to the list of syntaxes
* Restarted my wiki
* Edited a page in wiki mode, set the page syntax to be XHTML/1.0
* Pasted your content and saved it
(See
http://platform.xwiki.org/xwiki/bin/view/Features/PageEditing#HChoosingaSyn… )
It gave me
https://skitch.com/e-vmassol/gjh3s/sandbox-sandbox.webhome-xwiki
which looks good.
Note that even though your HTML is valid, the headings should be H1 instead of H3 since
there's no H1 nor H2 in your doc. This is why they appear smaller than they should in
the rendered result.
Thanks
-Vincent
On Nov 18, 2011, at 9:02 PM, Jesse Hathaway wrote:
Thomas Mortagne <thomas.mortagne@...> writes:
1. Does
anyone have any ideas why this is failing?
What do you mean by failing and what result to you get exactly ?
These are the steps I made:
1. Paste the html into the edit window
2. Choose XWiki 2.0 from the Document Syntax Window
3. Choose OK to convert document.
4. Then I receive the following error:
Failed to convert to the selected syntax. If you want to use this syntax anyway,
you can select it again and choose not to perform the conversion.
This is the document I pasted
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<meta name="generator" content="pandoc" />
<title></title>
</head>
<body>
<h3 id="fonts-in-java">Fonts in Java</h3>
<p>Opentype fonts are not supported on Oracle JDK 1.6.0. You have to convert the
font to a truetype font using fontforge. Java appears to use fontconfig to
locate fonts. However it uses its own private copy, which often has bugs or
features missing from your distro supplied version.</p>
<p>Mac OS X and Linux process the fonts differently. Mac seems more forgiving of
bad font metadata. As an example, for one particular font I had to tweak the
meta data until the individual fonts, italic bold etc, appeared as one font in
Linux, i.e. as a single family. They need to appear as a single family for Java
to properly use differnt faces of a font, e.g. italic.</p>
<h3 id="adding-fonts">Adding fonts</h3>
<p>You can store the fonts in any of the font config search paths, including a
per user directory:</p>
<pre><code> cat > ~/.fonts.conf <<EOF
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Private font directory -->
<dir>~/fonts</dir>
</fontconfig>
EOF
</code></pre>
<p><em>NOTE:</em> For the per user directory to work the
<code>$HOME</code>
environment variable must be set.</p>
<h3 id="listing-available-fonts">Listing available fonts</h3>
<p>Use the below java code to verify that a font has been made available in
java:</p>
<pre><code> cat > ListFonts.java <<EOF
import java.awt.GraphicsEnvironment;
public class ListFonts {
public static void main(String args[]){
GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment();
for(String font:e.getAvailableFontFamilyNames()){
System.out.println(font);
}
}
}
EOF
javac ListFonts.java
java ListFonts
</code></pre>
</body>
</html>
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users