All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info
Discussion Forums
Login: Password:Remember me: Sign up! | Forgot password

Forums > General Discussion
This is a forum for discussing anything and everything.
Federico Kereki
2006-11-25 13:21:14
Adding diagrams to your problems

I have recently helped edit some problems like Logidoku by substituting HTML grids and tables for "ASCII art" drawn with "+" and "---" symbols, so I thought I might write how I did it, because it's no great mystery: you just need the adequate tools.

For starters, you'll have to get the OpenOffice Suite; I'm using the latest version (2.0.something) and it won't cost you anything, for it's free: go get it at the OpenOffice site for either Windows or Linux.

Now, the best way to draw a grid is by using OpenOffice Calc, the spreadsheet component of the suite, so open it, and do your best design work: you'll have to specify column widths, row heights, backgrounds, borders, fonts, and so on, until you get what you need.

Save the file (you'll need it again if something doesn't look right) and then export it as XHTML (the option is in the FILE menu, EXPORT...).

Now, you'll have to edit the file with a simple editor (like NotePad in Windows, or Kate or Kedit in Linux) to remove a few things. First, remove everything up to (but not including) the text <style type="text/css">. Go to the bottom, and find <head><body...>; delete this. And finally, go to the bottom of the file, and delete </body> and everything after it.

Now you are ready to edit your Perplexus problem. Open it, and paste the entire remainder of your XHTML file (cut and paste should work) in your problem. Save it. It should be ready!

You might be able to work with other programs (however, OpenOffice is excellent and free, so why would you?) but, as they say, "your mileage may vary". This is the way that works for me, both with Linux and Windows, so try it!

Josie Faulkner
2006-11-25 14:18:46
Re: Adding diagrams to your problems

Thank you very much, FK.

When I devise my next puzzle, I'll certainly use this information.


2006-11-25 18:26:46
Re: Adding diagrams to your problems

The logidoku formed a lovely presentation however when one views the page source of that document there are many HTML tags which the general user of Perplexus is not privileged to use.

Note: In this thread levik indicates tags which we might use, HTML codes for use on this site.

From the "View Page Source" of Logidoku I copied the source code for the problem and pasted it to the text window of "Submit a Problem". When I pressed the Preview button I saw the HTML code that I had pasted, along with a multitude of backslashes "\".

If one of us posted such a document, I wonder how much effort it would be for the scholars to give life to such code.

2006-11-25 18:55:31
Re: Adding diagrams to your problems

Note the OpenOffice site is actually not at Perplexus but

Guess Federico was in a lot of haste with that.

Federico Kereki
2006-11-26 09:13:38
How to fix a diagram

I just tried fixing a diagram by Brianjn, and all I had to do was change \" to ", <tr> to </tr>, and the final <table> to </table>; an easy task with a simple editor.

Federico Kereki
2006-11-26 09:14:41
The (missing, transparent) color white

When you want something to appear white, set its background to that color; otherwise, it will show up as transparent.

Federico Kereki
2006-11-26 09:20:00
Tables streng verboten!!

Sifting through the thread that brianjn showed about valid HTML codes, it reads right at the beginning "No images, forms or tables though."

Further down, "...I am definitely not allowing TABLE and related tags - there's too much potential for abuse".

So I guess you can post the (perplexus-changed) HTML code, and any scholar can fix it.

Federico Kereki
2006-11-26 17:02:25
Adding diagrams to your solutions

I tried adding XHTML to a solution, but no luck...

2006-11-26 18:14:38
Re: Adding diagrams to your problems

Federico, in your comment:2006-11-26 09:13:38, what was the first change, has Perplexus overridden something pertaining to the backslash?

2006-11-26 18:51:12
Re: Adding diagrams to your problems

There is something very important that one must remember with this process.

After a scholar has intervened to adjust any tags for which we are not privileged, we should not proceed to edit our own problem thereafter otherwise Perplexus will disallow the tags; refer it to a scholar.

2006-12-20 08:34:26
Re: Adding diagrams to your problems

So are you saying that the above method will only work for Scholars?

2006-12-20 11:27:00
Re: Adding diagrams to your problems

