# Makefile.am -- Makefile for the m17n library documentation.
-# Copyright (C) 2003, 2004, 2005, 2006
+# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
# National Institute of Advanced Industrial Science and Technology (AIST)
# Registration Number H15PRO112
pkgdata_DATA = \
usr/html/index.html \
- usr/latex/m17n-lib.dvi usr/latex/m17n-lib.ps \
+ usr/latex/m17n-lib.ps \
man/man1/m17n-config.1 \
man/man3/m17nIntro.3m17n \
man/man5/mdbGeneral.5
pkgdatadir = $(datadir)/m17n/docs
-EXTRA_DIST = usr/html usr/latex/m17n-lib.dvi usr/latex/m17n-lib.ps \
- man/man1 man/man3 man/man5 \
- ja/html ja/latex/m17n-lib-ja.dvi ja/latex/m17n-lib-ja.ps
+EXTRA_DIST = usr/html ja/html \
+ usr/latex ja/latex \
+ man/man1 man/man3 man/man5
install-pkgdataDATA: $(pkgdata_DATA)
$(mkinstalldirs) $(pkgdatadir)/html
$(mkinstalldirs) $(mandir)/man1 $(mandir)/man3 $(mandir)/man5
- $(INSTALL_DATA) usr/latex/m17n-lib.dvi $(pkgdatadir)/m17n-lib.dvi
- $(INSTALL_DATA) usr/latex/m17n-lib.ps $(pkgdatadir)/m17n-lib.ps
+ $(INSTALL_DATA) usr/latex/m17n-lib.pdf $(pkgdatadir)/m17n-lib.pdf
cd usr/html; \
for f in *.html *.png; do \
$(INSTALL_DATA) $$f $(pkgdatadir)/html/$$f; \
ja-html html-ja: ${HTML_JA_TARGET}
dev-html html-dev: ${HTML_DEV_TARGET}
-LATEX_USR_TARGET = usr/latex/m17n-lib.dvi usr/latex/m17n-lib.ps
-LATEX_JA_TARGET = ja/latex/m17n-lib.dvi ja/latex/m17n-lib.ps
-LATEX_DEV_TARGET = dev/latex/m17n-lib.dvi dev/latex/m17n-lib.ps
+LATEX_USR_TARGET = usr/latex/m17n-lib.dvi usr/latex/m17n-lib.pdf
+LATEX_JA_TARGET = ja/latex/m17n-lib.dvi ja/latex/m17n-lib.pdf
+LATEX_DEV_TARGET = dev/latex/m17n-lib.dvi dev/latex/m17n-lib.pdf
LATEX_TARGET = ${LATEX_USR_TARGET} ${LATEX_JA_TARGET} ${LATEX_DEV_TARGET}
usr-latex latex-usr: ${LATEX_USR_TARGET}
-e '/^PROJECT_NUMBER / s/=.*/= %PROJECT_NUMBER%/' \
-e '/^OUTPUT_DIRECTORY / s/=.*/= %USR_JA_DEV%/' \
-e '/^OUTPUT_LANGUAGE / s/=.*/= %OUTPUT_LANGUAGE%/' \
+ -e '/^FULL_PATH_NAMES / s/=.*/= NO/' \
-e '/^OPTIMIZE_OUTPUT_FOR_C / s/=.*/= YES/' \
- -e '/^EXTRACT_ALL / s/=.*/= NO/' \
+ -e '/^EXTRACT_ALL / s/=.*/= YES/' \
-e '/^SHOW_INCLUDE_FILES / s/=.*/= NO/' \
-e '/^SHOW_MEMBER_DOCS / s/=.*/= NO/' \
-e '/^ENABLED_SECTIONS / s/=.*/= %ENABLED_SECTIONS%/' \
-e '/^PREDEFINED / s/=.*/= FOR_DOXYGEN/' \
-e '/^GENERATE_TAGFILE / s/=.*/= m17n.tag/' \
-e '/^TYPEDEF_HIDES_STRUCT / s/=.*/= YES/' \
+ -e '/^DOT_FONTNAME / s/=.*/=/' \
+ -e '/^SORT_MEMBER_DOCS / s/=.*/= NO/' \
> $@
doxyfile-html: doxyfile ${SRCALL}
-e 's|%GENERATE_HTML%|YES|' \
-e 's|%GENERATE_LATEX%|NO|' \
-e 's|%GENERATE_MAN%|NO|' \
- -e 's|%ENABLED_SECTIONS%|FOR-HTML|' \
+ -e 's|%ENABLED_SECTIONS%|FOR_HTML|' \
< $< >$@
doxyfile-html.usr: doxyfile-html
-e 's|%GENERATE_HTML%|NO|' \
-e 's|%GENERATE_LATEX%|YES|' \
-e 's|%GENERATE_MAN%|NO|' \
- -e 's|%ENABLED_SECTIONS%|FOR-LATEX|' \
+ -e 's|%ENABLED_SECTIONS%|FOR_LATEX|' \
< $< >$@
doxyfile-latex.usr: doxyfile-latex
-e 's|%GENERATE_LATEX%|NO|' \
-e 's|%GENERATE_MAN%|YES|' \
-e 's|%MAN_EXTENSION%|.1|' \
- -e 's|%ENABLED_SECTIONS%|FOR-MAN|' \
+ -e 's|%ENABLED_SECTIONS%|FOR_MAN|' \
< $< >$@
doxyfile-man3: doxyfile ${SRCALL}
-e 's|%GENERATE_LATEX%|NO|' \
-e 's|%GENERATE_MAN%|YES|' \
-e 's|%MAN_EXTENSION%|.3m17n|' \
- -e 's|%ENABLED_SECTIONS%|FOR-MAN|' \
+ -e 's|%ENABLED_SECTIONS%|FOR_MAN|' \
< $< >$@
doxyfile-man5: doxyfile ${SRCALL}
-e 's|%GENERATE_LATEX%|NO|' \
-e 's|%GENERATE_MAN%|YES|' \
-e 's|%MAN_EXTENSION%|.5|' \
- -e 's|%ENABLED_SECTIONS%|FOR-MAN|' \
+ -e 's|%ENABLED_SECTIONS%|FOR_MAN|' \
< $< >$@
doxyfile-man%.usr: doxyfile-man%
rm -f `dirname $@`/*.html
${DOXYGEN} $<
cp images/icon-*.png `dirname $@`
-# cd `dirname $@`; rm -f *_8c* *_8h* *_8txt* dirs.html dir_* files.html
echo 'code { font-weight: bold }' >> `dirname $@`/doxygen.css
%/html/parrot.png: parrot.png
%/latex/refman.tex: doxyfile-latex.% ${SRCALL} utils/%_filter.rb
rm -rf `dirname $@`
${DOXYGEN} $<
- cd `dirname $@`; rm -f *_8c* *_8h* *_8txt* dirs.tex dir_* files.tex
%/latex/m17n-lib.dvi: %/latex/refman.tex styles/m17n-lib.sty utils/latex.sh
- -utils/latex.sh `dirname $@` latex
+ -utils/latex.sh `dirname $@`
%/latex/m17n-lib.ps: %/latex/m17n-lib.dvi utils/dvips.sh
utils/dvips.sh `dirname $@` dvips
# emacs -batch -q -l utils/mokuji.el -f write-mokuji $@
-%/latex/m17n-lib.pdf: %/latex/m17n-lib.tex data-%/m17n-lib.sty utils/latex.sh
- utils/latex.sh `dirname $@` pdflatex
+%/latex/m17n-lib.pdf: %/latex/m17n-lib.dvi
+ cd `dirname $<`; dvipdfmx `basename $<`
%/man/man1/m17n-config.1: doxyfile-man1.% ${MAN1} utils/%_filter.rb
rm -rf `dirname $@`
rm -rf doxywork man/ja/man5/*
ruby utils/mkman.rb 5 ja/man/man5 man/ja/man5
-CLEANFILES=doxyfile* ${TARGET} *.tar.gz warning *~
+CLEANFILES=doxyfile* ${TARGET} data/*.txt *.tar.gz warning *~
clean-local:
rm -rf usr dev ja man doxywork
+dist-tgz: distdir
+ for d in usr ja; do \
+ (cd $(distdir)/"$$d"/latex/; \
+ rm -f *8[ch]* *8txt* *.aux *.ttf *.ind *.dvi *.idx *.ilg *.log); \
+ done
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
WEBDIR = /project/web/extra/m17n-lib
-release: dist
+release: dist-tgz
[ -d ${WEBDIR}/m17n-docs ] || mkdir ${WEBDIR}/m17n-docs
[ -d ${WEBDIR}/download ] || mkdir ${WEBDIR}/download
- cd usr/html; for f in *; do \
- case $$f in *8c*);; *8h*);; *8txt*);; dirs.html);; dir_*);; files.html);; *) cp $$f ${WEBDIR}/m17n-docs;; esac; \
- done
+ cd usr/html; cp * ${WEBDIR}/m17n-docs
[ -d ${WEBDIR}-ja2/m17n-docs ] || mkdir ${WEBDIR}-ja2/m17n-docs
- cd ja/html; for f in *; do \
- case $$f in *8c*);; *8h*);; *8txt*);; dirs.html);; dir_*);; files.html);; *) cp $$f ${WEBDIR}-ja2/m17n-docs;; esac; \
- done
+ cd ja/html; cp * ${WEBDIR}-ja2/m17n-docs
cp ${distdir}.tar.gz ${WEBDIR}/download
the default data installation path ${datadir} is "${prefix}/share",
and the default man installation path ${mandir} is "${prefix}/man".
-o LaTeX documents (m17n-lib.dvi and m17n-lib.ps) are installed in
+o PDF documents (m17n-lib.pdf and m17n-lib-ja.pdf) are installed in
"${datadir}/m17n/docs".
o HTML files are installed in "${datadir}/m17n/docs/html".
LaTeX files, they are not installed by the above procedure. Please
install the following files manually if you need them:
ja/html/*.html
- ja/latex/m17n-lib-ja.dvi
- ja/latex/m17n-lib-ja.ps
+ ja/latex/m17n-lib.pdf
+
+If you want to re-generate a PDF file, do this:
+ % cd usr/latex (or cd ja/latex)
+ % latex m17n-lib (or platex m17n-lib)
+ % makeindex m17n-lib
+ % latex m17n-lib (or platex m17n-lib)
+ % latex m17n-lib (or platex m17n-lib)
+ % dvipdfmx m17n-lib
See the file INSTALL for more detail.
----------------------------------------------------------------------
Copyright information
-Copyright (C) 2003, 2004, 2005, 2006, 2007
+Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H15PRO112
# Process this file with autoconf to produce a configure script.
-AC_INIT(m17n-docs, 1.5.2, bugs-m17n-lib@m17n.org)
+AC_INIT(m17n-docs, 1.5.5, bugs-m17n-lib@m17n.org)
AM_INIT_AUTOMAKE([-Wno-portability])
AM_MAINTAINER_MODE
AC_MSG_NOTICE([-------------------------------------------])
AC_MSG_NOTICE([Install documentations in these directories])
AC_MSG_NOTICE([-------------------------------------------])
-AC_MSG_NOTICE([ m17n-lib.dvi: ${dir}/m17n/docs])
-AC_MSG_NOTICE([ m17n-lib.ps: ${dir}/m17n/docs])
+AC_MSG_NOTICE([ m17n-lib.pdf: ${dir}/m17n/docs])
AC_MSG_NOTICE([ html files: ${dir}/m17n/docs/html])
eval dir=${mandir}
AC_MSG_NOTICE([ man files: ${dir}])
Used for handling local fonts.
-<li> fontconfig -- http://nexp.cs.pdx.edu/fontconfig/
+<li> fontconfig -- http://www.fontconfig.org/
Used for handling local fonts supported by the freetype library.
@htmlonly
<hr>
Copyright (C) 2001 Information-technology Promotion Agency (IPA)<p>
-Copyright (C) 2001-2007
+Copyright (C) 2001-2009
National Institute of Advanced Industrial Science and Technology (AIST)<p>
Permission is granted to copy, distribute and/or modify this document
.SH COPYRIGHT
Copyright (C) 2001 Information-technology Promotion Agency (IPA)
.br
-Copyright (C) 2001-2008 National Institute of Advanced Industrial Science and Technology (AIST)
+Copyright (C) 2001-2009 National Institute of Advanced Industrial Science and Technology (AIST)
.br
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License
.\" Copyright (C) 2001 Information-technology Promotion Agency (IPA)
-.\" Copyright (C) 2001-2008
+.\" Copyright (C) 2001-2009
.\" National Institute of Advanced Industrial Science and Technology (AIST)
.\" This file is part of the m17n library documentation.
.\" Permission is granted to copy, distribute and/or modify this document
\thispagestyle{empty}
\vspace*{\fill}
Copyright (C) 2001 Information-technology Promotion Agency (IPA)\\
-Copyright (C) 2001-2004 National Institute of Advanced Industrial Science and Technology (AIST)
+Copyright (C) 2001-2009 National Institute of Advanced Industrial Science and Technology (AIST)
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
-Invariant Section, Front-Cover Texts ``The m17n library
-documentation'', and no Back-Cover Texts. A copy of the license is
-included in the appendix entitled ``GNU Free Documentation License''.
+Invariant Section, with no Front-Cover Texts, and no Back-Cover Texts. A
+copy of the license is included in the appendix entitled
+``GNU Free Documentation License''.
}
%% Run the above hook in the back of the title page.
dir=`dirname $dir`
icon="$dir/icons/$base.png"
if [ -f "$icon" ] ; then
- [ -f "images/icon-$base.png" ] || cp "$icon" "images/icon-$base.png"
+ [ -f "images/icon-$base.png" ] || convert -resize 50% "$icon" "images/icon-$base.png"
fi
HEADER="<li> $base (language:$LNG name:$NAME @htmlonly"
# if test -n "$title"; then
# HEADER="$HEADER title:$title"
# fi
- HEADER2="<img src=\"icon-$base.png\" style=\"vertical-align:middle;\">"
+ HEADER2="<img src=\"icon-$base.png\" border=\"1\" style=\"vertical-align:middle;\">"
HEADER3="@endhtmlonly"
HEADER4=")"
fi
echo "$HEADER2"; echo "$HEADER3"; echo "$HEADER4"
fi
echo
- sed -n -e '/^;;;/ p' $FILE | sed -e '/^[^;]/ s/$/<br>/' -e '/^;;;/ s/^;;; *//' | sed -e 's,^||,<tr><td align="center">,' -e 's,||$,</td></tr>,' -e 's,|,</td><td align="center">,g'
+ echo "@htmlonly"
+ echo "<pre class=\"fragment\"><div class=\"fragment\">"
+ echo "@endhtmlonly"
+ sed -n -e '/^;;; *@/ s/;;; *\(.*\)/\1/p' \
+ -e '/^;;; *[^ @]/ s,;;; *\(.*\),\1@n,p' $FILE
+ echo "@htmlonly"
+ echo "</div></pre>"
+ echo "@endhtmlonly"
)
else
M17NDIR=/usr/share/m17n $IMDOC $FILE "$IM"
for f in $1/*-tut.txt; do
sed -n -e '/\/\*\*\*/,/\*\// p' < $f| \
- sed -e 's/@section/@subsection/' -e 's/@page/@section/' \
- -e 's,\[\[,<span class="fragment">,g' -e 's,\]\],</span>,g' \
- -e 's,<<,<span class="fragment">\<,g' -e 's,>>,\></span>,g'
+ sed -e 's/@section/@subsection/' -e 's/@page/@section/'
done
# Local Variables:
}
else
{
+ MConverter *converter = mconv_stream_converter (Mutf8, stdout);
int len = mtext_len (mt), i, c;
+ int has_non_ascii = 0;
+ if (mtext_ref_char (mt, len - 1) != '\n')
+ {
+ mtext_ins_char (mt, len, '\n', 1);
+ len ++;
+ }
+
for (i = 0; i < len; i++)
{
c = mtext_ref_char (mt, i);
if (c >= 0x100)
- break;
+ {
+ has_non_ascii = 1;
+ break;
+ }
}
- if (i < len)
- printf ("@htmlonly\n<div class=\"fragment\"><pre class=\"fragment\">\n");
- else
- printf ("@verbatim\n");
+ if (has_non_ascii)
+ printf ("@if FOR_HTML\n");
+ printf ("@verbatim\n");
mconv_encode_stream (Mutf8, mt, stdout);
- if (mtext_ref_char (mt, mtext_len (mt) - 1) != '\n')
- printf ("\n");
- if (i < len)
+ printf ("@endverbatim\n");
+ if (has_non_ascii)
{
- MConverter *converter = mconv_stream_converter (Mutf8, stdout);
- int from;
-
- printf ("</pre></div><p>\n@endhtmlonly\n");
- printf ("@latexonly\n\\begin{verbatim}\n");
- if (i > 0)
- mconv_encode_range (converter, mt, 0, i);
- for (from = i; i < len; i++)
+ printf ("@endif\n@if FOR_LATEX\n");
+ printf ("@verbatim\n");
+ for (i = 0; i < len; i++)
{
c = mtext_ref_char (mt, i);
if (c >= 0x100)
- {
- if (i > from)
- mconv_encode_range (converter, mt, from, i);
- printf ("U+%04X", c);
- from = i + 1;
- }
+ printf ("<U+%04X>", c);
+ else
+ putchar (c);
}
- if (i > from)
- mconv_encode_range (converter, mt, from, i);
- printf ("\\end{verbatim}\n@endlatexonly\n");
- mconv_free_converter (converter);
+ printf ("@endverbatim\n");
+ printf ("@endif\n");
}
- else
- printf ("@endverbatim\n");
+ mconv_free_converter (converter);
}
M17N_FINI ();
#!/bin/sh
-utils/ja_filter.rb $1 | iconv -f EUC-JP -t UTF-8
+case $1 in
+*dbdata.txt) utils/ja_filter.rb $1;;
+*) utils/ja_filter.rb $1 | iconv -f EUC-JP -t UTF-8;;
+esac
#!/bin/sh
# -*- coding: utf-8; -*-
# $1: target directory (usr/latex, ja/latex, or dev/latex)
-# $2: latex commnad (latex, platex, or pdflatex)
umask 002
USR_JA_DEV=`dirname $1`
-TEXINPUTS=`pwd`/styles:.:
-export TEXINPUTS
+cp styles/m17n-lib.sty $1
cd $1
-LATEX=$2
+LATEX=latex
if [ $USR_JA_DEV = "ja" ] ; then
LATEX=platex
if [ -d /usr/local/teTeX/bin ] ; then
PATH=/usr/local/teTeX/bin:$PATH
fi
- SOURCE=m17n-lib-ja
- echo '\appendix' > app.tex
- sed -n -e '/コンパイル/,/GFDL/ p' < refman.tex >> app.tex
+ echo '\\appendix' > app.tex
+ sed -n -e '/コンパイル/,/include{m17nDBFormat}/ p' \
+ -e '/Tutorial for writing/,/include{GFDL}/ p' \
+ -e '/printindex/,$ p' < refman.tex >> app.tex
sed -e '/documentclass/ s/a4paper/a4paper,twoside/' \
- -e '/コンパイル/,/GFDL/ d' \
- -e '/structMInputXIMArgIM/ r app.tex' \
- < refman.tex > ${SOURCE}.tex
+ -e '/inputenc/ d' \
+ -e '/コンパイル/,/include{GFDL}/ d' \
+ -e '/chapter{ファイル}/,$ d' < refman.tex > m17n-lib.tex
+ cat app.tex >> m17n-lib.tex
+ rm -rf tmp
+ mkdir tmp
+ for f in *; do
+ case "$f" in
+ m17nDBData.tex) ;;
+ *.tex) mv "$f" tmp; iconv -f utf-8 -t euc-jp < "tmp/$f" > "$f";;
+ *.sty) mv "$f" tmp; iconv -f utf-8 -t euc-jp < "tmp/$f" > "$f";;
+ esac
+ done
+ rm -rf tmp
elif [ $USR_JA_DEV = "dev" ] ; then
- SOURCE=m17n-lib-dev
sed -e '/documentclass/ s/a4paper/a4paper,twoside/' \
-e '/The m17n Library Module Index/,/pages/ d' \
-e '/The m17n Library File Documentation/,/textprop_8c/ d' \
-e '/The m17n Library Directory Documentation/,/dir_000001/ d' \
-e 's/The m17n Library Page Documentation/Appendix/' \
- < refman.tex > ${SOURCE}.tex
+ < refman.tex > m17n-lib.tex
else
- SOURCE=m17n-lib
echo '\\appendix' > app.tex
- sed -n -e '/Print compile/,/GFDL/ p' < refman.tex >> app.tex
+ sed -n -e '/Print compile/,/include{GFDL}/ p' \
+ -e '/printindex/,$ p' < refman.tex >> app.tex
sed -e '/documentclass/ s/a4paper/a4paper,twoside/' \
- -e '/Print compile/,/GFDL/ d' \
- -e '/structMInputXIMArgIM/ r app.tex' \
- < refman.tex > ${SOURCE}.tex
+ -e '/Print compile/,/include{GFDL}/ d' \
+ -e '/chapter{File Documentation}/,$ d' < refman.tex > m17n-lib.tex
+ cat app.tex >> m17n-lib.tex
fi
-${LATEX} ${SOURCE}.tex
-#if [ "${USR_JA_DEV}" = "ja" ] ; then
-# nkf -e < ${SOURCE}.idx > temp.idx; mv temp.idx ${SOURCE}.idx
-#fi
-/usr/bin/makeindex ${SOURCE}.idx
-${LATEX} ${SOURCE}.tex
-${LATEX} ${SOURCE}.tex
+${LATEX} m17n-lib.tex
+makeindex m17n-lib.idx
+${LATEX} m17n-lib.tex
+${LATEX} m17n-lib.tex