Preview will not update if the title starts with Japanese

When a title of note starts with Japanese, preview is not working properly.

I tried with my TBX files and it seems that the problem occurs when the first character of the title is Japanese (maybe a 2-byte character).

If I select it while in preview view, either a preview of the previously selected note is displayed or the focus is shifted to the top-level note at the moment of selection.

If I set the first letter to alphabetical, it appears fine, but any way to work around it would be helpful.

Tinderbox 9.6 Poster example.tbx (489.5 KB)


Do you have more than one note in the container with the same name?

Preview assumes that two sibling notes with the same name are interchangeable.

Hmm…this is interesting. What is beyond this assumption? Should the $ID number not be the uniqueness of a note, not the $Name?

Preview was intended to Preview the HTML that will be exported when the document is exported to HTML. By definition, the path of an export note must be unique, because that path becomes the URL of the exported page.

I know you use it effectively for something else. That’s great.

No, I do not anticipate that $ID or $IDString will replace $Name and $Path as the preferred way to identify notes.

Takeshi Otsuka様
プレヴューできますが?小生の環境はMac OS11.7.9 BigSur
Tinderbox ver.9.6.0(b632) Mac mini (late2014)です。若松久仁光拝

Mr. Takeshi Otsuka
I tried your tbx file, and from the specified place without any problems.
My environment is Mac OS11.7.9 BigSur
Tinderbox ver.9.6.0(b632) Mac mini (late2014).
Sincerely yours, WAKAMATSU
The first time I clicked, it took a little time (but,1-2 seconds).

Takeshi Otsuka様
I tried again in the afternoon,
The display in Preview is as you pointed out
Couldn’t jump to view.
I will correct my previous post.

Takeshi Otsuka様
HTMLでファイル名、フォルダ名に使用する文字で許可されている「 - 」「 _ 」を
半角「 _ 」「 - 」を先頭に挿入すると『正しく日本語』が表示されますが、
半角[%]に変更しても「 _ 」を記憶していて

LaTeXでの禁則文字の「 _ 」を使用するには躊躇します。
Without thinking about what’s going on inside Tinderbox
I tried various workarounds.
As a result of the one-hour experiment,
Using the “whitespace” escape character[ & n b s p ; ] to make it a “title” is
Is it the best solution at the moment?
It can be displayed without changing the layout of the title.
‘-’ and ’ _ ’ that are allowed in the characters used for file names and folder names in HTML
If you place it at the beginning, the preview is also functioning normally.
If you insert half-width " _ " and “-” at the beginning, “Correctly Japanese” will be displayed,
Other “half-width characters” leading insertion will not work.
It’s a strange phenomenon.
" _ " is remembered even if it is changed to half-width [%]
The preview will only be redisplayed as “_poster sample”.
Half-width kana was also useless.

I am hesitant to use the illegal character “_” in LaTeX.
In the future, there is a possibility of exporting via LaTeX with pandoc etc.
I think that it is a “writing method” that you want to avoid in some cases.
Sincerely yours, WAKAMATSU

1 Like

Thank you for your reply.
There are no multiple notes with the same name in the container.
$Path+$Name is an unique string.
(I’m sorry if I didn’t understand the intent of your question.)

若松 久仁光様


Mr. Kunimitsu Wakamatsu
Thank you for trying various methods.
It seems that the only way is to insert some half-width alphanumeric characters.

I checked the behavior some more and found the same phenomenon in Korean.
The place where the selection would move was not exactly the parent note.
It seems that the selection jumps to the note in the uppermost position in the top-level note with 2-byte character title.

That is good., thanks.

For those interested:

So, in this continent is not the Name that provides the uniqueness but the $HTMLExportFilename. To be clear, if the $HTMLExportFilename is not populated, then it defaults to $Name; ergo that the idea of a note with the same name could create a conflict. In my files, I have TBX use the note’s $ID for $HTMLExportFilename; that way it is guaranteed to be unique and so that I can use note name with the same name, e.g. ‘$HMTLExportFilename=$ID’. I’ve build some conditions around this for optimization.