From what I understand, if a Scholar inputs Scholar-HTML (ie only they have such power to do so) and the submitter tries to edit it later, the tags will get messed up.

2006-12-20 16:51:47
Re: Adding diagrams to your problems


2006-12-20 16:55:41
Re: Adding diagrams to your problems

However others can put in the code, but a Scholar would then need to edit out the problems which Perplexus creates, like slashes.

It would probably be best to email the code as a text file. Federico Kereki might like to give this more clarification.

Federico Kereki
2006-12-21 08:59:09
Re: Adding diagrams to your problems

The optimum is mailing the OpenOffice file, so if some adjustments are needed, they can be done.

Failing that, the idea of posting the HTML code is not so bad, and editing the \" back to " and similar fixes isn't so hard after all.

2007-01-31 02:11:23
Re: Adding diagrams to your problems

The following puzzles have been put together using the extra offerings of OpenOffice, as described above. They all involve grids but whereas a standard HTML table would not work (and Levik seemes to have relaxed that structure so that Scholars may use it), XHTML takes what is effectively an MS Excel spreadsheet, formatted as in these problems, and makes it HTML readable.

These offer some possibilities:

Josie Faulkner's Logidoku was the first puzzle published here using Federico Kereki's discovery. Federico employed this to give life to other puzzles of hers here.

Gamer offered a 'maze without walls' and Federico gave that a new dimension.

In the same series, Gamer needed tiles/platelets. He applied the XHTML code I offered to give life to this part. [Note Well - Only the Director and Scholars have this amazing power].

The OpenOffice Project seeks compatability with programs similar to what it offers. As such it can call in an MS Excel spreadsheet and the operator can convert it to an XHTML format. This one, I believe Josie sent to Federico as an MS spreadsheet, it would have looked very similar to what you see on screen but without the grid lines.

I suggest that if you choose this means of having graphics posted on site,
you need to address two protocols:
1. Post your puzzle with either a note in the body of the puzzle, or preferably as commented note that you want a Scholar to accept your emailed graphic.
2. Once the graphic is posted and JMs beginning suggesting any changes DO NOT make them yourself. Suggest in the problem's discussion area what changes you would like to have made. If you attempt a change after this process has begun, the graphic will revert to a mass of code!! And a Scholar having to fix it up.

2007-09-09 17:21:19
Re: Adding diagrams to your problems

FK- or others

Looking all the way to FKs first posting. The first part "First, remove everything up to (but not including) the text <style type=\"text/css\">." that I was able to do easily.

For "Go to the bottom, and find <head><body...>; delete this." I was not able to locate that exactly.

Somewhere in the middle of the document I found <head><body...><table......>
(my body...was dir="ltr"). Do I delete the <head><body...> portion of that only. Is that what you mean?

The <head> was deleted in the beginning of the editing instructions prior to the <style type... And the

2007-09-09 17:34:17
Re: Adding diagrams to your problems

As I figured. The comments being in html caused my last posting to read incorrectly (not as I intended it). This was probably the case with FKs first posting and the apparent contradiction in the editing instructions..

So again going back to the instructions, I delete everything in the beginning including an open head the middle I delete that close head and an open body tag only (leaving the table tag alone)... and in the end I delete the close body tag and everything after it. That should leave the html tags paired up. Does that sound correct to anyone?

2007-09-09 22:18:13
Re: Adding diagrams to your problems

When the XHTML is generated the "style" is placed between the head tags of the HTML document. The table data is placed between the body tags.

We only want the "Style" and "Table" data so it is necessary to remove everything prior to the style tag and everything after the table data. In the middle of the document we need to remove the closing head tag and the opening body tag.

Cells which contain data, from code which I have generated have had a "weird" accented 'A'. These need to be edited out and can be done by "find and replace" with a null entry in the 'replace with:' section of your dialog box.

There are HTML tags on Perplexus which are administratively controlled. Different user ranks have privileges granted to use some of these. There are tags in the XHTML code which only the director and scholars have privilege to use so it is best to email any code to one of them as corrupted code will appear if you post it in your problem.

Copyright © 2002 - 2018 by Animus Pactum Consulting. All rights reserved. Privacy Information