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.
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様
貴君のtbxファイルを試しましたが、何の問題もなく指定箇所から
プレヴューできますが?小生の環境はMac OS11.7.9 BigSur
Tinderbox ver.9.6.0(b632) Mac mini (late2014)です。若松久仁光拝
追伸
初回はクリックしてから少々時間が必要でした(ホンの1〜2秒ですが)
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
P.S.
The first time I clicked, it took a little time (but,1-2 seconds).
Takeshi Otsuka様
午後にもう一度トライしましたが、
Previewでの表示は貴君のご指摘の通り
ジャンプして表示できませんでした。
以前の書き込みを訂正させていただきます。若松久仁光拝
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.
LaTeXでの禁則文字の「 _ 」を使用するには躊躇します。
今後pandocなどで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
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.
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.
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.
P.S.
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
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.
(グラフは正しく表示されましたが、残念ながらプレビューの表示は改善されませんでした。
Mathjaxのプレビューは、HTMLExportTemplateが通常のHTMLテンプレートが設定されているためでした。)
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)
Dear Takeshi Otsuka, eastgate & Michael Becker,
I am really glad the issue was resolved.
Thanks to eastgate and Michael Becker for their help.
yours, WAKAMATSU
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.
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.