Problem with templates and Chinese Text

In short, and not unkindly - garbage it, garbage out. UPPERCASE tags for HTML left in the 1990s. Tags are closed with a slash at the front, not the back. tags not being closed correctly … and many errors, crashes thereafter.

A simpler way to sort your problem is to make a static HTML page—with valid HTML markup—using the data you expect to see. Once that is correct, start replacing literal text with export code.

For now your doc is crashing too many times to figure the problem.

Tip: (not mean unkindly). Start with valid HTML code!

In your templates, you’re ending paragraphs with <p/>. This should be </p>. Sometimes you start a paragraph with '

; that should be ‘

’. (This isn’t Tinderbox — it’s HTML, the base language of all web pages)

One question that springs to mind is, why are you using export for this? Is the project to build a web site, or is that of secondary interest? I ask, in part, because I think there might be an issue with the export system’s handling of Chinese and other East Asian languages. I’m not sure of this, but it’s a possibility.

So, if using HTML is not of the immediate essence, we might bypass some short-term frustration while sorting this out. If it is the point, we’ll sort it anyway.

Thank you for your reply. I won’t be out yet. I’m planning to write using Tinderbox

Absolutely!

I’m afraid I know too little of Chinese and of screenwriting, but I’m sure together we’ll find a good way.

Can you take a screenshot to indicate which file location is incorrect?

There are some bad tags like <p/> here, and in the Element note that is a child of this note.

But, unless you need to make a web site, HTML export templates are perhaps not something you need to do immediately.

I used the project file template from your video tutorial to modify it!

I’m sorry, in my admin ‘hat’, I split this to a new topic as there was no clear link to the thread in which it was (re-)started after a long gap. I thought the top of the new (i.e. this) thread would record from where it is split … but it doesn’t.

Could you post a link in this thread to the post where you got hold of the demo file you based your example upon. That might us help get back to what the original was doing and whether it is actually the best starting example for your task.

What is a ‘template’ in Tinderbox

I also sense some unintended confusion in our collective differing use of the ‘template’ here. to Tinderbox users a template is only one thing: an export template. An export template is a special form of note: see Export templates are notes.

Files posted as examples are generally referred to as a ‘demo’ files or example files. But, from the flow if the text, I think you are referring to a demo file (from an old thread here) rather than specific template(s) in it. In other words referring to a complete TBX file as opposed to one or two template note in the TBX.

The demo file being referred to is from some years back and Tinderbox features have moved on a bit. For the story plotting task you describe, the need for a template seems unnecessary, but it may have been being used for internal preview in which case the demo file was likely written before recent improvements to internal ‘preview’.

In internal preview you use the export mechanism to show HTML+CSS styled pages in the app , i.e. no export occurs. Despite this lack of output to external files, you still use/configure export template notes just as if actually export.

Anyway, getting a copy of the original demo TBX you built from should help resolve the confusion. :slight_smile:

[Edit: Admin edit to fix URL]

1 Like

Yes, my main purpose is to preview and use it. This tutorial is very valuable for reference. Of course, I also use the Tinderbox tool to conceptualize the plot outline of the script. It mainly uses a scene node, which is shared with other combinations to form different storylines. This function is very important. Do you have any specific video tutorials that you can take a look at?

1 Like

Following that link, for me, doesn’t load to a page with a link. Aha, looks like the URL got cut short. I think it was meant to send me to :

Which has this TBX file.

I’ll use my admin access to now fix the URL in your post. :slight_smile:

Will you develop nodes that can be used directly in the future to quickly replace proxies and templates? And there’s no need to modify the program, after all, we’re not web developers, especially for users who don’t understand English

I’m afraid I don’t understand. The document you point to is complex. It is not a ‘template’, in terms of a ‘fill in the blanks’ document. Rather, it helps explain what is discussed in the video. The sort of demo you want is a lot of work to make, which is likely why there isn’t one (we’re all users volunteering our time/expertise here—even ‘free’ time is an expense!).

I do understand about language barriers and am not trying to be insensitive about that. Unfortunately, our starting document here is very complex so will take a while just to check against your demo. But we’ll try.

I’m now out for the rest of the day (here in UK), perhaps now we’ve identified the source demo and demo file, others can help with a solution for @wwchao.

The preview issue is the same issue as the link below.

Preview will not update if the title starts with Japanese

If the title is a 2-byte character, $HTMLExportFileName must be alphanumeric.
I use a stamp to set $HTMLExportFileName in English ( with Translate Shell ).

I made a simple modification based on the original file.

  • Set $HTMLExportFileName of each note in English

  • Set MyNumber

  • Fix the “弧线视图/Element” template
    <a href="SceneView/^value($HTMLExportPath.split("/").at(-1))^">
    <a href="^value($HTMLExportFileName($Name(parent)))^/^value($HTMLExportPath.split("/").at(-1))^">

  • Add and fix “Templates/Header” from the original file.

样板FixVersion.tbx (1.1 MB)

1 Like

Is this necessary for internal preview? My hunch is yes as even if not exporting, OS safefy restrictions for the browser means Tinderbox has to make (‘export’) pages even if this is intenal and never seen on disk.

The original demo TBX in which this is based had all sorts of basic HTML errors. Web browsers are pretty forgiving, but at least the HTML is now correct. Otherwise the content is as before:
TBX L- Author Books, Scripts & Screenplays with Tinderbox SampleFile - clean HTML.tbx (922.6 KB)

Same file, edited to include ^title^ within <head> section of the ‘Header’ template:
TBX L- Author Books, Scripts & Screenplays with Tinderbox SampleFile - clean HTML-v2.tbx (926.6 KB)

If the ^title^ export code wrongly encodes double-byte languages (Chinese, Japanese, etc.) you can edit this line in template ‘Header’:

<title>^title^</title>

to:

<title>^value($Name)^</title>
2 Likes

Based on what fixed in the original demo (see above), I’ve also cleaned up the HTML in file ‘样板FixVersion.tbx’ (otherwise unchanged), and attach it here: 样板FixVersion-clean HTML.tbx (462.1 KB).

I don’t read Chinese so I’ve copy/pasted text based on where it went in the original TBX and put the same text in the same place in the ‘fixed’ HTML.

I hope I’ve introduced no errors and meanwhile, the HTML code is as per W3C and not a the WebKit engine’s best guess of the occasionally bizarre HTML code in the original document.

Oh, and apology to @wwchao as I can now see the bad HTML that called out wasn’t your choice but simply code copied for the original demo/tutorial file.

I hope that helps :slight_smile:

2 Likes

Thank you again, it wasn’t my fault! smile

1 Like

That’s very helpful and well put.

This involves some very old parts of the export system — parts that predate Unicode!

1 Like

Thanks to everyone for help on this issue.

I’ve rewritten the section of Tinderbox that chooses default file names for HTML export, and this should now be straightforward.

The fix should appear in the next release.

2 Likes