From: Alecs K. <Al...@pe...> - 2004-03-15 19:14:29
|
Script 'vim2html.pl' tweaked and committed to CVS. Now we've got a nicer layout: http://vcd.cosoft.org.cn/doc/help.html Btw, i made a html tarball of the User Manual for downloading: http://vcd.cosoft.org.cn/download/usrmanual.html.tar.gz Does anyone know how to convert the *.txt files to pdf format? Regards, |
From: Dasn <da...@us...> - 2004-03-15 22:39:07
|
On Tue, Mar 16, 2004 at 03:14:17AM +0800, Alecs K. wrote: > > Does anyone know how to convert the *.txt files to pdf format? > This may help: http://vim.sourceforge.net/scripts/download_script.php?src_id=2406 |
From: Alecs K. <Al...@pe...> - 2004-03-16 13:40:31
|
On Tue, 16 Mar 2004 06:38:42 +0800 Dasn <da...@us...> wrote: > On Tue, Mar 16, 2004 at 03:14:17AM +0800, Alecs K. wrote: > > > > Does anyone know how to convert the *.txt files to pdf format? > > > > This may help: > > http://vim.sourceforge.net/scripts/download_script.php?src_id=2406 > Thanks. Took a look at it. This plugin uses the utility 'txt2pdf' to do the conversion. Seems 'txt2pdf' can only produce kinda 'plain text' pdf file.. No links recognized and generated in the doc. Did more search. And now came up with this approach: First use html2ps[1] to convert html to ps, and then use ps2pdf[2] to produce the final pdf doc. This way we can have those hyperlinks in the pdf document [from the hyperlinks in the original html documents]. But the problem now is that i cannot make it work well for Chinese encoding/characters. Appreciate if someone could shed more light. TIA. [1] http://user.it.uu.se/~jan/html2ps.html [2] a utility within Ghostscript Regards, |
From: Simon L. <wzh...@sp...> - 2004-03-16 13:46:36
|
> But the problem now is that i cannot make it work well for Chinese > encoding/characters. hmmm. Forgot about this. I didn't get htmldoc to work for this either. lang2 -- Simon Liang wzh...@sp... -- http://www.fastmail.fm - Sent 0.000002 seconds ago |
From: Dasn <da...@us...> - 2004-03-17 12:00:29
|
On Tue, Mar 16, 2004 at 09:40:19PM +0800, Alecs K. wrote: > Took a look at it. This plugin uses the utility 'txt2pdf' to do the > conversion. Seems 'txt2pdf' can only produce kinda 'plain text' pdf > file.. No links recognized and generated in the doc. Not that bad... According to the Readme of txt2pdf: ====================================================================== o You can mark coloured (using PERL regular expressions) phrases in the produced PDF files. o Internet specific phrases such as http://... ftp://... mailto:... file:... ldap:... news:... will automatically be made into clickable URL's. o You can create a link to a specific age within a PDF document by simply adding http://...pdfdocument#pdfmark o japanese, traditional and simplified chinese, korean support ====================================================================== Sounds perfect huh? But I can't get it work that way. Someone familiar with 'PDF syntax' may dig it out. Cheers. |
From: James He <ic...@us...> - 2004-03-16 10:30:36
|
I found some minor bugs in 'vim2html.pl', fixed them and committed to CVS.) Fixed: 1. Can not recognize 'Ctrl-]' as a keystoke (e.g. in usr_01.txt) 2. Parse 'Notepad' to '<code class="note">Note</code>pad' in usr_01.txt So excited for me to fix some bugs in this perl script since it was not very long since I started to learn Perl. :-) BTW, what does ``#!/usr/bin/env perl'' mean? I only use ``#!/usr/bin/perl''. FYI: wind:~/tt/vim# diff usr_01.html.old usr_01.html ================================================ 46c46 < 按 CTRL-] 跳转到当前光标下的单词的相关主题 --- > 按 <code class="keystroke">CTRL-]</code> 跳转到当前光标下的单词的相关主题 51c51 < 标移动到 CTRL-] 上,并按下 CTRL-]。 --- > 标移动到 <code class="keystroke">CTRL-]</code> 上,并按下 <code class="keystroke">CTRL-]</code>。 92c92 < Vim,不过被设置成"点击并输入"风格,就像 <code class="note">Note</code>pad 一样。它总是处于"插 --- > Vim,不过被设置成"点击并输入"风格,就像 Notepad 一样。它总是处于"插 wind:~/tt/vim# diff vim2html.pl.old vim2html.pl =============================================== 139c139 < s/CTRL-(\w+)/<code class="keystroke">CTRL-$1<\/code>/g; --- > s/CTRL-([\w+\]])/<code class="keystroke">CTRL-$1<\/code>/g; 149c149 < s/(Note:?)/<code class="note">$1<\/code>/gi; --- > s/(Note[:?\s])/<code class="note">$1<\/code>/gi; 172c172,173 < --- > close ( IN ); > close ( OUT ); 215c216 < --- > close ( CSS ); on Tue, 16 Mar 2004 03:14:17 +0800 "Alecs K." <Al...@pe...> wrote: > Script 'vim2html.pl' tweaked and committed to CVS. Best regards, -- James He <ic...@us...> |
From: Alecs K. <Al...@pe...> - 2004-03-16 14:05:37
|
On Tue, 16 Mar 2004 18:31:48 +0800 James He <ic...@us...> wrote: > So excited for me to fix some bugs in this perl script since > it was not very long since I started to learn Perl. :-) Nice job. Keep going. =) > > BTW, what does ``#!/usr/bin/env perl'' mean? I only use > ``#!/usr/bin/perl''. Perl may be at other locations other than /usr/bin/perl (ie. /usr/local/bin/perl, etc.). man env. > < s/CTRL-(\w+)/<code > class="keystroke">CTRL-$1<\/code>/g;--- > > s/CTRL-([\w+\]])/<code > > class="keystroke">CTRL-$1<\/code>/g; There are also other ctrl keys like CTRL-@, CTRL-[, CTRL-^, etc. So i think we can easily use /CTRL-(.)/ > < s/(Note:?)/<code class="note">$1<\/code>/gi; > --- > > s/(Note[:?\s])/<code > > class="note">$1<\/code>/gi; /(Note[:\s)]/ will do. Btw, the 'tags' file in our CVS was out of date. (ie. no 41.12) 'vim2html.pl' and 'tags' are committed. Check them out. Regards, |
From: James He <ic...@us...> - 2004-03-18 10:21:15
|
on Tue, 16 Mar 2004 22:05:24 +0800 "Alecs K." <Al...@pe...> wrote: > > < s/CTRL-(\w+)/<code > > class="keystroke">CTRL-$1<\/code>/g;--- > > > s/CTRL-([\w+\]])/<code > > > class="keystroke">CTRL-$1<\/code>/g; > > There are also other ctrl keys like CTRL-@, CTRL-[, CTRL-^, etc. > So i think we can easily use /CTRL-(.)/ They are not identical, because there are 'Ctrl-Break', 'Ctrl-PageUp', etc that need to be regarded as keystrokes, too. (e.g. in 'os_dos.txt') Best regards, -- James He |
From: Alecs K. <Al...@pe...> - 2004-03-18 11:02:59
|
On Thu, 18 Mar 2004 18:22:27 +0800 James He <ic...@us...> wrote: > > > > s/CTRL-([\w+\]])/<code > > > > class="keystroke">CTRL-$1<\/code>/g; > > > > There are also other ctrl keys like CTRL-@, CTRL-[, CTRL-^, etc. > > So i think we can easily use /CTRL-(.)/ > They are not identical, because there are 'Ctrl-Break', 'Ctrl-PageUp', > etc that need to be regarded as keystrokes, too. (e.g. in > 'os_dos.txt') /CTRL-(\S+)/ |
From: Alecs K. <Al...@pe...> - 2004-03-18 17:25:04
|
On Thu, 18 Mar 2004 19:02:41 +0800 "Alecs K." <Al...@pe...> wrote: > On Thu, 18 Mar 2004 18:22:27 +0800 > James He <ic...@us...> wrote: > > > > > > > s/CTRL-([\w+\]])/<code > > > > > class="keystroke">CTRL-$1<\/code>/g; > > > > > > There are also other ctrl keys like CTRL-@, CTRL-[, CTRL-^, etc. > > > So i think we can easily use /CTRL-(.)/ > > They are not identical, because there are 'Ctrl-Break', > > 'Ctrl-PageUp', etc that need to be regarded as keystrokes, too. > > (e.g. in'os_dos.txt') > > /CTRL-(\S+)/ Better /CTRL-(\w+|.)/ , since there may be punctuations (ie. period, etc.) following those ctrl keys. (such as 'CTRL-T,' or 'CTRL-A.') -- Alecs K. |
From: James He <ic...@us...> - 2004-03-16 10:40:01
|
on Tue, 16 Mar 2004 03:14:17 +0800 "Alecs K." <Al...@pe...> wrote: > Btw, i made a html tarball of the User Manual for downloading: > http://vcd.cosoft.org.cn/download/usrmanual.html.tar.gz Oh, you forgot to include 'vim-stylesheet.css' in this tarball. Best regards, -- James He <ic...@us...> |
From: Alecs K. <Al...@pe...> - 2004-03-16 14:30:33
|
On Tue, 16 Mar 2004 18:40:34 +0800 James He <ic...@us...> wrote: > on Tue, 16 Mar 2004 03:14:17 +0800 > "Alecs K." <Al...@pe...> wrote: > > > Btw, i made a html tarball of the User Manual for downloading: > > http://vcd.cosoft.org.cn/download/usrmanual.html.tar.gz > > Oh, you forgot to include 'vim-stylesheet.css' in this tarball. > Yes. Thanks for pointing this out. Fixed: http://vcd.cosoft.org.cn/download/vim_usr_manual.html.tar.gz Regards, |
From: Simon L. <wzh...@sp...> - 2004-03-16 13:46:22
|
> Btw, i made a html tarball of the User Manual for downloading: > http://vcd.cosoft.org.cn/download/usrmanual.html.tar.gz :-) > > Does anyone know how to convert the *.txt files to pdf format? hmmm. There used to be a bunch of awk script written by the old vimdoc team, which will convert .txt to .tex files and then one can use pdftex to do the job. However, the package was outdated and won't work properly for the latest docs. I tried (hard) to write some script (perl & python) for the same purpose but works terribly. Not easy for me anyway. Of course one can use acrobat or something like that to do the job but it is not optimal. Another consideration would be to use htmldoc to convert the html version (using the black&white printable color schem). It actually works fine - I used it to generate a pdf version of TAOUP. Hope that helped. lang2 -- Simon Liang wzh...@sp... -- http://www.fastmail.fm - mmm... Fastmail... |