Reference Book - Handbook Home, Back, and Copy buttons don't work - Сообщения
Using Windows version
WroteIn the Handbook included in the Reference Book (portable version), the Home button appears to do nothing. The Back button works like hitting the backspace key. The copy button seems to work correctly. Excellent handbook by the way.
Using Windows version
Thanks for the feedback.
Some of these problems may be due to the fact that the external handbook pages are in edit mode. One can switch them to read only state in the file properties dialog but I am not going to do that manually for more than 400 pages. Here, some sort of batch file would be handy, to do the required source mod automatically. This also would enable following links just by clicking them instead of CTRL-Click. Volunteers to write such a script are welcome. I promise to apply it to the pages before publishing them in the portable distribution. One could even think of an export filter for TortoiseSVN.
Currently, the handbook is just a reverse engineered extension to the built-in math reference book without any official support by the main program, except some editing improvements in the last smath update in summer.
In the future, I would recommend/expect:
- jumping to the corresponding function description using F1 if on a function name (much like invoking the dynamic assistant using F12
- Seach capability within documents and in the help system
- Better support for editing links (currently, this is xml source editing)
- Sort of automatic table of contents based on directory hierarchy (currently, all up-, down- and crosslinking is done manually)
WroteSome of these problems may be due to the fact that the external handbook pages are in edit mode. One can switch them to read only state in the file properties dialog but I am not going to do that manually for more than 400 pages.
You can do it easily using this program: FAR
Because the
best regards,
Davide
It's actually two scripts, the .bat file calls the .vbs and they must be in the same folder. I'm sure it could be done from one .vbs but I didn't want to take the time.
Usage: MakeAllSMfilesReadOnly
where
I assigned a right-click Send To command shortcut to it so I can just right-click the folder and Send to, Make SM files read only.
In case I cannot attach the files the code is also included below. Code is between separators ===...
MakeAllSMfilesReadOnly.bat
===========================================
@echo off
:: This script makes an SMath file read-only by adding the string
:: to the
Title=Make all SMath files in folder %1 read-only...
set spath=%~dp0
:: Might need to uncomment below for older systems
rem setlocal EnableExtensions
set ATTR=%~a1
set DIRATTR=%ATTR:~0,1%
rem endlocal
:: If %1 is a folder then continue
if /i "%DIRATTR%"=="d" (
echo.
echo Are you sure? [read title of this window - Ctrl-C to cancel]
echo.
pause
%~d1
cd %1
setlocal EnableDelayedExpansion
for /f "delims=|" %%i IN ('dir /b %1\*.sm') DO (
set smfile="%%i"
echo.
echo Processing file [ %%i ]...
echo.
For /F "Delims=" %%j In ('Attrib !smfile!') Do Set _Attribs=%%j
:: Remove read-only attribute, if set
If "!_Attribs:~5,1!"=="R" Attrib -R !smfile!
cscript "%spath%read-only-sm-file.vbs" !smfile!
:: Set read-only attribute
Attrib +R !smfile!
)
endlocal
) else (
echo.
echo %1 is NOT a folder
echo.
)
pause
:EOF
===========================================
read-only-sm-file.vbs
===========================================
' Modify SMath .sm file to make it read-only
Const ForReading = 1
Const ForWriting = 2
strFileName = Wscript.Arguments(0)
strOldText = "
strNewText = "
On Error Resume Next
lngCount = Wscript.Arguments(3)
If Err.Number <> 0 Then lngCount = -1
On Error Goto 0
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strFileName, ForReading)
strText = objFile.ReadAll
objFile.Close
If Instr(1, strText, strOldText) > 0 Then
strNewText = Replace(strText, strOldText, strNewText, 1, lngCount)
Set objFile = objFSO.OpenTextFile(strFileName, ForWriting)
objFile.Write strNewText 'WriteLine adds extra CR/LF
objFile.Close
End If
===========================================
- links are activated by click instead of ctrl-click
- Buttons in the reference manual window are inactive
But:
- Nothing is re-calculated
- Plot regions are empty
- computed links (e.g. in the plugin index) are not updated according to the given installation
- Manual re-calculation does not work.
It might be a matter of taste, if this is an improvement. My personal preference is to still have an "active" book with the ctrl-click-drawback.
Andrey, do you see an option to resolve this?
Judging from the above discussion, the interactive nature of the handbook is not supported by design of the application. Is that correct? If so, maybe adding a specific feature request is justified?
WroteStill no love for back button after two years. In current version (0.97) the buttons in included Reference book work as expected, but not in the "Interactive SMath Handbook".
Judging from the above discussion, the interactive nature of the handbook is not supported by design of the application. Is that correct? If so, maybe adding a specific feature request is justified?
The interactive handbook is based on reverse engineering of the built-in math reference book. Andrey has supported the interactive handbook by implementing some improvements for handling text regions with links. Davide's text region utilities helped a lot in simpler writing of handbook pages.
There is a function index, where all the pages have file names matching the function names. Thus, in principle, Andrey could offer you to open the appropriate file if you press F1 when the cursor is on a function name. But that is not implemented.
-
Новые сообщения
-
Нет новых сообщений