Re: Cannot find/open fonts -- executing oolatex



On May 9, 5:07 pm, Ulrike Fischer <ne...@xxxxxxxxxxx> wrote:
Is there a way to check for existing miktex roots and add new ones
from the command line?

I don't know. But there was a discussion in the "feature request" at
sourceforge:

https://sourceforge.net/tracker/index.php?func=detail&aid=1782418&gro....

(feature request 1782418).

Also you could look atftp://tug.ctan.org/pub/tex-archive/info/MiKTeX+Ghostscript+GSview+USB...

Thanks for the pointers. I didn't know that miktex has COM interface
now. Unfortunately, there seems to be no officially supported way to
add/remove miktex roots ATM. I could probably poke around in the
registry as in the second link that you gave but I think I will just
leave it up to the user to add tex4ht location to miktex roots after
installation.

I already have a working tex4ht installation script. It's a self-
contained batch file that uses only built-in windows commands so it
should be quite portable. It supports installation/uninstallation to a
user specified location (including miktex installation root). I tested
it on my machine and it seems to work fine - Eitan's equation+picture
test file compiles and opens in OO flawlessly. Also much bigger
document compiled without any errors, although, some content got
misrendered, e.g., tables squeezed down to one letter width or
equations like \left( {\frac{a}{b} } \right)^{ \frac{3}{2} } are
interpreted as \frac{(\frac{a}{b})^3}{2} (Eitan, if you are still out
there, do you still have a patiance for more of my questions).

Anyway, those issues are not installation related, so I post this
installation script in it's current form below (perhaps someone could
offer some web space, so people can easily download it).

A few final remarks. It works on NT based systems only, so users of
win98 and below are out of luck. Sorry. Shell scripting on NT is
already traumatic enough for me. All lines are numbered in case they
get wrapped in this post. Copy and paste them into a text editor and
unwrap all lines not starting with a number. Remove the bracketed
numbers and save it as 'install-tex4ht.bat'. If you are too lazy to do
it manually save it as 'install-tex4ht.txt' and from the command line
run (one line):
(for /f "tokens=1* delims=[]" %K in (install-tex4ht.txt) do @echo.
%L)>install-tex4ht.bat

OK, without the further ado, here's the installation script.

