kanji koohii FORUM
cb's JNovel Formatter - Printable Version

+- kanji koohii FORUM (http://forum.koohii.com)
+-- Forum: Learning Japanese (http://forum.koohii.com/forum-4.html)
+--- Forum: Learning resources (http://forum.koohii.com/forum-9.html)
+--- Thread: cb's JNovel Formatter (/thread-7229.html)

Pages: 1 2 3 4 5


cb's JNovel Formatter - cb4960 - 2011-02-13

nest0r Wrote:
cb4960 Wrote:
nest0r Wrote:Both, unfortunately. Hmm, so it's still the TrueType thing.
Would you mind trying this test build when you get the chance?

I've changed the way the user selects fonts. Even if the preview can't use a font, it should have no effect on the HTML output files. That is, the HTML output files should use whatever font you entered, TTF or otherwise.

Download JNovel Formatter Font Test via MediaFire

Thanks!
Yes! That works (well, in order to display them properly I had to use Firefox 4 Portable or Google Chrome, but that's a browser issue). Although a minority of font names don't show up (such as Aoyagi Kouzan or Eriji). Had to type those in. I think that's something to do with those font names being idiosyncratic in some way (it's not a kanji/kana issue, because many fonts with those in the title show up in the drop-down list).
OK, I found some nice C# source code for getting a more complete list of fonts.

Download JNovel Formatter Font Test 2 via MediaFire

Please let me know if something seems off. Thanks again!


cb's JNovel Formatter - nest0r - 2011-02-13

Works perfectly now. It even has fonts that aren't installed on my computer! Just kidding. Weird, now all of a sudden Firefox 3.6 will display the non-TT fonts.

And wait, I've always known Firefox supported the display of non-TT fonts. I was just using it for that yesterday. Okay, I clearly need sleep.


cb's JNovel Formatter - cb4960 - 2011-02-13

Hello,

I have just released version 3.1 of JNovel Formatter.

Download JNovel Formatter v3.1 via Google Code

Download JNovel Formatter v3.1 Source Code via Google Code

What changed?

- Fixed issue with non-TrueType fonts not being inserted into the HTML files. (Thanks nest0r!).

Note: non-TrueType fonts still don't work with the preview.

- Added feature to copy any images referenced in either Aozora formating or
HTML img tags to the output directory. (Thanks Daichi!).

- The Remove readings option now removes the "|" character too.

cb4960


cb's JNovel Formatter - nest0r - 2011-02-13

Uh oh. Don't be mad, but I missed something before. The fonts that show up with the @ symbol in the drop-down don't seem to display till you edit the .html and remove the @ in front of the font name?

All of those @ fonts, however, are duplicates and are listed as normal below in the list.

For instance, Meiryo. You can also tell when you've selected one of those fonts because the preview gets all skewed.

Also, I don't see the move images option? I tried it with a folder that has a .txt and an img subfolder. Edit: n/m, The original .txt oddly has images but no references to them within the text. ;p (That must have been one of the earliest collected... )

Edit: Yep, tried it with something else and it automatically copied the subfolder.

Thanks!


cb's JNovel Formatter - cb4960 - 2011-02-13

nest0r Wrote:Uh oh. Don't be mad, but I missed something before. The fonts that show up with the @ symbol in the drop-down don't seem to display till you edit the .html and remove the @ in front of the font name?

All of those @ fonts, however, are duplicates and are listed as normal below in the list.

For instance, Meiryo. You can also tell when you've selected one of those fonts because the preview gets all skewed.

Also, I don't see the move images option? I tried it with a folder that has a .txt and an img subfolder. Edit: n/m, The original .txt oddly has images but no references to them within the text. ;p (That must have been one of the earliest collected... )

Thanks!
So it sounds like I could just remove @ fonts from the font list.

The images are copied automatically. I didn't put a separate option to disable this behavior.

nest0r Wrote:Edit: Yep, tried it with something else and it automatically copied the subfolder.
Excellent.


cb's JNovel Formatter - nest0r - 2011-02-14

cb4960 Wrote:Excellent.
Tell the truth. Did you steeple your fingers after you typed that?


cb's JNovel Formatter - cb4960 - 2011-02-14

nest0r Wrote:
cb4960 Wrote:Excellent.
Tell the truth. Did you steeple your fingers after you typed that?
Maybe.


cb's JNovel Formatter - nest0r - 2011-03-03

O programmer-sama, user @firion1234 pointed out this site: http://a2k.aill.org/ - It apparently converts Aozora texts to rubified, vertical text .pdfs! Edit: It is selectable text, importantly.

Sadly, it seems to just be an online tool only. I'm not sure but I believe they provide code-related files towards the bottom. I see an .rb file, at least.


cb's JNovel Formatter - cb4960 - 2011-03-03

nest0r Wrote:O programmer-sama, user @frion1234 pointed out this site: http://a2k.aill.org/ - It apparently converts Aozora texts to rubified, vertical text .pdfs! Edit: It is selectable text, importantly.

Sadly, it seems to just be an online tool only. I'm not sure but I believe they provide code-related files towards the bottom. I see an .rb file, at least.
Ooooh! Neat!

Haven't tried it yet, but I'd definitely like to incorporate this into JNovel Formatter if possible.


cb's JNovel Formatter - nest0r - 2011-03-03

Apparently it uses LaTeX or however you capitalize that word? One of the versions that allows 縦書き and ルビ?

Edit: Found more background info on that tool: http://asiajin.com/blog/2009/12/04/japanese-classics-for-kindle/ - Nothing particularly useful, just interesting.

Edit 2: A few more links:

http://ask.verse.jp/pc/?TeX%20%E7%B8%A6%E6%9B%B8%E3%81%8D
http://www.guidetojapanese.org/forum/viewtopic.php?id=1327&p=3
Tutorial: http://plaza.snu.ac.kr/~ilang/e-japanese/english/japanese-computing/platex/index.html
http://www17.plala.or.jp/ohishi-masaru/tex/index.html
http://htmltolatex.sourceforge.net/


cb's JNovel Formatter - nest0r - 2011-03-06

By the way, per a recent issue firion1234 mentioned in the Yomichan thread, and per that a2k thingy, perhaps JNF can render 外字 by converting the code they provide to the appropriate characters?

They seem to provide a list here: http://www.jca.apc.org/~earthian/aozora/0213.html (jisx0213code txt/csv), so theoretically you could do a find/replace on the sequences?

It doesn't look like the a2k site converts it. Or at least, not the one where you paste in the text from the aozora page. Edit: Actually I'm not sure, just realized I probably copied/pasted wrong.

Because the originals didn't have the expanded sets, so they just provided the code and how to map it instead, it seems (and they use .png files for the 外字 instead).

http://forum.koohii.com/showthread.php?pid=129441#pid129441

Edit 2: Okay yes the a2k converter processes 外字 (just tried it on http://www.aozora.gr.jp/cards/001248/files/46518_ruby_25560.zip), so perhaps it's in that latex code or .rb they provided?

Edit 3: I see they do have references to the gaiji in the .rb file, at least.

And more stuff here: https://github.com/takahashim/aozora4reader in the data folder.


cb's JNovel Formatter - nest0r - 2011-04-03

Souryo just posted this tool, in case you find its implementation useful: http://forum.koohii.com/showthread.php?pid=133511#pid133511


cb's JNovel Formatter - cb4960 - 2011-04-03

Here is a nice Japanese aozora text-to-PDF converter called 青P:

[Image: aop.png]

Download:

Original site (Japanese - click ファイルの入手 to Download)
or
Download via MediaFire (mirror I created)

Features:

▲ No installation required.
▲ Multiple ways to format the text: vertical, double-decker vertical, horizontal, grid.
▲ Supports aozora formatting.
▲ The text is fully selectable.
▲ Platform independent (works with Windows, Linux, and Mac(?)).
▲ Customizable (fonts, paper size, margin, etc.) and contains presets for the most common usage patterns.
▲ Includes a help file that explains all of the options.

Run Instructions:

Windows:
1) Unzip
2) Double-click on AO_P.jar.

Linux:
1) Unzip
2) java -jar AO_P.jar


