Skip to content

Commit

Permalink
v1.59 aka v1.60 beta
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan-LeRoux committed Apr 28, 2021
1 parent 04df3be commit d24ac8a
Show file tree
Hide file tree
Showing 40 changed files with 4,467 additions and 2,124 deletions.
20 changes: 10 additions & 10 deletions AboutBox.frm
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
VERSION 5.00
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} AboutBox
Caption = "IguanaTex"
ClientHeight = 5172
ClientHeight = 5286
ClientLeft = 48
ClientTop = 330
ClientWidth = 8820.001
ClientWidth = 8790.001
OleObjectBlob = "AboutBox.frx":0000
StartUpPosition = 1 'CenterOwner
End
Expand All @@ -13,23 +13,23 @@ Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub CloseAboutButton_Click()
Unload AboutBox
End Sub


Private Sub LabelURL_Click()
Link = "http://www.jonathanleroux.org/software/iguanatex/"
Dim lSuccess As Long
lSuccess = ShellExecute(0, "Open", Link)

If (lSuccess = 0) Then
MsgBox "Cannot open " & Link
End If
OpenURL "http://www.jonathanleroux.org/software/iguanatex/"
End Sub

Private Sub UserForm_Initialize()
Me.Top = Application.Top + 110
Me.Left = Application.Left + 25

Me.Height = 288
Me.Width = 448
Me.LabelAuthors.Caption = "by Jonathan Le Roux and Zvika Ben-Haim" & NEWLINE & NEWLINE & "Mac version by Tsung-Ju Chiang and Jonathan Le Roux"
#If Mac Then
ResizeUserForm Me
#End If
End Sub
Binary file modified AboutBox.frx
Binary file not shown.
2 changes: 2 additions & 0 deletions AppEventHandler.cls
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
'@MemberAttribute VB_VarHelpID, -1
Public WithEvents App As Application
Attribute App.VB_VarHelpID = -1

Expand Down
73 changes: 73 additions & 0 deletions AppleScript/IguanaTex.scpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
on ReadAllExternal(filename)
return read filename as «class utf8»
end ReadAllExternal

on MacChooseFileOfType(typesStr)
local typeList

set backup to AppleScript's text item delimiters
set AppleScript's text item delimiters to {","}
set typeList to every text item of typesStr
set AppleScript's text item delimiters to backup

try
return POSIX path of (choose file of type typeList)
on error number -128
# user cancelled
return ""
end try
end MacChooseFileOfType

on MacChooseFile(defaultValue)
try
try
return POSIX path of (choose file default location defaultValue)
on error number -1700
# file not exist
return POSIX path of (choose file)
end try
on error number -128
# user cancelled
return defaultValue
end try
end MacChooseFile

on MacChooseApp(defaultValue)
try
return (choose application)'s id
on error number -128
# user cancelled
return defaultValue
end try
end MacChooseApp

on MacChooseFolder(defaultValue)
try
try
return POSIX path of (choose folder default location defaultValue)
on error number -1700
# file not exist
return POSIX path of (choose folder)
end try
on error number -128
# user cancelled
return defaultValue
end try
end MacChooseFolder

on MacExecute(command)
try
do shell script command
return 0
on error number exitStatus
return exitStatus
end try
end MacExecute

on MacSetClipboard(str)
set the clipboard to str
end MacSetClipboard

on MacGetClipboard()
return the clipboard as string
end MacGetClipboard
110 changes: 55 additions & 55 deletions BatchEditForm.frm
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
VERSION 5.00
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} BatchEditForm
Caption = "Batch edit"
ClientHeight = 5952
ClientHeight = 5964
ClientLeft = 48
ClientTop = 378
ClientWidth = 4710
ClientWidth = 4950
OleObjectBlob = "BatchEditForm.frx":0000
StartUpPosition = 1 'CenterOwner
End
Expand All @@ -13,41 +13,41 @@ Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim RegPath As String
Dim LaTexEngineDisplayList As Variant

Option Explicit

Private Sub UserForm_Initialize()
LoadSettings
Me.Top = Application.Top + 110
Me.Left = Application.Left + 25

Me.Height = 322
Me.Width = 256
#If Mac Then
ResizeUserForm Me
#End If
End Sub