---------- INSTALL-TEX4HT.BAT
[1]::--------------------------------------------------------------------::
[2]::- *** TEX4HT installation script
*** -::
[3]::-
-::
[4]::-
Usage: -::
[5]::- *
Installation: -::
[6]::- install-
tex4ht.bat -::
[7]::- install-tex4ht.bat
install -::
[8]::- *
Uninstallation: -::
[9]::- install-tex4ht.bat
uninstall -::
[10]::-
-::
[11]::-
Remaks: -::
[12]::- * Installation script will prompt you for locations of
unzipped -::
[13]::- tex4ht.zip and newt4ht.zip files; you can to avoid that
by -::
[14]::- defining them in the configuration section of the
script -::
[15]::- * After installation created TDS (TeX Directory Structure)
tree -::
[16]::- has to be added to MiKTeX's roots (use MiKTeX's
Settings -::
[17]::- utility mo.exe). Alternatively, you can install to
MiKTeX's -::
[18]::- intallation directory but this is not recommended.
Refresh -::
[19]::- FNDB after
installation. -::
[20]::- * Uninstallation will leave behind created TDS
tree; -::
[21]::- delete it manually if
desired -::
[22]::--------------------------------------------------------------------::
[23]
[24]@echo off
[25]setlocal
[26]
[27]:: ******************** Configuration section
*********************** ::
[28]::unzipped tex4ht location
[29]set tex4ht_unzipped_dir=.\tex4ht-20070708
[30]::unzipped newt4ht location
[31]set newt4ht_unzipped_dir=.\newt4ht
[32]::tex4ht installation dir
[33]set tex4ht_install_dir=C:\texmf-local
[34]::change (Y) or not (N) the default <oo> script to <oo-alt>
[35]set use_oo-alt=Y
[36]::rollback if installation failed (Y/N)
[37]::(removes only texh4ht and leaves created TDS tree behind)
[38]set rollback=N
[39]::
****************************************************************** ::
[40]
[41]if not "%OS%"=="Windows_NT" goto requireNT
[42]for %%G in (xcopy.exe) do if "%%~$PATH:G"=="" goto :noxcopy
[43]
[44]call :help
[45]for %%G in (tex4ht_unzipped_dir newt4ht_unzipped_dir
tex4ht_install_dir) do (
[46] call :setupdirs %%G
[47] if not defined %%G goto :abort
[48])
[49]goto %1 :install
[50]
[51]for %%G in (%tex4ht_install_dir%\tex4ht\base\win32\tex4ht.env
%tex4ht_install_dir%\scripts\tex4ht\bat\*.bat) do (
[52] call %% > nul
[53] REM && move /Y %%G.tmp %%G || goto :copyerror
[54])
[55]
[56]:install
[57]set "copyopt=/I /S /Y /D"
[58]xcopy.exe %newt4ht_unzipped_dir%\texmf\tex4ht %tex4ht_install_dir%
\tex4ht %copyopt% || goto :copyerror
[59]xcopy.exe %newt4ht_unzipped_dir%\texmf\tex\generic\tex4ht
%tex4ht_install_dir%\tex\generic\tex4ht %copyopt% || goto :copyerror
[60]xcopy.exe %tex4ht_unzipped_dir%\texmf\tex4ht\ht-fonts
%tex4ht_install_dir%\tex4ht\ht-fonts %copyopt% || goto :copyerror
[61]xcopy.exe %tex4ht_unzipped_dir%\bin\win32\*.bat %tex4ht_install_dir
%\scripts\tex4ht\bat %copyopt% || goto :copyerror
[62]echo Search and replace "c:\tex4ht\texmf\" with
"%tex4ht_install_dir%"
[63]for %%G in (%tex4ht_install_dir%tex4ht\base\win32\tex4ht.env
%tex4ht_install_dir%scripts\tex4ht\bat\*.bat) do (
[64] call :replstr %%G "c:\tex4ht\texmf\" "%tex4ht_install_dir%"
[65])
[66]if /i "%use_oo-alt%"=="Y" (
[67] echo Search and replace "oo>" with "oo-bak>"
[68] call :replstr %tex4ht_install_dir%tex4ht\base\win32\tex4ht.env
"oo>" "oo-bak>"
[69] echo Search and replace "oo-alt>" with "oo>"
[70] call :replstr %tex4ht_install_dir%tex4ht\base\win32\tex4ht.env
"oo-alt>" "oo>"
[71])
[72]echo To finish installation add "%tex4ht_install_dir%" to MiKTeX
roots and refresh FNDB
[73]pause
[74]goto :eof
[75]
[76]
[77]:uninstall
[78]echo Uninstalling TEH4HT...
[79]for %%H in (%tex4ht_install_dir%tex4ht %tex4ht_install_dir%tex
\generic\tex4ht %tex4ht_install_dir%scripts\tex4ht) do (
[80] if exist "%%~H\" (
[81] echo Removing "%%~H\"
[82] rmdir /S /Q "%%~H\"
[83] )
[84])
[85]echo Uninstallation complete
[86]pause
[87]goto :eof
[88]
[89]:help
[90]findstr "^::-" %~sf0
[91]goto :eof
[92]
[93]:setupdirs
[94]::let's make sure that dirs are in short format
[95]for /f "tokens=1* delims==" %%H in ('set %1 2^>^&1') do set
"$cratchVar=%%~sfI"
[96]if defined $cratchVar set "$cratchVar=%$cratchVar%\"
[97]if not exist "%$cratchVar%" (set /p $cratchVar=%1=)
[98]if not exist "%$cratchVar%" (
[99] set "$cratchVar="
[100] set /p $cratchVar=Specified directory does not exist. Retry? [y/
n]:
[101] set $cratchVar | findstr /i "=y\>" >nul && goto :setupdirs ||
set "$cratchVar="
[102])
[103]set %1=%$cratchVar%
[104]goto :eof
[105]
[106]:replstr <file name> <search string> <replace string>
[107]setlocal
[108]echo.%1
[109]for /f "tokens=1* delims=[]" %%K in ('find /n /v "" "%~1"') do (
[110] set lineNo=0000%%K
[111] set "txtline==%%L"
[112] REM This may break if txtline contains poison characters
[113] REM together with quotation characters
[114] call set "txtline.%%lineNo:~-4%%=%%txtline:%~2=%~3%%"
[115])
[116]::echo from for command so we don't get screwed by poison
characters
[117]>"%~1" (for /f "tokens=1* delims==" %%K in ('set txtline.') do
echo.%%L)
[118]goto :eof
[119]
[120]:copyerror
[121]>&2 echo There were some errors while copying files. Make sure
that correct installation directories are specified.
[122]>&2 echo Aborting installation.
[123]if /i "%rollback%"=="Y" call :uninstall
[124]pause
[125]exit /b 1
[126]
[127]:abort
[128]>&2 echo Aborting installation.
[129]pause
[130]exit /b 1
[131]
[132]:requireNT
[133]>&2 echo This script requires Windows NT based system. Sorry.
[134]pause
[135]exit /b 1
[136]
[137]:noxcopy
[138]>&2 echo No xcopy command? Aborting installation, please don't
hate me.
[139]pause
[140]exit /b 1
.



Relevant Pages

  • Re: CPU Node board failure on Origin 2000
    ... you'll have a single machine. ... I cant believe that you can run a system which uses partition without the MMSC because the MMSC is needed to shotdown and restart a specific partion. ... This looks like and older IRIX installation because latest PROM is 6.156 from Nov 18, ... So you have to asign the ids manually by enter the command line modus from the maintenance menu. ...
    (comp.sys.sgi.hardware)
  • Re: How can i install and boot to MS-DOS
    ... Debug is an ancient command that is included in almost all versions of MS-DOS, is it part of your DOS installation? ... Another way of creating the multi-boot is to start a Windows XP installation from the up and booted MS-DOS installation and then aborting the installation before the first reboot. ... To launch the XP setup from DOS insert the CD in the drive and navigate to the i386 directory and launch the Winnt command. ...
    (microsoft.public.windowsxp.setup_deployment)
  • Re: Windows XP boots to background only, no start button, no icons
    ... I tried the cacls command for explorer.exe and it showed that users & power ... about not having the right permissions. ... but I can access my task manager. ... use your system CD to do a repair installation. ...
    (microsoft.public.windowsxp.general)
  • Re: Workgroup inaccessible until connection is reset
    ... But when I try to access "view workgroup ... damage that is almost impossible to repair. ... a repair installation of Windows XP, ... Repair the IP stack with the Repair command or with the command: ...
    (microsoft.public.windowsxp.network_web)
  • Re: hal.dll and repair problems
    ... > Please bear with me as English is not my mother language and my technical ... > does not ask me to choose which installation to repair. ... The "dir" command is recognised, tries to run, but then gives a ...
    (microsoft.public.windowsxp.general)