cb's JNovel Formatter - nest0r - 2011-04-03

Nice. I figured there must be native software floating around.

It doesn't translate 外字 though, it just replaces that formatting with the little symbol.

The jisx0213 list I linked in above comment has lines like this for conversion:

1-20-29 j-343d e-b4bd s-8abb u-68fa t-e6a3ba (棺)

In the aozora texts, it's displayed like so: ※[#「皐+羽」、第3水準1-90-35]

Surely someone savvy can tell the program to do a find/replace of those texts' end numbers with matching entries in the list? ;p

Edit: Umm nevermind, guess there's more to it than that, as the list has this entry for 1-90-35:

1-90-35 j-7a43 e-fac3 s-edc1 u-7ffa t-e7bfba (暿)

But aozora has this: http://www.aozora.gr.jp/gaiji/1-90/1-90-35.png ([Image: 1-90-35.png]) (翺)

Edit 2: Perhaps it's the list that's wrong? Seems to be listed properly elsewhere.

Maybe this is a better list? http://www.est.co.jp/fe/fonttest/JIS2004-3.pdf

Yeah, even Rikaichan says the other entry ought to be different, re: SKIP + Unicode: 1-4-11 and 66bf.

Edit 3: So maybe really one just needs the integrated SKIP/Unicode list like in the .rb: http://a2k.aill.org/az2tex.rb