OK: if no HTMLExportFileName is provided, Tinderbox chooses a default file name based on the note $Name. The method is uses was designed to meet limitations of early Web servers, which did not support file names in Japanese at all. We lifted that restriction in part, but it’s not very effective.

This will be addressed in the next release.

Temporary workaround: In the interim, if you don’t actually intend to export to HTML, Michael Becker’s approach will work. If $Name is unique, just set $HTMLExportFilename to $Name. If not, set $HTMLExportFileName to $IDString.

1 Like

Takeshi Otsuka様

No01 : 貴君のtbxファイルの「t_plotly」の中の

No02 : これまでの『潰れて見えない』グラフ表示が、正常な形状になりますか?

No03 : No02で正常な表示だったら、次に「今回の問題となっている」


Tinderbox9.3 では本文のコピーを作成して配置すると

Dear Takeshi Otsuka,
I tried experimenting from a different angle from the approach and habits as a musician.
The sheet music is written correctly. This is a major premise when playing.
The Tinderbox program is correctly described here. That means.
Isn’t the method deviating from the composer’s intention? We will play it with utmost care.
It may not be a very easy-to-understand explanation, but for writing on Tinderbox
Are there any problems? I tested a little.
Could you please try the following?

No01 : In “t_plotly” of your tbx file
” Change $ScreenHeight-20 to $ScreenHeight-40 and add
Preview “plotly”
No02 : Will the graph display that has been [collapsed and invisible]
become a normal shape?

No03: If the display is normal in No02, then “This is the problem”
Has the output of the Japanese title “Poster Sample” been properly corrected?

In my environment, if the screen height is changed to 40, the Japanese title
“Poster Sample”
The preview run worked fine without “inserting half-width characters”
at the beginning.
It is not yet possible to run a preview with Mathjax alone.
There may be a hidden cause here.
In Tinderbox 9.3, if you create a copy of the text and place it
Preview works.
(However, the preview in plotly leaves the graph collapsed as it is.)
August 15, 2023 10:22:41 JST

1 Like

No01&No02: the graph is displayed correctly.
No03: Unfortunately, the preview display is not improved.
Preview of Mathjax is because HTMLExportTemplate was set to a normal HTML template.

Thank you very much for trying different methods.
The method Mr. Mark Bernstein gave me above solved the problem.

This method solved the problem.
Now that I know the cause and workaround, I would like to set the HTMLExportFileName appropriately for my application.
The modified file is attached for your reference.
Tinderbox 9.6 Poster example.tbx (541.6 KB)

Thank you for your advice.

Dear Takeshi Otsuka, eastgate & Michael Becker,
I am really glad the issue was resolved.
Thanks to eastgate and Michael Becker for their help.

1 Like

BTW, I export files all the time with my approach, it just results in non-human readable (i.e., a bunch of numbers) file names. But, as I don’t need to read the paths, that is just fine for my purpose, or if I do need to I know the numbers, but looking at TBX, what path to follow.

Will $IDString always work in this case? I thought $IDString would sometime generate a characters, e.g. “/”, that is not conducive to being in a path.

This workaround will not be needed in the future (probably not after 9.6.1)

I believe that $IDString will always work. I’ll check that it does.

FWIW, I exported all of aTbRef’s $IDString values and after stripping tbx; and alphanumerics all I see is forward slashes / and plus signs +.

If $IDString is, tbx:Bj/YCi, for example, setting $HTMLExportFileName to $IDString would export “tbx:Bj/YCi.html” as the filename is set explicitly and so bypasses Tinderbox’s normal filtering of unhelpful characters which looks like a page with the filename “YCi.html”.

For an export filename, $ID seems a better choice albeit making the meaning hard to read ‘by eye’. Such usage is a key part of the method used to make PDFs from a single multi-source-note HTML page exported from a TBX.

1 Like