diff options
author | Karl Berry <karl@freefriends.org> | 2007-01-09 01:47:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-01-09 01:47:03 +0000 |
commit | 7e6a400b101b2d20930213dfd0b8e90969e3da1d (patch) | |
tree | 3b394627fb268561f36387333163e5af1368e1b3 /Build | |
parent | ac54b3e8d8a00592eba61f92e43c8dadae2dd432 (diff) |
tex4ht 1.0.2007_01_08_1711
git-svn-id: svn://tug.org/texlive/trunk@3262 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rwxr-xr-x | Build/source/texk/tex4htk/htcontext | 6 | ||||
-rwxr-xr-x | Build/source/texk/tex4htk/htlatex | 4 | ||||
-rwxr-xr-x | Build/source/texk/tex4htk/htmex | 4 | ||||
-rwxr-xr-x | Build/source/texk/tex4htk/httex | 4 | ||||
-rwxr-xr-x | Build/source/texk/tex4htk/httexi | 4 | ||||
-rwxr-xr-x | Build/source/texk/tex4htk/mk4ht | 10 | ||||
-rw-r--r-- | Build/source/texk/tex4htk/t4ht.c | 93 |
7 files changed, 92 insertions, 33 deletions
diff --git a/Build/source/texk/tex4htk/htcontext b/Build/source/texk/tex4htk/htcontext index 9d6d4549574..9e01fa97f66 100755 --- a/Build/source/texk/tex4htk/htcontext +++ b/Build/source/texk/tex4htk/htcontext @@ -1,7 +1,7 @@ #!/bin/sh - texexec --arg="ht-1=$2" --use=tex4ht $5 $1 - tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 - t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644 + texexec --arg="ht-1=$2" --use=tex4ht --dvi --nobackend $5 $1 + tex4ht \dirchar $1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 + t4ht \dirchar $1 $4 ## -d~/WWW/temp/ -m644 diff --git a/Build/source/texk/tex4htk/htlatex b/Build/source/texk/tex4htk/htlatex index 1b8b7cea74a..ebab47dbaa6 100755 --- a/Build/source/texk/tex4htk/htlatex +++ b/Build/source/texk/tex4htk/htlatex @@ -2,8 +2,8 @@ latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1 latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1 latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1 - tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 - t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644 + tex4ht \dirchar $1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 + t4ht \dirchar $1 $4 ## -d~/WWW/temp/ -m644 diff --git a/Build/source/texk/tex4htk/htmex b/Build/source/texk/tex4htk/htmex index b4aa3d9a06e..485a7594468 100755 --- a/Build/source/texk/tex4htk/htmex +++ b/Build/source/texk/tex4htk/htmex @@ -2,8 +2,8 @@ mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1 mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1 mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1 - tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 - t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644 + tex4ht \dirchar $1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 + t4ht \dirchar $1 $4 ## -d~/WWW/temp/ -m644 diff --git a/Build/source/texk/tex4htk/httex b/Build/source/texk/tex4htk/httex index 44920e72077..4c184897d13 100755 --- a/Build/source/texk/tex4htk/httex +++ b/Build/source/texk/tex4htk/httex @@ -2,8 +2,8 @@ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1 tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1 tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1 - tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 - t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644 + tex4ht \dirchar $1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 + t4ht \dirchar $1 $4 ## -d~/WWW/temp/ -m644 diff --git a/Build/source/texk/tex4htk/httexi b/Build/source/texk/tex4htk/httexi index 0ce3cb4a589..26427698991 100755 --- a/Build/source/texk/tex4htk/httexi +++ b/Build/source/texk/tex4htk/httexi @@ -2,8 +2,8 @@ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1 tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1 tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1 - tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 - t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644 + tex4ht \dirchar $1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 + t4ht \dirchar $1 $4 ## -d~/WWW/temp/ -m644 # texindex ? diff --git a/Build/source/texk/tex4htk/mk4ht b/Build/source/texk/tex4htk/mk4ht index 0f4b664506c..2bd1f7e2038 100755 --- a/Build/source/texk/tex4htk/mk4ht +++ b/Build/source/texk/tex4htk/mk4ht @@ -1,7 +1,7 @@ #!/usr/bin/env perl #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -# mk4ht 2006-08-28-20:45 % -# Copyright (C) 2003--2006 Eitan M. Gurari % +# mk4ht 2007-01-04-01:34 % +# Copyright (C) 2003--2007 Eitan M. Gurari % # % # % # This work may be distributed and/or modified under the % @@ -58,6 +58,10 @@ my @options = ( "js", "jstex", "tex", "xhtml,jsml", " -cjsmlhtf", "-cjsml", "js", "jstexi", "texi", "xhtml,jsml", " -cjsmlhtf", "-cjsml", "js", "jscontext", "context", "xhtml,jsml", " -cjsmlhtf", "-cjsml", + "jm", "jmlatex", "latex", "xhtml,jsmath", " -cmozhtf", "", + "jm", "jmtex", "tex", "xhtml,jsmath", " -cmozhtf", "", + "jm", "jmtexi", "texi", "xhtml,jsmath", " -cmozhtf", "", + "jm", "jmcontext", "context", "xhtml,jsmath", " -cmozhtf", "", "tei", "teilatex", "latex", "xhtml,tei", " -cunihtf", "-cvalidate", "tei", "teitex", "tex", "xhtml,tei", " -cunihtf", "-cvalidate", "tei", "teitexi", "texi", "xhtml,tei", " -cunihtf", "-cvalidate", @@ -178,7 +182,7 @@ print " clean.htlatex lg tmp\n"; } -print "mk4ht (2006-08-28-20:45)\n"; +print "mk4ht (2007-01-04-01:34)\n"; if( !@ARGV ){ print "improper command\n"; showInstrucions(); exit(1); diff --git a/Build/source/texk/tex4htk/t4ht.c b/Build/source/texk/tex4htk/t4ht.c index f2c9032bdde..cc69ab3bffd 100644 --- a/Build/source/texk/tex4htk/t4ht.c +++ b/Build/source/texk/tex4htk/t4ht.c @@ -1,7 +1,7 @@ /**********************************************************/ -/* t4ht.c 2006-09-13-14:28 */ -/* Copyright (C) 1998--2006 Eitan M. Gurari */ +/* t4ht.c 2007-01-05-03:17 */ +/* Copyright (C) 1998--2007 Eitan M. Gurari */ /* */ /* This work may be distributed and/or modified under the */ /* conditions of the LaTeX Project Public License, either */ @@ -388,6 +388,7 @@ static Q_CHAR *Dotfield = Q_NULL; static Q_CHAR *dir = Q_NULL; static Q_CHAR *lg_name = Q_NULL, tmp_name[255], job_name[255]; static Q_CHAR *nopict = Q_NULL; +static Q_CHAR *bitmaps_no_dm = Q_NULL; static BOOL newchmod = FALSE; static Q_CHAR *noreuse = Q_NULL; @@ -439,6 +440,7 @@ static C_CHAR *warn_err_mssg[]={ "\n--------------------------------------------------------------------\n" "t4ht [-f<dir char>]filename ...\n" +" -b ignore -d -m -M for bitmaps\n" " -c... choose named segment in env file\n" " -d... directory for output files (default: current)\n" " -e... location of tex4ht.env\n" @@ -653,6 +655,12 @@ static void execute_script #endif { struct script_struct* temp; Q_CHAR *p, *q, *t; + +#ifdef KPATHSEA +char * texmf = (char *) kpse_var_value( "SELFAUTOPARENT" ); +#endif + + temp = script; system_return = 0; while( temp ){ @@ -661,7 +669,9 @@ q = command; while( *p != '\0' ){ *q = *(p++); if( (*q == '%') && (*p == '%') - && ((*(p+1) == '%') || ( (*(p+1) >= '0') && (*(p+1) < '5') ) ) + && ( (*(p+1) == '%') + || (*(p+1) == '~') + || ( (*(p+1) >= '0') && (*(p+1) < '5') ) ) ){ p++; switch( *(p++) ){ case '%':{ q++; break; } @@ -675,6 +685,19 @@ while( *p != '\0' ){ while( *t != '\0' ){ *(q++) = *(t++); } break; } case '4':{ t = match_4; while( *t != '\0' ){ *(q++) = *(t++); } break; } + case '~':{ +#ifdef KPATHSEA + if( texmf ){ + t = texmf; + while( *t != '\0' ){ *(q++) = *(t++); } + } else { + *(q++) = '~'; + } +#else + *(q++) = '~'; +#endif + + break; } default: { } }} else { q++; } } @@ -893,7 +916,7 @@ char *get_env_dir Q_CHAR *p; if(! progname || ! *progname) return NULL; i = (int) strlen(progname); - while( (progname[--i] != dir_path_slash(progname) ) + while( (progname[--i] != (int) dir_path_slash(progname) ) && i > 0) ; if(i == 0) return NULL; p = (Q_CHAR *) malloc(i+12); @@ -1425,17 +1448,48 @@ SetConsoleCtrlHandler((PHANDLER_ROUTINE)sigint_handler, TRUE); (IGNORED) printf("----------------------------\n"); #ifndef KPATHSEA #ifdef PLATFORM - (IGNORED) printf("t4ht.c (2006-09-13-14:28 %s)\n",PLATFORM); + (IGNORED) printf("t4ht.c (2007-01-05-03:17 %s)\n",PLATFORM); #else - (IGNORED) printf("t4ht.c (2006-09-13-14:28)\n"); + (IGNORED) printf("t4ht.c (2007-01-05-03:17)\n"); #endif #else #ifdef PLATFORM - (IGNORED) printf("t4ht.c (2006-09-13-14:28 %s kpathsea)\n",PLATFORM); + (IGNORED) printf("t4ht.c (2007-01-05-03:17 %s kpathsea)\n",PLATFORM); #else - (IGNORED) printf("t4ht.c (2006-09-13-14:28 kpathsea)\n"); -#endif -#endif + (IGNORED) printf("t4ht.c (2007-01-05-03:17 kpathsea)\n"); +#endif +#endif + + +{ int i, count = 0; + for(i=0; i<argc; i++){ + Q_CHAR *p = argv[i]; + count++; + if( (*p == '\'') || (*p == '\"') ){ + int cnt; + int len = 0; + for( cnt=i; cnt < argc; cnt++ ){ + len += (int) strlen(argv[cnt]); + if( *(argv[cnt] + (int) strlen(argv[cnt]) -1) == *p ){ + Q_CHAR * arg = m_alloc(char, len + cnt - i + 1); + Q_CHAR * toArg = arg; + Q_CHAR *pp; + i--; + do { + pp = argv[++i]; + while( *pp != '\0' ){ + if( *pp != *p ){ *(toArg++) = *pp; } + pp++; + } + *(toArg++) = ' '; + } while ( i != cnt ); + *(toArg-1) = '\0'; + argv[count-1] = arg; + break; + } } } } + argc = count; +} + { int i; for(i=0; i<argc; i++){ @@ -1483,7 +1537,7 @@ system( yes ) != 0 for(i=1; i<argc; i++){ if( *( p=argv[i] ) == '-' ){ if( (int) strlen( argv[i] ) == 2 ){ - if( (*(p+1)!='i') && (*(p+1) != 'p') && (*(p+1) != 'r') ) + if( (*(p+1)!='i') && (*(p+1) != 'p') && (*(p+1) != 'r') && (*(p+1) != 'b') ) { if( ++i == argc ) bad_arg; } q = argv[i]; } else q = p+2; @@ -1499,6 +1553,7 @@ switch( *(p+1) ){ break; } case 'X':{ Xfield = q; break;} + case 'b':{ bitmaps_no_dm = q-1; break;} case 'c':{ struct env_c_rec *temp = (struct env_c_rec*) m_alloc(struct env_c_rec, (int) 1); @@ -2441,7 +2496,7 @@ struct script_struct Q_CHAR filename[255]; FILE* file; (IGNORED) strcpy(filename, ""); -if( dir ){ (IGNORED) strct(filename, dir); } +if( dir && !bitmaps_no_dm ){ (IGNORED) strct(filename, dir); } (IGNORED) strct(filename, match[3]); file = fopen(filename, READ_TEXT_FLAGS); if( !file || noreuse ){ @@ -2452,10 +2507,10 @@ filtered_dvigif_script = dvigif_glyp_script? (void) execute_script( filtered_dvigif_script,match[1],match[2],match[3],job_name); (void) free_script( filtered_dvigif_script ); -if( dir && !system_return ){ +if( dir && !bitmaps_no_dm && !system_return ){ (void) execute_script(move_script,match[3],dir,".",""); -if( ch_mod && !system_return ){ +if( ch_mod && !bitmaps_no_dm && !system_return ){ (void) execute_script(chmod_script, ch_mod, dir?dir:"",match[3], ""); } @@ -2467,7 +2522,7 @@ if( ch_mod && !system_return ){ (IGNORED) fclose(file); if( newchmod ) { -if( ch_mod && !system_return ){ +if( ch_mod && !bitmaps_no_dm && !system_return ){ (void) execute_script(chmod_script, ch_mod, dir?dir:"",match[3], ""); } @@ -2485,8 +2540,8 @@ empty_pic->n if( !skip ){ (void) execute_script(empty_fig_script, - dir? dir :"", match[3],"",""); - if( ch_mod && !system_return ){ + (dir && !bitmaps_no_dm )? dir :"", match[3],"",""); + if( ch_mod && !bitmaps_no_dm && !system_return ){ (void) execute_script(chmod_script, ch_mod, dir?dir:"",match[3], ""); } @@ -2501,10 +2556,10 @@ filtered_dvigif_script = filterGifScript(dvigif_script, match[3]); (void) execute_script( filtered_dvigif_script,match[1],match[2],match[3],job_name); (void) free_script( filtered_dvigif_script ); -if( dir && !system_return ){ +if( dir && !bitmaps_no_dm && !system_return ){ (void) execute_script(move_script,match[3],dir,".",""); } -if( ch_mod && !system_return ){ +if( ch_mod && !bitmaps_no_dm && !system_return ){ (void) execute_script(chmod_script, ch_mod, dir?dir:"",match[3], ""); } |