cb's JNovel Formatter - cb4960 - 2011-04-04

nest0r Wrote:Edit 3: So maybe really one just needs the integrated SKIP/Unicode list like in the .rb: http://a2k.aill.org/az2tex.rb
Should be simple to write a program to replace the 外字 codes with UTF-8 equivalents based on the mappings in az2tex.rb. But what do you suppose the \CID mappings are? Snippet from az2tex.rb:

2-92-52 \UTF{9908}
2-92-53 \UTF{4b3b}
2-92-54 \CID{18959} <------------ This
2-92-55 \UTF{9916}
2-92-56 \UTF{9917}
2-92-57 \CID{18962} <------------ This
2-92-58 \UTF{991a}
2-92-59 \UTF{991b}


cb's JNovel Formatter - nest0r - 2011-04-04

Looks like it's a PostScript thing? http://en.wikipedia.org/wiki/PostScript_fonts#File_formats

I think maybe it will display in .pdfs without manual conversion ? (n00b glance at random Google results, e.g. http://forums.adobe.com/thread/285493)


cb's JNovel Formatter - cb4960 - 2011-04-04

I have just released version 1.0 of Aozora Gaiji Replacer.

Download Aozora Gaiji Replacer Version 1.0 via MediaFire (source code included)

(Note: Requires either Windows and the .Net Framework or Linux and Mono)

[Image: aozoragaijireplacer.png]

What is Aozora Gaiji Replacer?
Aozora Gaiji Replacer is a utility that will look at a Japanese novel and replace aozora gaiji constructs with UTF-8 equivalents.

Example:
※[#「皐+羽」、第3水準1-90-35] ------> 翺

Tip:
You can run this tool on a novel before turning it into PDF with 青P.

Limitations:
Only replaces gaiji that have a UTF-8 equivalent (luckily, most of them do).

----------

I will integrate this functionality into JNovel Formatter soon.


cb's JNovel Formatter - nest0r - 2011-04-04

Awesome, thanks. Will test it soon.

Edit: Found this, by the way, one instance of a (Linux) tool that maps cid to unicode, or something like that (cidToUnicode). Maybe this means they're floating around out there for easy implementation? http://linux.die.net/man/5/xpdfrc


cb's JNovel Formatter - cb4960 - 2011-04-06

Hello,

I have just released version 4.0 of JNovel Formatter.

Download JNovel Formatter v4.0 via Google Code

Download JNovel Formatter v4.0 Source Code via Google Code

What changed?

▲ Added feature to replace aozora gaiji codes with UTF-8 equivalents.
▲ Added feature to support aozora underline constructs.
▲ Added feature to remove the comment between the dashes at the head of the novel.
▲ Added feature to remove some more unsupported aozora constructs: bottom indent and center.
▲ Remove fonts that start with "@" from the font dropdown.
▲ Changed the "Readings/Ruby" option to "Aozora Formatting".
▲ Fixed index file sometimes containing too many links.
▲ The Open Directory button on the Complete dialog now also closes the dialog.

cb4960


cb's JNovel Formatter - nest0r - 2011-04-08

I noticed this one file I tried to convert leaves this unformatted:

[#表紙(img/imagename.jpg)] - I'm assuming it's because it's 表紙 for the cover rather than 挿絵?
[#ページの左右中央] - I found this: http://www.aozora.gr.jp/annotation/layout_3.html

By the way, I can't get that 青P or Aozora2PDF to add images properly either, though those aren't your tools, so. Just thought I'd complain. ;p

Edit: Ahha, I see the problem: It requires the 入る. I wonder how many of my files lack that. It also won't process 表紙. I suppose I simply had an idiosyncratic file.


cb's JNovel Formatter - nest0r - 2011-04-08

By the way, looks like 青P is using iText to generate 縦書き? They referenced it on their blog.

Edit: I see in this sample .pdf it has vertical Japanese text.

http://itextpdf.com/themes/keyword.php?id=408


cb's JNovel Formatter - nest0r - 2011-04-08

!!

TxtMiru 2.0.

This program is awesome. Like ArisuViewer or Smoopy but with selectable text! + I'm quite liking the page-turning animations as I use two-finger scrolling from side to side. It seems to handle all of the Aozora formatting, also.

https://sites.google.com/site/gearsns/TxtMiru


cb's JNovel Formatter - cb4960 - 2011-04-09

nest0r Wrote:I noticed this one file I tried to convert leaves this unformatted:

[#表紙(img/imagename.jpg)] - I'm assuming it's because it's 表紙 for the cover rather than 挿絵?
I suppose I can convert in anyway, just for those few(?) novels that use it.

nest0r Wrote:[#ページの左右中央] - I found this: http://www.aozora.gr.jp/annotation/layout_3.html
All have to add support for these types of constructs one of these days.

nest0r Wrote:By the way, looks like 青P is using iText to generate 縦書き? They referenced it on their blog.
I read that to. It seems TxtMiru also uses it.

nest0r Wrote:This program is awesome. Like ArisuViewer or Smoopy but with selectable text! + I'm quite liking the page-turning animations as I use two-finger scrolling from side to side. It seems to handle all of the Aozora formatting, also.
Great find! This might be the best novel viewer yet. Though I couldn't find an option to display just a single page. Considering it has an option for just about everything else, I must be missing it. Edit: Also, is there a way to increase font size?


cb's JNovel Formatter - nest0r - 2011-04-09

Under ツール→レイアウト設定, according to the .pdf file in TxtMiru2's folder, but I can't get it to open. Fortunately, I'm happy with its current appearance.

You can change between two layouts in the main settings, and in the .ini file it has two mentions of layout, including a reference to a bunko.lay file and Bunko 1.0 as the layout type. I don't see any .lay files in my folder, though. ^_^

Edit: Nevermind, it opens now. That's weird.

Edit 2: Well, playing with it, it looks like each layout file in the Layout folder has a number of entries for TextLayout corresponding to the number of squares or whathaveyou, e.g. ShinshoTate2.lay has four entries for TextLayout and it's the one where you've got the text divided into 4 squares. So perhaps if you create a layout file with just one entry... ? I'm afraid to mess with it.

Edit 3: It's funny though, you can customize, like, everything, so many options, but none for single page? I think it might be a side-effect of the page animation?


cb's JNovel Formatter - cb4960 - 2011-04-09

It won't even let me open the layout settings dialog and I don't see any .lay files. As is, this program doesn't pair well with my netbook because the fonts are so tiny. I think I'll go back to 青P for all of my vertical text needs.