Private Sub LoadSettings()
RegPath = "Software\IguanaTex"
LaTexEngineDisplayList = Array("latex (DVI)", "pdflatex", "xelatex", "lualatex", "platex")
ComboBoxLaTexEngine.List = LaTexEngineDisplayList
ComboBoxLaTexEngine.ListIndex = GetRegistryValue(HKEY_CURRENT_USER, RegPath, "LaTeXEngineID", 0)
ComboBoxLaTexEngine.List = GetLaTexEngineDisplayList()
ComboBoxLaTexEngine.ListIndex = GetITSetting("LaTeXEngineID", 0)
TextBoxTempFolder.Text = GetTempPath()
'CheckBoxEMF.Value = CBool(GetRegistryValue(HKEY_CURRENT_USER, RegPath, "EMFoutput", False))
ComboBoxBitmapVector.List = Array("Bitmap", "Vector")
ComboBoxBitmapVector.ListIndex = GetRegistryValue(HKEY_CURRENT_USER, RegPath, "BitmapVector", 0)
'CheckBoxEMF.Value = CBool(GetITSetting("EMFoutput", False))
ComboBoxBitmapVector.List = GetBitmapVectorList()
ComboBoxBitmapVector.ListIndex = GetITSetting("BitmapVector", 0)

TextBoxLocalDPI.Text = GetRegistryValue(HKEY_CURRENT_USER, RegPath, "OutputDpi", "1200")
textboxSize.Text = GetRegistryValue(HKEY_CURRENT_USER, RegPath, "PointSize", "20")
checkboxTransp.Value = CBool(GetRegistryValue(HKEY_CURRENT_USER, RegPath, "Transparent", True))
CheckBoxResetFormat.Value = False
TextBoxLocalDPI.Text = GetITSetting("OutputDpi", "1200")
textboxSize.Text = GetITSetting("PointSize", "20")
checkboxTransp.value = CBool(GetITSetting("Transparent", True))
CheckBoxResetFormat.value = False

CheckBoxModifyEngine.Value = False
CheckBoxModifyTempFolder.Value = False
CheckBoxModifyBitmapVector.Value = False
CheckBoxModifyLocalDPI.Value = False
CheckBoxModifySize.Value = False
CheckBoxModifyPreserveSize.Value = False
CheckBoxModifyTransparency.Value = False
CheckBoxModifyResetFormat.Value = False
CheckBoxReplace.Value = False
CheckBoxModifyEngine.value = False
CheckBoxModifyTempFolder.value = False
CheckBoxModifyBitmapVector.value = False
CheckBoxModifyLocalDPI.value = False
CheckBoxModifySize.value = False
CheckBoxModifyPreserveSize.value = False
CheckBoxModifyTransparency.value = False
CheckBoxModifyResetFormat.value = False
CheckBoxReplace.value = False
Apply_CheckBoxModifyEngine
Apply_CheckBoxModifyTempFolder
Apply_CheckBoxModifyBitmapVector
Expand All @@ -59,10 +59,12 @@ Private Sub LoadSettings()
Apply_CheckBoxReplace
End Sub

Sub ButtonRun_Click()
Public Sub ButtonRun_Click()
BatchEditForm.Hide

Call RegenerateSelectedDisplays
Dim Sel As Selection
Set Sel = Application.ActiveWindow.Selection

RegenerateSelectedDisplays Sel

Unload BatchEditForm
End Sub
Expand Down Expand Up @@ -110,49 +112,49 @@ Private Sub CheckBoxReplace_Click()
End Sub

Private Sub Apply_CheckBoxModifyEngine()
LabelEngine.Enabled = CheckBoxModifyEngine.Value
ComboBoxLaTexEngine.Enabled = CheckBoxModifyEngine.Value
LabelEngine.Enabled = CheckBoxModifyEngine.value
ComboBoxLaTexEngine.Enabled = CheckBoxModifyEngine.value
End Sub

Private Sub Apply_CheckBoxModifyTempFolder()
LabelTempFolder.Enabled = CheckBoxModifyTempFolder.Value
TextBoxTempFolder.Enabled = CheckBoxModifyTempFolder.Value
LabelTempFolder.Enabled = CheckBoxModifyTempFolder.value
TextBoxTempFolder.Enabled = CheckBoxModifyTempFolder.value
End Sub

Private Sub Apply_CheckBoxModifyBitmapVector()
LabelOutput.Enabled = CheckBoxModifyBitmapVector.Value
ComboBoxBitmapVector.Enabled = CheckBoxModifyBitmapVector.Value
LabelOutput.Enabled = CheckBoxModifyBitmapVector.value
ComboBoxBitmapVector.Enabled = CheckBoxModifyBitmapVector.value
End Sub

Private Sub Apply_CheckBoxModifyLocalDPI()
LabelLocalDPI.Enabled = CheckBoxModifyLocalDPI.Value
TextBoxLocalDPI.Enabled = CheckBoxModifyLocalDPI.Value
LabelDpi.Enabled = CheckBoxModifyLocalDPI.Value
LabelLocalDPI.Enabled = CheckBoxModifyLocalDPI.value
TextBoxLocalDPI.Enabled = CheckBoxModifyLocalDPI.value
LabelDpi.Enabled = CheckBoxModifyLocalDPI.value
End Sub

Private Sub Apply_CheckBoxModifySize()
LabelSize.Enabled = CheckBoxModifySize.Value
textboxSize.Enabled = CheckBoxModifySize.Value
LabelPTS.Enabled = CheckBoxModifySize.Value
LabelSize.Enabled = CheckBoxModifySize.value
textboxSize.Enabled = CheckBoxModifySize.value
LabelPTS.Enabled = CheckBoxModifySize.value
End Sub

Private Sub Apply_CheckBoxModifyPreserveSize()
CheckBoxForcePreserveSize.Enabled = CheckBoxModifyPreserveSize.Value
CheckBoxForcePreserveSize.Enabled = CheckBoxModifyPreserveSize.value
End Sub

Private Sub Apply_CheckBoxModifyTransparency()
checkboxTransp.Enabled = CheckBoxModifyTransparency.Value
checkboxTransp.Enabled = CheckBoxModifyTransparency.value
End Sub

Private Sub Apply_CheckBoxModifyResetFormat()
CheckBoxResetFormat.Enabled = CheckBoxModifyResetFormat.Value
CheckBoxResetFormat.Enabled = CheckBoxModifyResetFormat.value
End Sub

Private Sub Apply_CheckBoxReplace()
LabelReplace.Enabled = CheckBoxReplace.Value
TextBoxFind.Enabled = CheckBoxReplace.Value
LabelWith.Enabled = CheckBoxReplace.Value
TextBoxReplacement.Enabled = CheckBoxReplace.Value
LabelReplace.Enabled = CheckBoxReplace.value
TextBoxFind.Enabled = CheckBoxReplace.value
LabelWith.Enabled = CheckBoxReplace.value
TextBoxReplacement.Enabled = CheckBoxReplace.value
End Sub


Expand All @@ -162,11 +164,11 @@ End Sub

Private Sub Apply_BitmapVector_Change()
If ComboBoxBitmapVector.ListIndex = 1 Then
CheckBoxModifyLocalDPI.Value = False
CheckBoxModifyTransparency.Value = False
CheckBoxModifyLocalDPI.value = False
CheckBoxModifyTransparency.value = False
CheckBoxModifyLocalDPI.Enabled = False
CheckBoxModifyTransparency.Enabled = False
checkboxTransp.Value = True
checkboxTransp.value = True
Else
CheckBoxModifyLocalDPI.Enabled = True
CheckBoxModifyTransparency.Enabled = False
Expand All @@ -176,14 +178,12 @@ Private Sub Apply_BitmapVector_Change()
End Sub

Private Sub CheckBoxForcePreserveSize_Click()
If CheckBoxForcePreserveSize.Value = True Then
If CheckBoxForcePreserveSize.value = True Then
CheckBoxModifySize.Enabled = False
CheckBoxModifySize.Value = False
CheckBoxModifySize.value = False
Else
CheckBoxModifySize.Enabled = True
End If
Apply_CheckBoxModifySize
End Sub



Binary file modified BatchEditForm.frx
Binary file not shown.
Loading

0 comments on commit d24ac8a

Please sign in to comment.