You can subscribe to this list here.
| 2011 |
Jan
(16) |
Feb
(23) |
Mar
(42) |
Apr
|
May
(8) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
|
Oct
(13) |
Nov
(54) |
Dec
(75) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2012 |
Jan
(8) |
Feb
(131) |
Mar
(34) |
Apr
|
May
(2) |
Jun
(1) |
Jul
(22) |
Aug
(2) |
Sep
(3) |
Oct
(3) |
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
(3) |
Mar
|
Apr
(22) |
May
(2) |
Jun
|
Jul
(2) |
Aug
(14) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
(1) |
Feb
(8) |
Mar
(6) |
Apr
(4) |
May
(5) |
Jun
|
Jul
(16) |
Aug
(6) |
Sep
(8) |
Oct
(18) |
Nov
(8) |
Dec
|
| 2015 |
Jan
(13) |
Feb
(7) |
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2016 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
(2) |
May
|
Jun
(4) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <ala...@us...> - 2014-11-29 22:22:25
|
Revision: 491
http://sourceforge.net/p/latex-access/code/491
Author: alastair-irving
Date: 2014-11-29 22:22:18 +0000 (Sat, 29 Nov 2014)
Log Message:
-----------
Added Istvan's translations of sums, products, multiple integrals, intersections and unions.
The following changes were made from Istvan's code:
double and triple integrals are defined for the commands \iint and \iiint as these are standard.
We do not translate limits for \oint since there shouldn't be two limits on a contour integral.
Modified Paths:
--------------
latex_access/speech.py
latex_access/speech.table
Modified: latex_access/speech.py
===================================================================
--- latex_access/speech.py 2014-11-29 21:50:53 UTC (rev 490)
+++ latex_access/speech.py 2014-11-29 22:22:18 UTC (rev 491)
@@ -28,8 +28,8 @@
latex_access.translator.__init__(self)
self.files.append("speech.table")
self.load_files()
- new_table={"^":self.super,"_":("<sub>","</sub>"),"\\pmod":("mod <sub>","</sub>"),"\\sqrt":self.sqrt,"\\frac":self.frac,"\\tfrac":self.frac,"\\dfrac":self.frac,"\\int":self.integral,"\\mathbf":("<bold>","</bold>"),"\\mathbb":("<bold>","</bold>"),"\\mathcal":("<mathcal>","</mathcal>"),
- "\\log":self.log,"\\ang":self.ang,"\\tag":self.tag,"\\hat":("","hat"),"\\widehat":("","hat"),"\\bar":("","bar"),"\\overline":("","bar"),"\\dot":("","dot"),"\\ddot":("","double dot")}
+ new_table={"^":self.super,"_":("<sub>","</sub>"),"\\pmod":("mod <sub>","</sub>"),"\\sqrt":self.sqrt,"\\frac":self.frac,"\\tfrac":self.frac,"\\dfrac":self.frac,"\\int":self.integral,"\\iint":self.iintegral,"\\iiint":self.iiintegral,"\\mathbf":("<bold>","</bold>"),"\\mathbb":("<bold>","</bold>"),"\\mathcal":("<mathcal>","</mathcal>"),
+ "\\log":self.log,"\\ang":self.ang,"\\tag":self.tag,"\\hat":("","hat"),"\\widehat":("","hat"),"\\bar":("","bar"),"\\overline":("","bar"),"\\dot":("","dot"),"\\ddot":("","double dot"),"\\sum":self.sum,"\\prod":self.prod,"\\bigcup":self.union,"\\bigcap":self.intersection}
for (k,v) in new_table.iteritems():
self.table[k]=v
@@ -113,6 +113,78 @@
output +="<sub>%s</sub>" % self.translate(lower[0])
return (output,i)
+ def iintegral(self,input,start):
+ '''Translate double integrals, including limits of integration.
+
+ Returns touple.'''
+ (lower,upper,i)=latex_access.get_subsuper(input,start)
+ output=" double integral "
+ if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0:
+ output+="from %s to %s of " % (self.translate(lower[0]),self.translate(upper[0]))
+ elif lower is not None and len(lower[0]) !=0:
+ output +="<sub>%s</sub>" % self.translate(lower[0])
+ return (output,i)
+
+ def iiintegral(self,input,start):
+ '''Translate triple integrals, including limits of integration.
+
+ Returns touple.'''
+ (lower,upper,i)=latex_access.get_subsuper(input,start)
+ output=" triple integral "
+ if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0:
+ output+="from %s to %s of " % (self.translate(lower[0]),self.translate(upper[0]))
+ elif lower is not None and len(lower[0]) !=0:
+ output +="<sub>%s</sub>" % self.translate(lower[0])
+ return (output,i)
+
+ def sum(self,input,start):
+ '''Translate sums, including limits.
+
+ Returns touple.'''
+ (lower,upper,i)=latex_access.get_subsuper(input,start)
+ output=" sum "
+ if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0:
+ output+="from %s to %s of " % (self.translate(lower[0]),self.translate(upper[0]))
+ elif lower is not None and len(lower[0]) !=0:
+ output +="<sub>%s</sub>" % self.translate(lower[0])
+ return (output,i)
+
+ def prod(self,input,start):
+ '''Translate products, including limits of. integration.
+
+ Returns touple.'''
+ (lower,upper,i)=latex_access.get_subsuper(input,start)
+ output=" product "
+ if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0:
+ output+="from %s to %s of " % (self.translate(lower[0]),self.translate(upper[0]))
+ elif lower is not None and len(lower[0]) !=0:
+ output +="<sub>%s</sub>" % self.translate(lower[0])
+ return (output,i)
+
+ def union(self,input,start):
+ '''Translate unions.
+
+ Returns touple.'''
+ (lower,upper,i)=latex_access.get_subsuper(input,start)
+ output=" union "
+ if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0:
+ output+="from %s to %s of " % (self.translate(lower[0]),self.translate(upper[0]))
+ elif lower is not None and len(lower[0]) !=0:
+ output +="<sub>%s</sub>" % self.translate(lower[0])
+ return (output,i)
+
+ def intersection(self,input,start):
+ '''Translate intersections.
+
+ Returns touple.'''
+ (lower,upper,i)=latex_access.get_subsuper(input,start)
+ output=" intersection "
+ if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0:
+ output+="from %s to %s of " % (self.translate(lower[0]),self.translate(upper[0]))
+ elif lower is not None and len(lower[0]) !=0:
+ output +="<sub>%s</sub>" % self.translate(lower[0])
+ return (output,i)
+
def tag(self,input,start):
'''Translate tags into speech.
Modified: latex_access/speech.table
===================================================================
--- latex_access/speech.table 2014-11-29 21:50:53 UTC (rev 490)
+++ latex_access/speech.table 2014-11-29 22:22:18 UTC (rev 491)
@@ -16,8 +16,6 @@
\ne not equals
\ll less than less than
\gg greater than greater than
-\sum sum
-\prod product
\pm plus or minus
\mp minus or plus
\leftrightarrow if and only if
@@ -102,8 +100,6 @@
; set theory
-\bigcap intersection
-\bigcup union
\setminus set minus
\cap intersection
\triangleleft normal subgroup
@@ -139,8 +135,8 @@
; calculus
\partial partial
\nabla nabla
+\oint contour integral
-
; special characters
\infty infinity
\perp perpendicular
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ala...@us...> - 2014-11-29 21:51:01
|
Revision: 490
http://sourceforge.net/p/latex-access/code/490
Author: alastair-irving
Date: 2014-11-29 21:50:53 +0000 (Sat, 29 Nov 2014)
Log Message:
-----------
Istvan's improvement to the speech translation of integrals.
Modified Paths:
--------------
latex_access/speech.py
Modified: latex_access/speech.py
===================================================================
--- latex_access/speech.py 2014-11-09 01:41:36 UTC (rev 489)
+++ latex_access/speech.py 2014-11-29 21:50:53 UTC (rev 490)
@@ -107,13 +107,10 @@
Returns touple.'''
(lower,upper,i)=latex_access.get_subsuper(input,start)
output=" integral "
- if lower is not None:
- output+="from "
- output+=self.translate(lower[0])
- if upper is not None:
- output+=" to "
- output+=self.translate(upper[0])
- output+=" of "
+ if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0:
+ output+="from %s to %s of " % (self.translate(lower[0]),self.translate(upper[0]))
+ elif lower is not None and len(lower[0]) !=0:
+ output +="<sub>%s</sub>" % self.translate(lower[0])
return (output,i)
def tag(self,input,start):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ala...@us...> - 2014-11-09 01:41:44
|
Revision: 489
http://sourceforge.net/p/latex-access/code/489
Author: alastair-irving
Date: 2014-11-09 01:41:36 +0000 (Sun, 09 Nov 2014)
Log Message:
-----------
added speech for the optional arg of \sqrt, for example cube roots.
This is based on Isvan's work, but the implementation is rather different. A regular expression is not necessary because the get_optional_arg function simply returns () if there is no such arg.
Modified Paths:
--------------
latex_access/speech.py
Modified: latex_access/speech.py
===================================================================
--- latex_access/speech.py 2014-11-02 23:18:04 UTC (rev 488)
+++ latex_access/speech.py 2014-11-09 01:41:36 UTC (rev 489)
@@ -62,11 +62,20 @@
'''Translates squareroots into speech.
returns touple.'''
- arg=get_arg(input,start)
+ opt_arg=latex_access.get_optional_arg(input, start)
+ if opt_arg:
+ arg=get_arg(input,opt_arg[1])
+ if opt_arg[0]=="2": opt="square"
+ elif opt_arg[0]=="3": opt="cube"
+ elif opt_arg[0]=="": opt=""
+ else: opt=opt_arg[0]+"th"
+ else:
+ arg=get_arg(input,start)
+ opt=""
if arg[0].isdigit() or len(arg[0])==1:
- translation=" root "+arg[0]
+ translation="%s root %s" %(opt,arg[0])
else:
- translation=" begin root "+self.translate(arg[0])+" end root "
+ translation=" begin %s root %s end root" % (opt,self.translate(arg[0]))
return (translation,arg[1])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Alastair I. <ala...@sj...> - 2014-11-02 23:24:44
|
Hi
An interesting suggestion. I've just commited Istvan's change to the
superscript code so that we now have a pitch change and it doesn't say
"end super". Hopefully that makes things less verbose. Were you
thinking of a different sound for the ends of different commands or just
the same one?
I'm not sure how much time it would save, would it really be much
quicker for it to say "end frac" than for it to play a sound?
Maybe I'll experiment and see what it's like. My concern is that the
flow of the speech might be interupted too much, somehow we'd need
exactly the right amount of pause before and after the sound.
Alastair
On 02/11/2014 12:51, Victorious wrote:
> Hi all
>
> It would be great if speech such as end frac, end root or end vector
> could be replaced with a sound indicating that it’s the end of that
> element. In a situation like \sqrt{\frac{x^2 + 5}{y}}, 2 sounds would
> play in succession; the first indicating an end frac, then an end root.
>
> Not sure if anyone else would find it useful/how hard it would be to
> implement.
>
> Victorious
>
>
>
> ------------------------------------------------------------------------------
>
>
>
> _______________________________________________
> Latex-access-devel mailing list
> Lat...@li...
> https://lists.sourceforge.net/lists/listinfo/latex-access-devel
>
|
|
From: <ala...@us...> - 2014-11-02 23:18:07
|
Revision: 488
http://sourceforge.net/p/latex-access/code/488
Author: alastair-irving
Date: 2014-11-02 23:18:04 +0000 (Sun, 02 Nov 2014)
Log Message:
-----------
added Istvan's new pitch change for superscripts.
Modified Paths:
--------------
latex_access/speech.py
Modified: latex_access/speech.py
===================================================================
--- latex_access/speech.py 2014-10-31 23:26:50 UTC (rev 487)
+++ latex_access/speech.py 2014-11-02 23:18:04 UTC (rev 488)
@@ -1,6 +1,7 @@
# speech.py
# A part of the latex-access project at http://latex-access.sourceforge.net/
# Author: Alastair Irving <ala...@sj...>
+# Modified by: Istvan Velegi <iv...@gm...>
# Copyright (C) 2011 Alastair Irving/latex-access Contributors
#
# This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
@@ -53,7 +54,7 @@
elif latex_access.primes.match(arg[0]):
translation=" prime "*arg[0].count("\\prime")
else:
- translation = " to the %s end super " % self.translate(arg[0])
+ translation = " to the <sup> %s </sup> " % self.translate(arg[0])
return (translation,arg[1])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Williams, R. <R.M...@ex...> - 2014-11-02 17:55:30
|
Hi,
This sounds like a nice idea to me, not least because it would reduce the verbosity of the speech somewhat. I sometimes find the speech to be slightly verbose, particularly when reading long documents.
Robin
From: Victorious [mailto:dtv...@gm...]
Sent: 02 November 2014 17:52
To: lat...@li...
Subject: [Latex-access-devel] feature request/suggestion: playing a sound to indicate the end of a particular symbol
Hi all
It would be great if speech such as end frac, end root or end vector could be replaced with a sound indicating that it's the end of that element. In a situation like \sqrt{\frac{x^2 + 5}{y}}, 2 sounds would play in succession; the first indicating an end frac, then an end root.
Not sure if anyone else would find it useful/how hard it would be to implement.
Victorious
|
|
From: Victorious <dtv...@gm...> - 2014-11-02 17:51:57
|
Hi all
It would be great if speech such as end frac, end root or end vector could
be replaced with a sound indicating that it's the end of that element. In a
situation like \sqrt{\frac{x^2 + 5}{y}}, 2 sounds would play in succession;
the first indicating an end frac, then an end root.
Not sure if anyone else would find it useful/how hard it would be to
implement.
Victorious
|
|
From: <ala...@us...> - 2014-10-31 23:26:58
|
Revision: 487
http://sourceforge.net/p/latex-access/code/487
Author: alastair-irving
Date: 2014-10-31 23:26:50 +0000 (Fri, 31 Oct 2014)
Log Message:
-----------
All of istvan's changes to the Jaws scripts are now implemented so delete the modified by Istvan folder.
Note that speech.py still needs to be updated with his new superscript code for the new voice to take effect.
Modified Paths:
--------------
jaws/latex.jsb
jaws/latex.jss
jaws/latex.smf
Removed Paths:
-------------
jaws/modified_by_istvan/
Modified: jaws/latex.jsb
===================================================================
(Binary files differ)
Modified: jaws/latex.jss
===================================================================
--- jaws/latex.jss 2014-10-28 20:28:25 UTC (rev 486)
+++ jaws/latex.jss 2014-10-31 23:26:50 UTC (rev 487)
@@ -65,10 +65,12 @@
let input = StringReplaceSubstrings (input, "&", "&")
let input = StringReplaceSubstrings (input, "<sub>", smmGetStartMarkupForAttributes (attrib_subscript|attrib_text))
let input = StringReplaceSubstrings (input, "</sub>", smmGetEndMarkupForAttributes (attrib_subscript|attrib_text))
+let input = StringReplaceSubstrings (input, "<sup>", smmGetStartMarkupForAttributes (attrib_superscript|attrib_text))
+let input = StringReplaceSubstrings (input, "</sup>", smmGetEndMarkupForAttributes (attrib_superscript|attrib_text))
let input = StringReplaceSubstrings (input, "<bold>", smmGetStartMarkupForAttributes (attrib_bold|attrib_text))
let input = StringReplaceSubstrings (input, "</bold>", smmGetEndMarkupForAttributes (attrib_bold|attrib_text))
-let input=StringReplaceSubstrings (input, "<mathcal>", smmGetStartMarkupForAttributes (attrib_italic|attrib_text))
-let input=StringReplaceSubstrings (input, "</mathcal>", smmGetEndMarkupForAttributes (attrib_italic|attrib_text))
+let input=StringReplaceSubstrings (input, "<mathcal>", smmGetStartMarkupForAttributes (attrib_double_strikeout|attrib_text))
+let input=StringReplaceSubstrings (input, "</mathcal>", smmGetEndMarkupForAttributes (attrib_double_strikeout|attrib_text))
endif
Say (input, ot_selected_item, true)
else
Modified: jaws/latex.smf
===================================================================
--- jaws/latex.smf 2014-10-28 20:28:25 UTC (rev 486)
+++ jaws/latex.smf 2014-10-31 23:26:50 UTC (rev 487)
@@ -1,8 +1,8 @@
[Attribute Behavior Table]
default=0|MessageVoice|||
3=3|||BoldVoice|
-1025=3|||SuperscriptVoice|
-2049=3|||SubscriptVoice|
+1025=3|||DoubleStrikeoutVoice|
+2049=3|||SuperscriptVoice|
4097=3|||SubscriptVoice|
5=3|||ItalicVoice|
[Indentation Behavior Table]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ala...@us...> - 2014-10-28 20:28:34
|
Revision: 486
http://sourceforge.net/p/latex-access/code/486
Author: alastair-irving
Date: 2014-10-28 20:28:25 +0000 (Tue, 28 Oct 2014)
Log Message:
-----------
Added Istvan's spoken message for re-initialise.
I've changed Istvan's version slightly, giving a different long and short message and slightly changing the call to SayMessage.
Modified Paths:
--------------
jaws/latex.jsb
jaws/latex.jsm
jaws/latex.jss
Modified: jaws/latex.jsb
===================================================================
(Binary files differ)
Modified: jaws/latex.jsm
===================================================================
--- jaws/latex.jsm 2014-10-28 19:43:34 UTC (rev 485)
+++ jaws/latex.jsm 2014-10-28 20:28:25 UTC (rev 486)
@@ -1,6 +1,7 @@
; latex.jsm
; A part of the latex-access project at http://latex-access.sourceforge.net/
; Author: Alastair Irving <ala...@sj...>
+; Modified by: Istvan Velegi <iv...@gm...>
; Copyright (C) 2011 Alastair Irving/latex-access Contributors
;
; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
@@ -39,6 +40,12 @@
ks1 = "control+shift+d" ;open default file
messages
+@msgReInit_s
+Re-initialised
+@@
+@msgReInit_l
+LaTeX addon has been re-initialised.
+@@
@msgProcessingOn_S
Processing on
@@
Modified: jaws/latex.jss
===================================================================
--- jaws/latex.jss 2014-10-28 19:43:34 UTC (rev 485)
+++ jaws/latex.jss 2014-10-28 20:28:25 UTC (rev 486)
@@ -1,6 +1,7 @@
; latex.jss
; A part of the latex-access project at http://latex-access.sourceforge.net/
; Author: Alastair Irving <ala...@sj...>
+; Modified by: Istvan Velegi <iv...@gm...>
; Copyright (C) 2011 Alastair Irving/latex-access Contributors
;
; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
@@ -48,6 +49,7 @@
Script reInitialise ()
let latex_access=CreateObject (o_latexAccess)
+sayMessage(ot_status, msgReInit_l, msgReInit_s);
EndScript
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ala...@us...> - 2014-10-28 19:43:42
|
Revision: 485
http://sourceforge.net/p/latex-access/code/485
Author: alastair-irving
Date: 2014-10-28 19:43:34 +0000 (Tue, 28 Oct 2014)
Log Message:
-----------
Removed lots of unnecessary spaces from ends of lines in speech.table
This was done by Istvan, the serious differences between the tables are now much easier to find with diff.
Modified Paths:
--------------
latex_access/speech.table
Modified: latex_access/speech.table
===================================================================
--- latex_access/speech.table 2014-10-28 15:15:23 UTC (rev 484)
+++ latex_access/speech.table 2014-10-28 19:43:34 UTC (rev 485)
@@ -5,124 +5,124 @@
= equals
> greater than
\times times
-\div divided by
+\div divided by
\pm plus or minus
-\leq less than or equal to
-\le less than or equal to
-\geq greater than or equal to
-\ge greater than or equal to
+\leq less than or equal to
+\le less than or equal to
+\geq greater than or equal to
+\ge greater than or equal to
\equiv equiv
\neq not equals
\ne not equals
-\ll less than less than
+\ll less than less than
\gg greater than greater than
\sum sum
\prod product
\pm plus or minus
\mp minus or plus
-\leftrightarrow if and only if
+\leftrightarrow if and only if
\Rightarrow goes to
-\rightarrow goes to
+\rightarrow goes to
\to goes to
-\Leftrightarrow if and only if
+\Leftrightarrow if and only if
\longrightarrow goes to
\longleftrightarrow if and only if
\wedge and
-\vee or
-\lnot not
+\vee or
+\lnot not
\propto proportional to
-\min min
+\min min
\max max
; trigonometric and hyperbolic functions
-\tanh thann
+\tanh thann
\tan tan
-\sinh shine
-\sin sine
-\cosh cosh
-\cos coz
+\sinh shine
+\sin sine
+\cosh cosh
+\cos coz
; capital greek letters
-\Alpha cap alpha
-\Beta cap beta
-\Gamma cap gamma
-\Delta cap delta
-\Epsilon cap epsilon
-\Zeta cap zeta
-\Eta cap eta
-\Theta cap theta
+\Alpha cap alpha
+\Beta cap beta
+\Gamma cap gamma
+\Delta cap delta
+\Epsilon cap epsilon
+\Zeta cap zeta
+\Eta cap eta
+\Theta cap theta
\Iota cap iota
\Kappa cap kappa
-\Lambda cap lambda
+\Lambda cap lambda
\Mu cap mu
\Nu cap nu
\Xi cap xi
\Omicron cap omicron
\Pi cap pi
\Rho cap rho
-\Sigma cap sigma
-\Tau cap tau
-\Upsilon cap upsilon
-\Phi cap phi
+\Sigma cap sigma
+\Tau cap tau
+\Upsilon cap upsilon
+\Phi cap phi
\Psi cap psi
-\Chi cap chi
-\Omega cap omega
+\Chi cap chi
+\Omega cap omega
; small greek letters
-\alpha alpha
-\beta beta
-\gamma gamma
-\delta delta
-\epsilon epsilon
-\zeta zeta
-\eta eta
-\theta theta
+\alpha alpha
+\beta beta
+\gamma gamma
+\delta delta
+\epsilon epsilon
+\zeta zeta
+\eta eta
+\theta theta
\iota iota
\kappa kappa
-\lambda lambda
-\mu mu
-\nu nu
-\xi xi
-\omicron omicron
-\pi pi
+\lambda lambda
+\mu mu
+\nu nu
+\xi xi
+\omicron omicron
+\pi pi
\varpi var pi
-\rho rho
-\sigma sigma
-\tau tau
-\upsilon upsilon
-\phi phi
-\psi psi
-\chi chi
-\omega omega
+\rho rho
+\sigma sigma
+\tau tau
+\upsilon upsilon
+\phi phi
+\psi psi
+\chi chi
+\omega omega
\varphi var phi
\vartheta var theta
-\varepsilon var epsilon
+\varepsilon var epsilon
; set theory
\bigcap intersection
\bigcup union
\setminus set minus
-\cap intersection
-\triangleleft normal subgroup
-\therefore therefore
-\supseteq superset or equal to
-\supset superset
-\subseteq subset or equal to
-\subset subset
-\in in
-\forall for all
-\exists there exists
-\emptyset empty set
-\cup union
-\lim limit
+\cap intersection
+\triangleleft normal subgroup
+\therefore therefore
+\supseteq superset or equal to
+\supset superset
+\subseteq subset or equal to
+\subset subset
+\in in
+\forall for all
+\exists there exists
+\emptyset empty set
+\cup union
+\lim limit
\{ open brace
\} close brace
; standard LaTeX commands for better reading
-\cdot dot
-\cdots dot dot dot
+\cdot dot
+\cdots dot dot dot
\right
\quad
\qquad
@@ -134,11 +134,11 @@
\!
\:
\textbackslash \
-\textdegree degrees
+\textdegree degrees
; calculus
-\partial partial
-\nabla nabla
+\partial partial
+\nabla nabla
; special characters
@@ -146,6 +146,6 @@
\perp perpendicular
; Probability and permutations
-\Pr probability of
+\Pr probability of
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ala...@us...> - 2014-10-28 15:15:32
|
Revision: 484
http://sourceforge.net/p/latex-access/code/484
Author: alastair-irving
Date: 2014-10-28 15:15:23 +0000 (Tue, 28 Oct 2014)
Log Message:
-----------
Removed latex.jbs because there's nothing in it.
Removed Paths:
-------------
jaws/latex.jbs
jaws/modified_by_istvan/latex.jbs
Deleted: jaws/latex.jbs
===================================================================
Deleted: jaws/modified_by_istvan/latex.jbs
===================================================================
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Alastair I. <ala...@sj...> - 2014-10-28 14:48:03
|
Thank you for that. I'll look at your changes as soon as possible. I was confused why your commit said you'd changed speech.py, the reason is that you commited a version with windows line endings. It doesn't really matter, but I thought I should explain in case anyone was wondering why. Alastair On 28/10/2014 10:04, iv...@us... wrote: > Revision: 483 > http://sourceforge.net/p/latex-access/code/483 > Author: ivelegi > Date: 2014-10-28 14:04:24 +0000 (Tue, 28 Oct 2014) > Log Message: > ----------- > Major updates in speech and Jaws scripts > The following modifications in the English speechfiles and jaws files are not placed in the original files till Alastair revise them. So my Jaws scripts are put under "modified by Istvan" folder. > > Here comes my changelog: > Improved support for Hungarian speech. > Added implementation for the following in both English and Hun: > processing of roots including nth and special ones like square, cube. > Sum, including limits > production, including limits > > set operations: > union, including limits > intersection, including limits, eg.g > \cap_{1}^{n} a_i =P > The above operation commands were removed from the speech.table as their implementation is made in "speech.py". > > Added support for the following: > 1. Double, triple integrals and loop integrals. > 2. A new command of fractions, namely the "\ds" . For example: \ds{a\over b > > 3. Binomials with two commands: \binom{a}{b} and "a \choose b" > > 4. vector command in two ways: > \vec{x} and \vec{x +2} > > 5. \ln command > Added a "correct" function in speech.py to let speech sinthesizers say correctly the double letter variaables like "xx", "yy", "dydx", ecc. I use this function in most functions e. g. superscript, sqrt, and integrals. > > Changed behaviour for superscript text. Now Jaws reads the superscripted data with the superscript voice without telling "begin super" and "end super", > making the reading more convenient. > In the jaws scripts, the <sup> and </sup> tags are treated as superscript texts, which is done in speech.py, similar to the way the italic text is implemented. > Of course I modified the super function and didn't use a sinple touple. > > Improved support for bold, italic texts by adding new commands for them in the same way as they were implemented originally. > > Jaws scripts improvements: > Modified the voice alias for \mathcal command from italic to double strikeout voice. > Added support for superscript text, and assigned superscript voice fo this. > Added a message when pressing the re-initialisation keystroke in both speech and braille. > > Modified Paths: > -------------- > latex_access/hungarian_speech.table > latex_access/speech.py > test.tex > > Added Paths: > ----------- > jaws/modified_by_istvan/ > jaws/modified_by_istvan/latex.JCF > jaws/modified_by_istvan/latex.JSS > jaws/modified_by_istvan/latex.jbs > jaws/modified_by_istvan/latex.jkm > jaws/modified_by_istvan/latex.jsb > jaws/modified_by_istvan/latex.jsd > jaws/modified_by_istvan/latex.jsm > jaws/modified_by_istvan/latex.smf > latex_access/hungarian_speech.py > latex_access/speech_modified.py > latex_access/speech_modified.table > > Added: jaws/modified_by_istvan/latex.JCF > =================================================================== > --- jaws/modified_by_istvan/latex.JCF (rev 0) > +++ jaws/modified_by_istvan/latex.JCF 2014-10-28 14:04:24 UTC (rev 483) > @@ -0,0 +1,7 @@ > +[Braille] > +Grade2Translation=0 > +BrailleMoveActiveCursor=1 > +BrailleTranslationType=1 > +ContractedBrailleInput=0 > +[Options] > +Scheme=latex > > Added: jaws/modified_by_istvan/latex.JSS > =================================================================== > --- jaws/modified_by_istvan/latex.JSS (rev 0) > +++ jaws/modified_by_istvan/latex.JSS 2014-10-28 14:04:24 UTC (rev 483) > @@ -0,0 +1,258 @@ > +; latex.jss > +; A part of the latex-access project at http://latex-access.sourceforge.net/ > +; Author: Alastair Irving <ala...@sj...> > +; Modified by: Istv\xE1n Velegi <iv...@gm...> > +; Copyright (C) 2011 Alastair Irving/latex-access Contributors > +; > +; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; > +; either version 2 of the License, or (at your option) any later version. > +; > +; This program is distributed in the hope that it will be useful, > +; but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > +; See the GNU General Public License for more details. > +; > +; You should have received a copy of the GNU General Public License along with this program; if not, visit <http://www.gnu.org/licenses> > +; > + > + > +; Documentation by: Jose Tamayo( jt...@ho...) > +; > +; history of changes > +; > +; Needs: > +; 1. JSM file for messages > +; 2. proper variable naming > +; 3. intro for functions. > +; 4. Hungarian notation > +; 5. Move all literals and messages to the latex.jsm file. > + > + > +include "hjconst.jsh" > + > + include "latex.jsm" > + > +globals int initialised, > +int ProcessMaths, > +object latex_access, > +object matrix, > +int row, > +int column > + > +Void Function AutoStartEvent () > +if !initialised then > +let latex_access=CreateObject (o_latexAccess) > +let initialised=true > +endif > +EndFunction > + > + > +Script reInitialise () > +let latex_access=CreateObject (o_latexAccess) > +sayMessage(1, msgReInit_s); > +EndScript > + > + > +Void Function SayLine () > +if ProcessMaths then > +var string input > +let input = GetLine () > + > +if StringIsBlank(input) then > +let input = "blank" > +else > +let input = latex_access.speech(input) > +let input = StringReplaceSubstrings (input, "&", "&") > +let input = StringReplaceSubstrings (input, "<sub>", smmGetStartMarkupForAttributes (attrib_subscript|attrib_text)) > +let input = StringReplaceSubstrings (input, "</sub>", smmGetEndMarkupForAttributes (attrib_subscript|attrib_text)) > +let input = StringReplaceSubstrings (input, "<sup>", smmGetStartMarkupForAttributes (attrib_superscript|attrib_text)) > +let input = StringReplaceSubstrings (input, "</sup>", smmGetEndMarkupForAttributes (attrib_superscript|attrib_text)) > +let input = StringReplaceSubstrings (input, "<bold>", smmGetStartMarkupForAttributes (attrib_bold|attrib_text)) > +let input = StringReplaceSubstrings (input, "</bold>", smmGetEndMarkupForAttributes (attrib_bold|attrib_text)) > +let input=StringReplaceSubstrings (input, "<mathcal>", smmGetStartMarkupForAttributes (attrib_double_strikeout|attrib_text)) > +let input=StringReplaceSubstrings (input, "</mathcal>", smmGetEndMarkupForAttributes (attrib_double_strikeout|attrib_text)) > +endif > +Say (input, ot_selected_item, true) > +else > +SayLine () > +endif > +EndFunction > + > +Script ToggleMaths () > +if ProcessMaths then > +let ProcessMaths = false > +SayMessage (ot_status, msgProcessingOff_L, msgProcessingOff_S) > +else > +let ProcessMaths = true > +SayMessage(OT_STATUS,msgProcessingOn_L,msgProcessingOn_S) > +endif > + > +EndScript > + > +Script ToggleDollarsBraille () > +var int result > +let result=latex_access.toggle_dollars_nemeth() > +if result==-1 then > +SayMessage (ot_status, msgBrailleDollarsOff_L, msgBrailleDollarsOff_S) > +else > +SayMessage (ot_status, msgBrailleDollarsOn_L, msgBrailleDollarsOn_S) > +endif > +EndScript > + > +Script ToggleDollarsSpeech () > +var int result > +let result=latex_access.toggle_dollars_speech() > +if result==-1 then > +SayMessage (ot_status, msgSpeechDollarsOff_L, msgSpeechDollarsOff_S) > +else > +SayMessage (ot_status, msgSpeechDollarsOn_L, msgSpeechDollarsOn_S) > +endif > +EndScript > + > +Int Function BrailleBuildLine () > +if ProcessMaths then > +var string input > +let input = GetLine() > +let input = StringReplaceSubstrings (input, sScrollDownSymbols , "") > +let input=StringTrimTrailingBlanks (input) > +let input = latex_access.nemeth(input) > +; now sort out bad dots 456 > +let input =StringReplaceSubstrings (input, "_", "\127") > +BrailleAddString (input, 0, 0, 0) > + > +endif > +return true > +EndFunction > + > +Script InputMatrix () > +let matrix=CreateObject (o_latex_access_matrix) > +let row=1 > +let column=1 > +matrix.tex_init(GetSelectedText ()) > +; JT: Replace the msg var with a message variable in the latex.jsm file > +var string msg > +let msg ="Initialised " > +let msg=msg+inttostring(matrix.rows) > +let msg=msg+sPadBy > +let msg=msg+inttostring(matrix.columns) > +let msg=msg +sPadMatrix > +SayString(msg) > +EndScript > + > +Script HotKeyHelp () > +; check the virtual buffer and close it if active. > +If UserBufferIsActive () Then > + UserBufferDeactivate () > +EndIf > +; Display the help text when the user presses JAWSKey+H > +SayFormattedMessage(OT_USER_BUFFER, msgHotKeyHelp) > +AddHotKeyLinks () > +EndScript > + > +Script MatrixRight () > +if column < matrix.columns then > +let column = column+1 > +saystring(matrix.get_cell(row,column)) > +else > +saystring(sEndRow) > +endif > +EndScript > + > +Script MatrixLeft () > +if column > 1 then > +let column = column - 1 > +saystring(matrix.get_cell(row,column)) > +else > +saystring(sStartRow) > +endif > +EndScript > + > +Script MatrixDown () > +if row < matrix.rows then > +let row = row+1 > +saystring(matrix.get_cell(row,column)) > +else > +saystring(sEndColumn) > +endif > +EndScript > + > +Script MatrixUp () > +if row > 1 then > +let row = row - 1 > +saystring(matrix.get_cell(row,column)) > +else > +SayString(sStartColumn) > +endif > +EndScript > + > +; JT: This variable named i must be changed > +Script SayRow (int i) > +if i>0 && i <= matrix.rows then > +saystring(matrix.get_row(i," ")) > +else > +saystring(sInvalidRow) > +endif > +EndScript > +; JT: Find out what i is for and replace if needed. > +Script SayColumn (int i) > +if i>0 && i <=matrix.columns then > +saystring(matrix.get_col(i," ")) > +else > +saystring(sInvalidColumn) > +endif > +EndScript > + > +Script preprocessorAdd () > +var string input, int args, string strargs, string translation > +if InputBox (sCommandToRedefine, "Initial LaTeX", input) then > +if InputBox (sEnterCommandArguments, "Number of arguments", strargs) then > +if InputBox (sEnterCustomCommandDef, "Translation", translation) then > +let args=StringToInt (strargs) > +latex_access.preprocessor_add(input,args,translation) > +endif > +endif > +endif > +EndScript > + > + > +Script PreprocessorFromString () > +latex_access.preprocessor_from_string(GetSelectedText ()) > + > + > +EndScript > + > + > + > +Script PreprocessorWrite () > +var string filename > +if InputBox (sEnterFileToSaveTo , "Filename", filename) then > +if FileExists (filename) then > +var int result > +let result=ExMessageBox (sFileExistError , sFileExistTitle , MB_YESNO) > +if result==IDNO then > +return > +endif > +endif > +latex_access.preprocessor_write(filename) > +endif > +EndScript > + > + > +Script PreprocessorRead () > +var string filename > +; JT: another literal to move to the latex.jsm file. > +if InputBox ("enter full filename to read from ", "Filename", filename) then > +if FileExists (filename) then > +latex_access.preprocessor_read(filename) > +else > +MessageBox (sFileNoExist ) > +endif > +endif > +EndScript > + > + > + > + > + > + > + > + > > Added: jaws/modified_by_istvan/latex.jbs > =================================================================== > Added: jaws/modified_by_istvan/latex.jkm > =================================================================== > --- jaws/modified_by_istvan/latex.jkm (rev 0) > +++ jaws/modified_by_istvan/latex.jkm 2014-10-28 14:04:24 UTC (rev 483) > @@ -0,0 +1,33 @@ > +[Common Keys] > +Control+M=ToggleMaths > +Control+Shift+M=InputMatrix > +Control+Shift+L=MatrixRight > +Control+Shift+J=MatrixLeft > +Control+Shift+K=MatrixDown > +Control+Shift+I=MatrixUp > +Control+Shift+1=SayRow(1) > +Control+Shift+2=SayRow(2) > +Control+Shift+3=SayRow(3) > +Control+Shift+4=SayRow(4) > +Control+Shift+5=SayRow(5) > +Control+Shift+6=SayRow(6) > +Control+Shift+7=SayRow(7) > +Control+Shift+8=SayRow(8) > +Control+Shift+9=SayRow(9) > +Control+Alt+1=SayColumn(1) > +Control+Alt+2=SayColumn(2) > +Control+Alt+3=SayColumn(3) > +Control+Alt+4=SayColumn(4) > +Control+Alt+5=SayColumn(5) > +Control+Alt+6=SayColumn(6) > +Control+Alt+7=SayColumn(7) > +Control+Alt+8=SayColumn(8) > +Control+Alt+9=SayColumn(9) > +Control+Shift+D=ToggleDollarsSpeech > +Control+Shift+R=PreprocessorRead > +Control+Shift+A=preprocessorAdd > +Control+Shift+W=PreprocessorWrite > +Control+Shift+H=PreprocessorFromString > +Insert+H=HotKeyHelp > +Control+Alt+Shift+R=reInitialise > +Control+D=ToggleDollarsBraille > > Added: jaws/modified_by_istvan/latex.jsb > =================================================================== > (Binary files differ) > > Index: jaws/modified_by_istvan/latex.jsb > =================================================================== > --- jaws/modified_by_istvan/latex.jsb 2014-10-26 05:09:23 UTC (rev 482) > +++ jaws/modified_by_istvan/latex.jsb 2014-10-28 14:04:24 UTC (rev 483) > > Property changes on: jaws/modified_by_istvan/latex.jsb > ___________________________________________________________________ > Added: svn:mime-type > ## -0,0 +1 ## > +application/octet-stream > \ No newline at end of property > Added: jaws/modified_by_istvan/latex.jsd > =================================================================== > --- jaws/modified_by_istvan/latex.jsd (rev 0) > +++ jaws/modified_by_istvan/latex.jsd 2014-10-28 14:04:24 UTC (rev 483) > @@ -0,0 +1,56 @@ > +:function AutoStartEvent > + > +:script reInitialise > +:Synopsis Loads the COM object again. > +:Description Run this if there is no speech or Braille. > + > +:function SayLine > +:Synopsis An overidden version of the default, which processes maths before it is spoken. > + > +:script ToggleMaths > +:Synopsis Toggles the speaking of mathematical expressions as either straight latex or a more verbal rendering. > + > +:script ToggleDollarsBraille > +:Synopsis Toggles whether or not dollars are removed in braille. > + > +:script ToggleDollarsSpeech > +:Synopsis Toggles the speaking of dollars. > + > +:function BrailleBuildLine > +:Returns int No Return Description > + > +:script InputMatrix > +:Synopsis Highlight a matrix and then run this script to have it created as an object. > + > +:script HotKeyHelp > + > +:script MatrixRight > +:Synopsis Moves the matrix cursor to the right and speaks the new cell. > + > +:script MatrixLeft > +:Synopsis Moves the matrix cursor to the left and speaks the new cell. > + > +:script MatrixDown > +:Synopsis Moves the matrix cursor down and speaks the cell. > + > +:script MatrixUp > +:Synopsis Moves the matrix cursor up and speaks the cell. > + > +:script SayRow > +:Synopsis Speaks the required row of the matrix. > + > +:script SayColumn > +:Synopsis Says the required column of the matrix > + > +:script preprocessorAdd > +:Synopsis Adds a custom command to the preprocessor. > + > +:script PreprocessorFromString > +:Synopsis adds commands defined in the highlighted text to the preprocessor. > + > +:script PreprocessorWrite > +:Synopsis Saves the preprocessor to a file. > + > +:script PreprocessorRead > +:Synopsis Reads preprepreprocessor entries from a file. > + > > Added: jaws/modified_by_istvan/latex.jsm > =================================================================== > --- jaws/modified_by_istvan/latex.jsm (rev 0) > +++ jaws/modified_by_istvan/latex.jsm 2014-10-28 14:04:24 UTC (rev 483) > @@ -0,0 +1,133 @@ > +; latex.jsm > +; A part of the latex-access project at http://latex-access.sourceforge.net/ > +; Author: Alastair Irving <ala...@sj...> > +; Modified by: Istvan Velegi <iv...@gm...> > +; Copyright (C) 2011 Alastair Irving/latex-access Contributors > +; > +; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; > +; either version 2 of the License, or (at your option) any later version. > +; > +; This program is distributed in the hope that it will be useful, > +; but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > +; See the GNU General Public License for more details. > +; > +; You should have received a copy of the GNU General Public License along with this program; if not, visit <http://www.gnu.org/licenses> > +; > +; Created by Jose Tamayo on 2/25/2010 > +; this will allow for latex-access to load the messages and vars correctly. > + > +const > +o_latexAccess = "latex_access", > +o_latex_access_matrix = "latex_access_matrix", > +; input variable literals > +sScrollDownSymbols = "scroll down symbol", > +sPadBy = " by ", > +sPadMatrix = " matrix ", > +sEndRow = "end row", > +sStartRow = "start row", > +sEndColumn = "end column", > +sStartColumn = "start column", > +sInvalidRow = "Invalid Row", > +sInvalidColumn = "invalid column", > +sCommandToReDefine = "Enter the command you wish to re-define.", > +sEnterCommandArguments = "Enter the number of arguments of the command.", > +sEnterCustomCommandDef = "Enter the definition of the custom command, that is, the standard LaTeX to which it is equivalent.", > +sEnterFileToSaveTo = "enter full filename to save to", > +sFileExistError = "The file you specified already exists. Do you wish to replace it?", > +sFileExistTitle = "File Exists", > +sFileNoExist = "File does not exist", > +;keystrokes > +ks1 = "control+shift+d" ;open default file > + > +messages > +@msgReInit_s > +LaTeX addon has been re-initialised. > +@@ > +@msgReInit_l > +LaTeX addon has been re-initialised. > +@@ > +@msgProcessingOn_S > +Processing on > +@@ > +@msgProcessingOn_L > +Maths to be processed to a more verbal form > +@@ > +@msgProcessingOff_S > +Processing off > +@@ > +@msgProcessingOff_L > +maths to be read as plain latex > +@@ > +@msgBrailleDollarsOff_S > +Braille Dollars off > +@@ > +@msgBrailleDollarsOff_L > +Dollars will now be ignored in braille > +@@ > +@msgBrailleDollarsOn_S > +Braille Dollars on > +@@ > +@msgBrailleDollarsOn_L > +Dollars will now be shown in braille > +@@ > + > +@msgSpeechDollarsOff_S > +Speech Dollars off > +@@ > +@msgSpeechDollarsOff_L > +Dollars will now be ignored in speech > +@@ > +@msgSpeechDollarsOn_S > +Speech Dollars on > +@@ > +@msgSpeechDollarsOn_L > +Dollars will now be shown in Speech > +@@ > + > +; JT HERE > +; Hot key help for latex-access > +@msgHotKeyHelp > +Welcome to the LaTeX Access Tools for JAWS. > + > +NOTE: There is currently no means of independently toggling of speech and braille. > + > +Press %KeyFor(ToggleMaths ) to toggle processing of LaTeX on and off > +Press %KeyFor(ToggleDollarsBraille ) To toggle Braille dollars on or off > +Press %KeyFor(ToggleDollarsSpeech ) To toggle Speech dollars on or off > +Press %KeyFor(InputMatrix ) to create a matrix > + > +the Preprocessor > +LaTeX enables you to define custom commands. The scripts can handle > +this but they must be told what the custom commands are. This is done > +by means of the preprocessor. > + > +Press %KeyFor(preprocessorAdd ) to add a preprocessor command > + > +In the first textbox, enter the custom command, in the next enter the number of arguments, 0 if there > +are none, and in the 3rd box enter the translation of the custom > +command. The translation is the standard LaTeX equivalent of the > +command, using #n to denote places where the nth argument should be > +interpolated into the translation. The 3 textboxes correspond to the > +3 arguments to the \newcommand command used to define the custom > +command. > + > +Preprocessor commands are lost when JAWS is restarted. You may load multiple preprocessor files. > +Press %KeyFor(PreprocessorWrite ) to save the custom preprocessor commands to a file. > +Press %KeyFor(PreprocessorRead ) to retreive custom preprocessor commands previously saved > + > +The Matrix Processor > +To load a matrix into the processor, highlight its contents, (not > +including any \begin and \end commands), and press %KeyFor(InputMatrix ) . For > +example you might highlight the following: > + > +1 & 2\\ > +3 & 4\\ > + > +CTRL+SHIFT+j, K, L, or I act as arrows that navigate the matrix > +CTRL+SHIFT with a number reads that row > +cTRL+ALT with a number reads that column. > + > +Press %KeyFor(HotKeyHelp ) to redisplay this message > +@@ > + > +EndMessages > > Added: jaws/modified_by_istvan/latex.smf > =================================================================== > --- jaws/modified_by_istvan/latex.smf (rev 0) > +++ jaws/modified_by_istvan/latex.smf 2014-10-28 14:04:24 UTC (rev 483) > @@ -0,0 +1,127 @@ > +[Attribute Behavior Table] > +default=0|MessageVoice||| > +3=3|||BoldVoice| > +1025=3|||DoubleStrikeoutVoice| > +2049=3|||SuperscriptVoice| > +4097=3|||SubscriptVoice| > +5=3|||ItalicVoice| > +[Indentation Behavior Table] > +default=1|MessageVoice||| > +[HTML Attribute Behavior Table] > +onclick=1|NormalVoice:clickable||| > +onmouseover=1|NormalVoice:on mouse over||| > +visited=1|NormalVoice:visited||| > +[Other Behavior Table] > +Cap=3|NormalVoice||SingleCapVoice| > +AllCaps=3|NormalVoice||AllCapsVoice| > +Repetition=1|MessageVoice||| > +Spell=3|||SpellingVoice| > +Quote=3|||NormalVoice| > +[Font Size Behavior Table] > +default=0|MessageVoice||| > +[Font Name Behavior Table] > +default=0|MessageVoice||| > +[Color Behavior Table] > +default=0|MessageVoice||| > +[ControlType Behavior Table] > +1=1|NormalVoice||| > +2=1|NormalVoice||| > +3=1|NormalVoice||| > +4=1|NormalVoice||| > +5=1|NormalVoice||| > +6=1|NormalVoice||| > +7=1|NormalVoice||| > +8=1|NormalVoice||| > +9=1|NormalVoice||| > +10=1|NormalVoice||| > +11=1|NormalVoice||| > +12=1|NormalVoice||| > +13=1|NormalVoice||| > +14=1|NormalVoice||| > +15=1|NormalVoice||| > +16=1|NormalVoice||| > +17=1|NormalVoice||| > +18=1|NormalVoice||| > +19=1|NormalVoice||| > +20=1|NormalVoice||| > +21=1|NormalVoice||| > +22=1|NormalVoice||| > +23=1|NormalVoice||| > +24=1|NormalVoice||| > +25=1|NormalVoice||| > +26=1|NormalVoice||| > +27=1|NormalVoice||| > +28=1|NormalVoice||| > +29=1|NormalVoice||| > +30=1|NormalVoice||| > +31=1|NormalVoice||| > +32=1|NormalVoice||| > +33=1|NormalVoice||| > +34=1|NormalVoice||| > +35=1|NormalVoice||| > +36=1|NormalVoice||| > +37=1|NormalVoice||| > +38=1|NormalVoice||| > +39=1|NormalVoice||| > +40=1|NormalVoice||| > +41=1|NormalVoice||| > +42=1|NormalVoice||| > +43=1|NormalVoice||| > +44=1|NormalVoice||| > +45=1|NormalVoice||| > +46=1|NormalVoice||| > +47=1|NormalVoice||LinkVoice| > +48=1|NormalVoice||LinkVoice| > +49=1|NormalVoice||LinkVoice| > +50=1|NormalVoice||LinkVoice| > +51=1|NormalVoice||| > +52=1|NormalVoice||| > +53=1|NormalVoice||| > +54=1|NormalVoice||| > +55=1|NormalVoice||| > +56=1|NormalVoice||| > +57=1|NormalVoice||| > +58=1|NormalVoice||| > +59=1|NormalVoice||| > +60=1|NormalVoice||| > +61=1|NormalVoice||| > +62=1|NormalVoice||| > +63=1|NormalVoice||| > +64=1|NormalVoice||| > +65=1|NormalVoice||| > +66=1|NormalVoice||| > +67=1|NormalVoice||| > +68=1|NormalVoice||HeadingLevel1Voice| > +69=1|NormalVoice||HeadingLevel2Voice| > +70=1|NormalVoice||HeadingLevel3Voice| > +71=1|NormalVoice||HeadingLevel4Voice| > +72=1|NormalVoice||HeadingLevel5Voice| > +73=1|NormalVoice||HeadingLevel6Voice| > +74=1|NormalVoice||| > +75=1|NormalVoice||| > +76=1|NormalVoice||| > +77=1|NormalVoice||| > +78=1|NormalVoice||| > +79=1|NormalVoice||| > +80=1|NormalVoice||| > +81=1|NormalVoice||| > +82=1|NormalVoice||| > +83=1|NormalVoice||| > +default=1|NormalVoice||| > +[ControlState Behavior Table] > +1=1|NormalVoice||| > +2=1|NormalVoice||| > +4=1|NormalVoice||| > +8=1|NormalVoice||| > +16=1|NormalVoice||| > +32=1|NormalVoice||| > +64=1|NormalVoice||| > +128=1|NormalVoice||| > +256=1|NormalVoice||| > +512=1|NormalVoice||| > +1024=1|NormalVoice||| > +2048=1|NormalVoice||| > +4096=1|NormalVoice||| > +default=1|NormalVoice||| > +[Information] > +Description=special scheme for use with latex. > > Added: latex_access/hungarian_speech.py > =================================================================== > --- latex_access/hungarian_speech.py (rev 0) > +++ latex_access/hungarian_speech.py 2014-10-28 14:04:24 UTC (rev 483) > @@ -0,0 +1,428 @@ > +# -*- coding: utf8 -*- > +# speech.py > +# A part of the latex-access project at http://latex-access.sourceforge.net/ > +# Author: Alastair Irving <ala...@sj...> > +# Modified by: Istvan Velegi <iv...@gm...> > +# Copyright (C) 2011 Alastair Irving/latex-access Contributors > + > +# This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; > +# either version 2 of the License, or (at your option) any later version. > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > +# See the GNU General Public License for more details. > +# You should have received a copy of the GNU General Public License along with this program; if not, visit <http://www.gnu.org/licenses> > +# > +'''Module to provide speech output for latex_access.''' > + > +import latex_access > +from latex_access import get_arg > +import re > + > +primes=re.compile(r"^\s*(\\p+rime\s*)+$") > +argprimes=re.compile(r"^\s*\(.*\)$") > +absertek =re.compile(r"\|([^\|]+)\|") > +#norma =re.compile(r"\\|(.)\\|+") > +sqrt_with_two_args =re.compile(r".*\\sqrt\[(.?)\]") > + > +#Define a list of words to use as denominators of simple fractions > +denominators=[" per 0 "," per 1 "," ketted"," harmad"," negyed",u" ötöd"," hatod"," heted"," nyolcad"," kilenced"] > + > +class speech(latex_access.translator): > + '''Speech translator class.''' > + > + def __init__(self): > + self.handleBracketsAsPrime =False > + self.abbrev_first_root_arg =False > + latex_access.translator.__init__(self) > + self.files.append("speech.table") > + self.load_files() > + > + new_table={"\\cap":self.cap, "\\bigcap":self.cap, "\\binom":self.binom,"\\vec":self.vect,"\\underline":self.underline,"$":self.dollar,"^":self.super,"_":("<sub>","</sub>"),"\\pmod":("mod <sub>","</sub>"),"\\widetilde":self.tilde,"\\tilde":self.tilde,"\\sqrt":self.sqrt,"\\frac":self.frac,"\\dfrac":self.frac,"\\ds":self.dsfrac,"\\int":self.integral,"\\dbint":self.dbintegral,"\\ddint":self.ddintegral,"\\oint":self.ointegral,"\\cup":self.union,"\\bigcup":self.union,"\\sum":self.sum,"\\prod":self.prod,"\\bf":("<bold>","</bold>"),"\\mathbf":("<bold>","</bold>"),"\\mathbb":("<bold>","</bold>"),"\\mathcal":("<mathcal>","</mathcal>"), "\\em":("<em>","</em>"), "\\it":("<em>","</em>"), "\\log":self.log,"\\ang":self.ang,"\\tag":self.tag,"\\hat":self.hat,"\\widehat":self.hat,"\\bar":("",u" felülvonás "),"\\overline":self.overline,"\\dot":("","pont"),"\\ddot":("","duplapont")} > + for (k,v) in new_table.iteritems(): > + self.table[k]=v > + self.space=" " > + > + > + def correct(self, inputstr): > + inputstr =inputstr.replace("xy", "x y") > + inputstr =inputstr.replace("yx", "y x") > + inputstr =inputstr.replace("yy", "y y") > + inputstr =inputstr.replace("ix", "i x") > + inputstr =inputstr.replace("imx", "i m x") > + inputstr =inputstr.replace("ikx", "i k x") > + inputstr =inputstr.replace("isx", "i es x") > + inputstr =inputstr.replace("inx", "i n x") > + return inputstr > + > + def lowerSuffixParse(self, inputstr): > + l1 =["1", "2", "4", "5", "7", "9", "x", "b", "c"] > + l2 =["3", "6", "8", "y"] > + if len(inputstr) ==0: > + return u"-tól " > + if len(inputstr) >1 and inputstr.endswith(u"egyenlő 0") or inputstr[:-1].isdigit() and inputstr[-2] ==u"0" and inputstr[-1] ==u"0" and inputstr !=u"1000": > + return inputstr+u"-tól " > + if inputstr ==u"0": > + return u" nullától " > + if inputstr[-1].lower() in l1: > + return inputstr+u"-től " > + elif inputstr[-1].lower() in l2: > + return inputstr +u"-tól " > + else: > + if inputstr[-1].lower() ==u"a": > + return inputstr[:-1] +inputstr[-1].lower().replace(u"a", u"ától ") > + if inputstr[-2:].lower() =="a ": > + return inputstr[:-2] +inputstr[-2:].lower().replace(u"a ", u"ától ") > + return inputstr +u"-től " > + > + def upperSuffixParse(self, inputstr): > + if inputstr.lower().endswith("a"): > + return inputstr[:-1] +inputstr[-1].lower().replace(u"a", u"áig ") > + elif inputstr[-2:] =="a ": > + return inputstr[:-2] +inputstr[-2:].lower().replace(u"a ", u"áig ") > + else: > + return inputstr +u"-ig " > + > + def super(self,input,start): > + '''Translate superscripts into speech. > + Returns a touple with translated string and index of > + first char after end of super.''' > + > + arg_with_minus =re.compile(r"-.?") > + arg=get_arg(input,start) > + #Handle squared and cubed as special cases > + if arg[0] == "2": > + translation=u" négyzet " > + elif arg[0]=="3": > + translation=u" köb " > + > + elif len(arg[0]) <2 or arg_with_minus.match(arg[0]): > + translation =u" ad %s, " % self.correct(self.translate(arg[0])) > + > + #Handle primes > + elif primes.match(arg[0]): > + if arg[0].count("p") ==1: > + if arg[0].count("\\prime") ==1: > + translation=u" vessző " > + else: > + translation=u" " +str(arg[0].count("\\prime")).replace("2", u"két") +u" vessző " > + elif arg[0].count("p") >1: > + translation=u" " +str(self.correct(arg[0]).count("p")).replace("2", u"két") +u" vessző " > + > + elif argprimes.match(arg[0]) and self.handleBracketsAsPrime: > + translation =u" %s " % self.translate(self.correct(arg[0])) +u" vessző " > + else: > + translation = u" ad <sup> %s </sup>" % self.translate(self.correct(arg[0])) > + return (translation, arg[1]) > + > + def sqrt(self,input,start): > + '''Translates roots into speech. > + > + returns touple.''' > + if sqrt_with_two_args.match(input): > + first_arg =latex_access.get_optional_arg(input, start) > + second_arg=get_arg(input, first_arg[1]) > + > + if self.abbrev_first_root_arg ==True: > + if first_arg[0].isdigit() or len(first_arg[0]) ==1: > + translation =denominators[int(first_arg[0])] +" " > + elif first_arg[0] in ["x", "n"] and len(first_arg[0]) ==1: > + translation =first_arg[0] +u"-ed " > + elif first_arg[0] =="3": > + translation =u" köb " > + else: > + translation =self.correct(self.translate(first_arg[0])) +u". " > + > + else: > + if first_arg[0] =="3": > + translation =u" köb " > + elif first_arg[0].lower() =="n": > + translation =u"n-edik " > + elif first_arg[0] =="x": > + translation ="x-edik " > + else: > + translation =self.correct(self.translate(first_arg[0])) +u". " > + > + if len(second_arg[0]) ==1: > + translation +=u" gyök " +self.correct(self.translate(second_arg[0])) > + else: > + translation +=u" gyök alatt, "+self.correct(self.translate(second_arg[0])) +u", gyök zár " > + return (translation, second_arg[1]) > + > + arg=get_arg(input, start) > + if arg[0].isdigit() or len(arg[0])==1: > + translation=u" gyök " +arg[0] > + else: > + translation=u" gyök alatt, " +self.correct(self.translate(arg[0])) +u", gyök zár" > + return (translation,arg[1]) > + > + def norma(self, input, start): > + m =absertek.match(input) > + > + if m is not None: > + arg=get_arg("{"+m.group(1)+"}", 0) > + if len(arg[0]) ==1: > + output =self.translate(arg[0])+u" abszolút " > + return (output, arg[1]) > + else: > + output =u" abszolút " +self.translate(arg[0]+u" abszolút ") > + return (output, arg[1]) > + else: > + arg =get_arg(input, start-1) > + output =u" függőleges " > + return (output, arg[1]) > + > + > + def frac(self,input,start): > + '''Translate fractions into speech. > + > + Returns touple.''' > + numerator=get_arg(input,start) > + if numerator[1]<len(input): > + denominator=get_arg(input,numerator[1]) > + else: > + denominator=("",numerator[1]) > + if len(numerator[0])==1 and len(denominator[0])==1: > + if numerator[0].isdigit() and denominator[0].isdigit(): > + translation = numerator[0]+denominators[int(denominator[0])] > + if int(numerator[0])>1: > + translation+="" > + translation+=" " > + else: > + translation =" %s per %s " % (self.correct(numerator[0]), self.correct(denominator[0])) > + else: > + translation=u" tört, %s per %s, tört zár " % (self.translate(self.correct(numerator[0])), self.translate(self.correct(denominator[0]))) > + return (translation,denominator[1]) > + > + def dsfrac(self,input,start): > + arg=get_arg(input,start) > + translation=u" tört "+self.correct(self.translate(arg[0])) +u" tört zár " > + return (translation,arg[1]) > + > + def integral(self,input,start): > + '''Translate integrals, including limits of integration. > + Returns touple.''' > + > + (lower,upper,i)=latex_access.get_subsuper(input,start) > + output =u"integrál " > + if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0: > + output +=self.lowerSuffixParse(self.translate(lower[0])) > + output +=self.upperSuffixParse(self.translate(upper[0])) > + else: > + if lower is not None and len(lower[0]) !=0: > + output +="<sub>"+self.correct(self.translate(lower[0]))+"</sub>" > + return (output,i) > + > + def dbintegral(self,input,start): > + '''Translate integrals, including limits of integration. > + Returns touple.''' > + output =u"kettős integrál " > + (lower,upper,i)=latex_access.get_subsuper(input,start) > + if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0: > + output +=self.lowerSuffixParse(self.translate(lower[0])) > + output +=self.upperSuffixParse(self.translate(upper[0])) > + else: > + if lower is not None and len(lower[0]) !=0: > + output +="<sub>"+self.correct(self.translate(lower[0]))+"</sub>" > + return (output,i) > + > + def ddintegral(self,input,start): > + '''Translate integrals, including limits of integration. > + Returns touple.''' > + > + (lower,upper,i)=latex_access.get_subsuper(input,start) > + output =u"hármas integrál " > + if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0: > + output +=self.lowerSuffixParse(self.translate(lower[0])) > + output +=self.upperSuffixParse(self.translate(upper[0])) > + else: > + if lower is not None and len(lower[0]) !=0: > + output +="<sub>"+self.correct(self.translate(lower[0]))+"</sub>" > + return (output,i) > + > + def ointegral(self,input,start): > + '''Translate integrals, including limits of integration. > + Returns touple.''' > + > + (lower,upper,i)=latex_access.get_subsuper(input,start) > + output =u"hurokintegrál " > + if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0: > + output +=self.lowerSuffixParse(self.translate(lower[0])) > + output +=self.upperSuffixParse(self.translate(upper[0])) > + elif lower is not None and len(lower[0]) !=0: > + output +="<sub>"+self.correct(self.translate(lower[0]))+"</sub>" > + > + return (output,i) > + > + def sum(self,input,start): > + '''Translate summas, including limits of summarization. > + Returns touple.''' > + input.replace("\\limits", "") > + (lower,upper,i)=latex_access.get_subsuper(input,start) > + output=u" szumma " > + if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0: > + output +=self.lowerSuffixParse(self.translate(lower[0])).replace(u"egyenlő", u"megy") > + output +=self.upperSuffixParse(self.translate(upper[0])) > + elif lower is not None and len(lower[0]) !=0: > + output +="<sub>"+self.correct(self.translate(lower[0]))+"</sub>" > + > + return (output,i) > + > + def prod(self,input,start): > + '''Translate products, including limits of producttion. > + Returns touple.''' > + input.replace("\\limits", "") > + (lower,upper,i)=latex_access.get_subsuper(input,start) > + output=u" produktum " > + if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0: > + output +=self.lowerSuffixParse(self.translate(lower[0])).replace(u"egyenlő", u"megy") > + output +=self.upperSuffixParse(self.translate(upper[0])) > + elif lower is not None and len(lower[0]) !=0: > + output +="<sub>"+self.correct(self.translate(lower[0]))+"</sub>" > + > + return (output,i) > + > + def union(self,input,start): > + '''Translate unions, including limits of unition. > + Returns touple.''' > + (lower,upper,i)=latex_access.get_subsuper(input,start) > + output=u" unió " > + if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0: > + output +=self.lowerSuffixParse(self.translate(lower[0])).replace(u"egyenlő", u"megy") > + output +=self.upperSuffixParse(self.translate(upper[0])) > + elif lower is not None and len(lower[0]) !=0: > + output +="<sub>"+self.correct(self.translate(lower[0]))+"</sub>" > + > + return (output,i) > + > + def cap(self,input,start): > + '''Translate intersections, including limits of intersection. > + Returns touple.''' > + (lower,upper,i)=latex_access.get_subsuper(input,start) > + output=u" metszet " > + if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0: > + output +=self.lowerSuffixParse(self.translate(lower[0])).replace(u"egyenlő", u"megy") > + output +=self.upperSuffixParse(self.translate(upper[0])) > + elif lower is not None and len(lower[0]) !=0: > + output +="<sub>"+self.correct(self.translate(lower[0]))+"</sub>" > + > + return (output,i) > + > + def tag(self,input,start): > + '''Translate tags into speech. > + > + Returns a touple with translated string and index of > + first char after end of tag.''' > + > + arg=get_arg(input,start) > + translation=" tag left paren "+arg[0]+" right paren " > + return (translation,arg[1]) > + > + def ang(self,input,start): > + '''Translate angles into speech. > + > + Returns a touple with translated string and index of > + first char after end of angle.''' > + > + translation = "" > + counter = 0 > + arg=get_arg(input,start) > + if ';' in arg[0]: # we have mins possibly seconds too > + for x in arg[0]: > + if ';' == x: # we have mins/sec > + counter=counter+1 > + if counter == 1: > + translation=translation+" degrees " > + continue > + elif counter == 2: > + translation=translation+" minutes " > + continue > + elif counter == 3: > + translation=translation+" seconds " > + continue > + translation=translation+x > + if counter == 1: > + translation=translation+" minutes" > + elif counter == 2: > + translation=translation+" seconds" > + else: > + translation=arg[0]+" degrees" > + return (translation,arg[1]) > + > + def log(self,input,start): > + '''Translate logs into speech. > + We translate logs in the form \log_a(x) as > + log base a of x > + > + If the log appears ambiguous, i.e. we can not reasonably > + determine the base, we shall translate as just "log" followed by > + any usual translation. > + > + Returns a touple with translated string and index of > + first char after end of entire logarithm.''' > + > + > + log=get_arg(input,start) > + if len(log[0]) < 1 or log[0][0] != "_": # \log by itself > + return (" log ", log[2]) # ignore the supposed command > + > + # Safe to assume log is of the form \log_a(x) > + translation =u"" > + base=get_arg(input, log[1]) > + translation+=self.translate(base[0]) > + translation+=u" alapú logaritmus " > + > + return (translation, base[1]) > + > + def underline(self,input,start): > + arg=get_arg(input,start) > + translation=self.translate(arg[0]) > + return (translation,arg[1]) > + > + def overline(self,input,start): > + arg=get_arg(input,start) > + if arg[0].isdigit() or len(arg[0])==1: > + translation=arg[0]+u" felülvonás " > + else: > + translation=u" felülvonás "+self.translate(self.correct(arg[0])) +u" felülvonás zár " > + return (translation,arg[1]) > + > + def tilde(self,input,start): > + arg=get_arg(input,start) > + if arg[0].isdigit() or len(arg[0])==1: > + translation=arg[0]+u" hullám " > + else: > + translation=u" hullám "+self.translate(self.correct(arg[0])) +u" hullám zár " > + return (translation,arg[1]) > + > + def hat(self,input,start): > + arg=get_arg(input,start) > + if arg[0].isdigit() or len(arg[0])==1: > + translation=arg[0]+u" kalap " > + else: > + translation=u" kalap "+self.translate(self.correct(arg[0])) +u" kalap zár " > + return (translation,arg[1]) > + > + def vect(self,input,start): > + arg=get_arg(input,start) > + if arg[0].isdigit() or len(arg[0])==1: > + translation=arg[0].replace("a", u"á") +u" vektor " > + else: > + translation=u" vektor, "+self.translate(self.correct(arg[0])) +u", vektor zár " > + return (translation,arg[1]) > + > + def binom(self, input, start): > + '''Translate binomials into speech. > + Returns touple.''' > + > + arg_1=get_arg(input,start) > + if arg_1[1]<len(input): > + arg_2=get_arg(input,arg_1[1]) > + else: > + arg_2=("",arg_1[1]) > + > + if len(arg_1[0])==1 and len(arg_2[0])==1: > + translation =" %s alatt %s " % (self.correct(self.translate(arg_1[0])), self.correct(self.translate(arg_2[0]))) > + else: > + translation=u" binom, %s alatt %s, binom zár " % (self.correct(self.translate(arg_1[0])), self.correct(self.translate(arg_2[0]))) > + return (translation, arg_2[1]) > + > > Modified: latex_access/hungarian_speech.table > =================================================================== > --- latex_access/hungarian_speech.table 2014-10-26 05:09:23 UTC (rev 482) > +++ latex_access/hungarian_speech.table 2014-10-28 14:04:24 UTC (rev 483) > @@ -6,18 +6,21 @@ > > nagyobb > * szorozva > \times kereszt > -\div osztva > +\div per > +\over per > +/ per > \pm pluszminusz > \leq kisebb egyenlő > +\leqq kisebb egyenlő > \le kisebb egyenlő > \geq nagyobb egyenlő > \ge nagyobb egyenlő > +\geqq nagyobb egyenlő > \equiv ekvivalens > \neq nem egyenlő > \ne nem egyenlő > \ll kisebb kisebb > \gg nagyobb nagyobb > -\prod produktum > \pm pluszminusz > \mp minuszplusz > \leftrightarrow akkor és csak akkor ha > @@ -27,122 +30,130 @@ > \Leftrightarrow akkor és csak akkor ha > \longrightarrow jobbranyíl > \longleftrightarrow akkor és csak akkor ha > +\Longleftrightarrow akkor és csak akkor ha > \wedge és > \vee vagy > \lnot nem > \not nem > +\neg nem > \propto proportional to > -\min min > -\max max > +\min min > +\max max > > ; Trigonometrikus és hiperbolikus függvények > \tanh tangens hiperbolikusz > \tan tangens > +\arctan arkusz tangens > \sinh szinusz hiperbolikusz > \sin szinusz > +\arcsin arkusz szinusz > \cosh koszinusz hiperbolikusz > \cos koszinusz > +\arccos arkusz koszinusz > > ; Nagy görög betűk > -\Alpha nagy alfa > -\Beta nagy béta > -\Gamma nagy gamma > -\Delta nagy delta > -\Epsilon nagy epszilon > -\Zeta nagy zeta > -\Eta nagy éta > -\Theta nagy teta > +\Alpha nagy alfa > +\Beta nagy béta > +\Gamma nagy gamma > +\Delta nagy delta > +\Epsilon nagy epszilon > + > +\Zeta nagy zeta > +\Eta nagy éta > +\Theta nagy teta > \Iota nagy iota > \Kappa nagy kappa > -\Lambda nagy lambda > +\Lambda nagy lambda > \Mu nagy mű > \Nu nagy nű > \Xi nagy xí > \Omicron nagy omikron > \Pi nagy pí > \Rho nagy ró > -\Sigma nagy szigma > -\Tau nagy tau > -\Upsilon nagy upszilon > -\Phi nagy fí > +\Sigma nagy szigma > +\Tau nagy tau > +\Upsilon nagy upszilon > +\Phi nagy fí > \Psi nagy pszí > -\Chi nagy khí > -\Omega nagy omega > +\Chi nagy khí > +\Omega nagy omega > > ; kis görög betűk > -\alpha alfa > -\beta béta > -\gamma gamma > -\delta delta > -\epsilon epszilon > -\zeta zeta > -\eta éta > -\theta teta > +\alpha alfa > +\beta béta > +\gamma gamma > +\delta delta > +\epsilon epszilon > +\zeta zeta > +\eta éta > +\theta teta > \iota iota > \kappa kappa > -\lambda lambda > -\mu mű > -\nu nű > -\xi xí > -\omicron omikron > -\pi pí > -\rho ró > -\sigma szigma > -\tau tau > -\upsilon upszilon > -\phi fí > -\psi pszí > -\chi khí > -\omega omega > +\lambda lambda > +\mu mű > +\nu nű > +\xi xí > +\omicron omikron > +\pi pí > +\rho ró > +\sigma szigma > +\tau tau > +\upsilon upszilon > +\phi fí > +\psi pszí > +\chi khí > +\omega omega > > -\varpi pí > -\varphi fí > -\vartheta teta > +\varpi pí > +\varphi fí > +\vartheta teta > +\varepsilon epszilon > > - > ; set theory > -\bigcap metszet > -\bigcup unió > -\setminus set minus > -\cap metszet > +\setminus különbség > \triangleleft normál alcsoport > -\therefore ezért > +\therefore ezért > \supseteq szuperhalmaz vagy egyenlő > -\supset szuperhalmaz > -\subseteq részhalmaza vagy egyenlő > +\supset szuperhalmaz > +\subseteq részhalmaza vagy egyenlő > \subset részhalmaza > -\rmint belső pontok > +\rmint interior > \subs része > +\setminus különbség > \in eleme > \notin nem eleme > \ni nem eleme > \forall minden > \exists létezik > -\emptyset üres halmaz > -\cup unió > +\emptyset üres halmaz > \lim limesz > -\{ kezdőkapcsos > -\} végkapcsos > +\{ kezdőkapcsos > +\} végkapcsos > > -; Standard latex parancsok jobb olvasáshoz: > +; Standard latex parancsok gördülékenyebb olvasáshoz: > \cdot szorozva > -\cdots pont pont pont > -\right > -\quad > -\qquad > -\left > +\cdots pont pont pont > +\vdots pont pont pont > +\right > +\quad > +\qquad > +\left > \ldots pont pont pont > \dots pont pont pont > -\; > -\, > -\! > +\; > +\, > +\! > +\rm > \textbackslash \ > -\dsp > +\dsp > +\Dsp > +\mathop > +\limits > \textdegree fok > > ; calculus > -\partial parciális > -\nabla nabla > +\partial parciális > +\nabla nabla > > > Speciális karakterek > @@ -152,7 +163,21 @@ > Valószínűség és permutáció > \Pr valószínűség > ! faktoriális > -| függőleges > +\choose alatt > +\Choose alatt > + > + > +Egyéb jelölések > ' vessző > \Vert norma > -\vert norma > \ No newline at end of file > +\vert norma > +| függőleges > +\haf f kalap > +\clF fourier transzformált > +\lceil felfelé kerekít > +\rceil kerekítés zár > +\exp e ad > +\ovz z konjugált > + > +;list item operators: > +\item item > \ No newline at end of file > > Modified: latex_access/speech.py > =================================================================== > --- latex_access/speech.py 2014-10-26 05:09:23 UTC (rev 482) > +++ latex_access/speech.py 2014-10-28 14:04:24 UTC (rev 483) > @@ -1,174 +1,174 @@ > -# speech.py > -# A part of the latex-access project at http://latex-access.sourceforge.net/ > -# Author: Alastair Irving <ala...@sj...> > -# Copyright (C) 2011 Alastair Irving/latex-access Contributors > -# > -# This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; > -# either version 2 of the License, or (at your option) any later version. > -# > -# This program is distributed in the hope that it will be useful, > -# but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > -# See the GNU General Public License for more details. > -# > -# You should have received a copy of the GNU General Public License along with this program; if not, visit <http://www.gnu.org/licenses> > -# > -'''Module to provide speech output for latex_access.''' > - > - > -import latex_access > -from latex_access import get_arg > - > -#Define a list of words to use as denominators of simple fractions > -denominators=[" over zero"," over1 "," half"," third"," quarter"," fifth"," sixth"," seventh"," eight"," ninth"] > - > -class speech(latex_access.translator): > - '''Speech translator class.''' > - def __init__(self): > - latex_access.translator.__init__(self) > - self.files.append("speech.table") > - self.load_files() > - new_table={"^":self.super,"_":("<sub>","</sub>"),"\\pmod":("mod <sub>","</sub>"),"\\sqrt":self.sqrt,"\\frac":self.frac,"\\tfrac":self.frac,"\\dfrac":self.frac,"\\int":self.integral,"\\mathbf":("<bold>","</bold>"),"\\mathbb":("<bold>","</bold>"),"\\mathcal":("<mathcal>","</mathcal>"), > - "\\log":self.log,"\\ang":self.ang,"\\tag":self.tag,"\\hat":("","hat"),"\\widehat":("","hat"),"\\bar":("","bar"),"\\overline":("","bar"),"\\dot":("","dot"),"\\ddot":("","double dot")} > - > - for (k,v) in new_table.iteritems(): > - self.table[k]=v > - self.space=" " > - > - > - > - > - > - def super(self,input,start): > - '''Translate superscripts into speech. > - > - Returns a touple with translated string and index of > - first char after end of super.''' > - arg=get_arg(input,start) > - #Handle squared and cubed as special cases > - if arg[0] == "2": > - translation=" squared " > - elif arg[0]=="3": > - translation=" cubed " > - #Handle primes > - elif latex_access.primes.match(arg[0]): > - translation=" prime "*arg[0].count("\\prime") > - else: > - translation = " to the %s end super " % self.translate(arg[0]) > - return (translation,arg[1]) > - > - > - def sqrt(self,input,start): > - '''Translates squareroots into speech. > - > - returns touple.''' > - arg=get_arg(input,start) > - if arg[0].isdigit() or len(arg[0])==1: > - translation=" root "+arg[0] > - else: > - translation=" begin root "+self.translate(arg[0])+" end root " > - return (translation,arg[1]) > - > - > - > - def frac(self,input,start): > - '''Translate fractions into speech. > - > - Returns touple.''' > - numerator=get_arg(input,start) > - if numerator[1]<len(input): > - denominator=get_arg(input,numerator[1]) > - else: > - denominator=("",numerator[1]) > - if len(numerator[0])==1 and len(denominator[0])==1: > - if numerator[0].isdigit() and denominator[0].isdigit(): > - translation = numerator[0]+denominators[int(denominator[0])] > - if int(numerator[0])>1: > - translation+="s" > - translation+=" " > - else: > - translation =" %s over %s " % (numerator[0], denominator[0]) > - else: > - translation=" begin frac %s over %s end frac " % (self.translate(numerator[0]), self.translate(denominator[0])) > - return (translation,denominator[1]) > - > - def integral(self,input,start): > - '''Translate integrals, including limits of integration. > - > - Returns touple.''' > - (lower,upper,i)=latex_access.get_subsuper(input,start) > - output=" integral " > - if lower is not None: > - output+="from " > - output+=self.translate(lower[0]) > - if upper is not None: > - output+=" to " > - output+=self.translate(upper[0]) > - output+=" of " > - return (output,i) > - > - def tag(self,input,start): > - '''Translate tags into speech. > - > - Returns a touple with translated string and index of > - first char after end of tag.''' > - > - arg=get_arg(input,start) > - translation=" tag left paren "+arg[0]+" right paren " > - return (translation,arg[1]) > - > - def ang(self,input,start): > - '''Translate angles into speech. > - > - Returns a touple with translated string and index of > - first char after end of angle.''' > - > - translation = "" > - counter = 0 > - arg=get_arg(input,start) > - if ';' in arg[0]: # we have mins possibly seconds too > - for x in arg[0]: > - if ';' == x: # we have mins/sec > - counter=counter+1 > - if counter == 1: > - translation=translation+" degrees " > - continue > - elif counter == 2: > - translation=translation+" minutes " > - continue > - elif counter == 3: > - translation=translation+" seconds " > - continue > - translation=translation+x > - if counter == 1: > - translation=translation+" minutes" > - elif counter == 2: > - translation=translation+" seconds" > - else: > - translation=arg[0]+" degrees" > - return (translation,arg[1]) > - > - def log(self,input,start): > - '''Translate logs into speech. > - > - We translate logs in the form \log_a(x) as > - log base a of x > - > - If the log appaears ambiguous, i.e. we can not reasonably > - determine the base, we shall translate as just "log" followed by > - any usual translation. > - > - Returns a touple with translated string and index of > - first char after end of entire logarithm.''' > - > - log=get_arg(input,start) > - translation=" log " > - if len(log[0]) < 1 or log[0][0] != "_": # \log by itself > - return (translation, log[2]) # ignore the supposed command > - > -# Safe to assume log is of the form \log_a(x) > - translation+="base " > - base=get_arg(input, log[1]) > - translation+=self.translate (base[0]) > - translation+=" of " > - return (translation, base[1]) > - > +# speech.py > +# A part of the latex-access project at http://latex-access.sourceforge.net/ > +# Author: Alastair Irving <ala...@sj...> > +# Copyright (C) 2011 Alastair Irving/latex-access Contributors > +# > +# This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; > +# either version 2 of the License, or (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > +# See the GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License along with this program; if not, visit <http://www.gnu.org/licenses> > +# > +'''Module to provide speech output for latex_access.''' > + > + > +import latex_access > +from latex_access import get_arg > + > +#Define a list of words to use as denominators of simple fractions > +denominators=[" over zero"," over1 "," half"," third"," quarter"," fifth"," sixth"," seventh"," eight"," ninth"] > + > +class speech(latex_access.translator): > + '''Speech translator class.''' > + def __init__(self): > + latex_access.translator.__init__(self) > + self.files.append("speech.table") > + self.load_files() > + new_table={"^":self.super,"_":("<sub>","</sub>"),"\\pmod":("mod <sub>","</sub>"),"\\sqrt":self.sqrt,"\\frac":self.frac,"\\tfrac":self.frac,"\\dfrac":self.frac,"\\int":self.integral,"\\mathbf":("<bold>","</bold>"),"\\mathbb":("<bold>","</bold>"),"\\mathcal":("<mathcal>","</mathcal>"), > + "\\log":self.log,"\\ang":self.ang,"\\tag":self.tag,"\\hat":("","hat"),"\\widehat":("","hat"),"\\bar":("","bar"),"\\overline":("","bar"),"\\dot":("","dot"),"\\ddot":("","double dot")} > + > + for (k,v) in new_table.iteritems(): > + self.table[k]=v > + self.space=" " > + > + > + > + > + > + def super(self,input,start): > + '''Translate superscripts into speech. > + > + Returns a touple with translated string and index of > + first char after end of super.''' > + arg=get_arg(input,start) > + #Handle squared and cubed as special cases > + if arg[0] == "2": > + translation=" squared " > + elif arg[0]=="3": > + translation=" cubed " > + #Handle primes > + elif latex_access.primes.match(arg[0]): > + translation=" prime "*arg[0].count("\\prime") > + else: > + translation = " to the %s end super " % self.translate(arg[0]) > + return (translation,arg[1]) > + > + > + def sqrt(self,input,start): > + '''Translates squareroots into speech. > + > + returns touple.''' > + arg=get_arg(input,start) > + if arg[0].isdigit() or len(arg[0])==1: > + translation=" root "+arg[0] > + else: > + translation=" begin root "+self.translate(arg[0])+" end root " > + return (translation,arg[1]) > + > + > + > + def frac(self,input,start): > + '''Translate fractions into speech. > + > + Returns touple.''' > + numerator=get_arg(input,start) > + if numerator[1]<len(input): > + denominator=get_arg(input,numerator[1]) > + else: > + denominator=("",numerator[1]) > + if len(numerator[0])==1 and len(denominator[0])==1: > + if numerator[0].isdigit() and denominator[0].isdigit(): > + translation = numerator[0]+denominators[int(denominator[0])] > + if int(numerator[0])>1: > + translation+="s" > + translation+=" " > + else: > + translation =" %s over %s " % (numerator[0], denominator[0]) > + else: > + translation=" begin frac %s over %s end frac " % (self.translate(numerator[0]), self.translate(denominator[0])) > + return (translation,denominator[1]) > + > + def integral(self,input,start): > + '''Translate integrals, including limits of integration. > + > + Returns touple.''' > + (lower,upper,i)=latex_access.get_subsuper(input,start) > + output=" integral " > + if lower is not None: > + output+="from " > + output+=self.translate(lower[0]) > + if upper is not None: > + output+=" to " > + output+=self.translate(upper[0]) > + output+=" of " > + return (output,i) > + > + def tag(self,input,start): > + '''Translate tags into speech. > + > + Returns a touple with translated string and index of > + first char after end of tag.''' > + > + arg=get_arg(input,start) > + translation=" tag left paren "+arg[0]+" right paren " > + return (translation,arg[1]) > + > + def ang(self,input,start): > + '''Translate angles into speech. > + > + Returns a touple with translated string and index of > + first char after end of angle.''' > + > + translation = "" > + counter = 0 > + arg=get_arg(input,start) > + if ';' in arg[0]: # we have mins possibly seconds too > + for x in arg[0]: > + if ';' == x: # we have mins/sec > + counter=counter+1 > + if counter == 1: > + translation=translation+" degrees " > + continue > + elif counter == 2: > + translation=translation+" minutes " > + continue > + elif counter == 3: > + translation=translation+" seconds " > + continue > + translation=translation+x > + if counter == 1: > + translation=translation+" minutes" > + elif counter == 2: > + translation=translation+" seconds" > + else: > + translation=arg[0]+" degrees" > + return (translation,arg[1]) > + > + def log(self,input,start): > + '''Translate logs into speech. > + > + We translate logs in the form \log_a(x) as > + log base a of x > + > + If the log appaears ambiguous, i.e. we can not reasonably > + determine the base, we shall translate as just "log" followed by > + ... [truncated message content] |
|
From: <iv...@us...> - 2014-10-28 14:04:30
|
Revision: 483
http://sourceforge.net/p/latex-access/code/483
Author: ivelegi
Date: 2014-10-28 14:04:24 +0000 (Tue, 28 Oct 2014)
Log Message:
-----------
Major updates in speech and Jaws scripts
The following modifications in the English speechfiles and jaws files are not placed in the original files till Alastair revise them. So my Jaws scripts are put under "modified by Istvan" folder.
Here comes my changelog:
Improved support for Hungarian speech.
Added implementation for the following in both English and Hun:
processing of roots including nth and special ones like square, cube.
Sum, including limits
production, including limits
set operations:
union, including limits
intersection, including limits, eg.g
\cap_{1}^{n} a_i =P
The above operation commands were removed from the speech.table as their implementation is made in "speech.py".
Added support for the following:
1. Double, triple integrals and loop integrals.
2. A new command of fractions, namely the "\ds" . For example: \ds{a\over b
3. Binomials with two commands: \binom{a}{b} and "a \choose b"
4. vector command in two ways:
\vec{x} and \vec{x +2}
5. \ln command
Added a "correct" function in speech.py to let speech sinthesizers say correctly the double letter variaables like "xx", "yy", "dydx", ecc. I use this function in most functions e. g. superscript, sqrt, and integrals.
Changed behaviour for superscript text. Now Jaws reads the superscripted data with the superscript voice without telling "begin super" and "end super",
making the reading more convenient.
In the jaws scripts, the <sup> and </sup> tags are treated as superscript texts, which is done in speech.py, similar to the way the italic text is implemented.
Of course I modified the super function and didn't use a sinple touple.
Improved support for bold, italic texts by adding new commands for them in the same way as they were implemented originally.
Jaws scripts improvements:
Modified the voice alias for \mathcal command from italic to double strikeout voice.
Added support for superscript text, and assigned superscript voice fo this.
Added a message when pressing the re-initialisation keystroke in both speech and braille.
Modified Paths:
--------------
latex_access/hungarian_speech.table
latex_access/speech.py
test.tex
Added Paths:
-----------
jaws/modified_by_istvan/
jaws/modified_by_istvan/latex.JCF
jaws/modified_by_istvan/latex.JSS
jaws/modified_by_istvan/latex.jbs
jaws/modified_by_istvan/latex.jkm
jaws/modified_by_istvan/latex.jsb
jaws/modified_by_istvan/latex.jsd
jaws/modified_by_istvan/latex.jsm
jaws/modified_by_istvan/latex.smf
latex_access/hungarian_speech.py
latex_access/speech_modified.py
latex_access/speech_modified.table
Added: jaws/modified_by_istvan/latex.JCF
===================================================================
--- jaws/modified_by_istvan/latex.JCF (rev 0)
+++ jaws/modified_by_istvan/latex.JCF 2014-10-28 14:04:24 UTC (rev 483)
@@ -0,0 +1,7 @@
+[Braille]
+Grade2Translation=0
+BrailleMoveActiveCursor=1
+BrailleTranslationType=1
+ContractedBrailleInput=0
+[Options]
+Scheme=latex
Added: jaws/modified_by_istvan/latex.JSS
===================================================================
--- jaws/modified_by_istvan/latex.JSS (rev 0)
+++ jaws/modified_by_istvan/latex.JSS 2014-10-28 14:04:24 UTC (rev 483)
@@ -0,0 +1,258 @@
+; latex.jss
+; A part of the latex-access project at http://latex-access.sourceforge.net/
+; Author: Alastair Irving <ala...@sj...>
+; Modified by: Istv\xE1n Velegi <iv...@gm...>
+; Copyright (C) 2011 Alastair Irving/latex-access Contributors
+;
+; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
+; either version 2 of the License, or (at your option) any later version.
+;
+; This program is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+; See the GNU General Public License for more details.
+;
+; You should have received a copy of the GNU General Public License along with this program; if not, visit <http://www.gnu.org/licenses>
+;
+
+
+; Documentation by: Jose Tamayo( jt...@ho...)
+;
+; history of changes
+;
+; Needs:
+; 1. JSM file for messages
+; 2. proper variable naming
+; 3. intro for functions.
+; 4. Hungarian notation
+; 5. Move all literals and messages to the latex.jsm file.
+
+
+include "hjconst.jsh"
+
+ include "latex.jsm"
+
+globals int initialised,
+int ProcessMaths,
+object latex_access,
+object matrix,
+int row,
+int column
+
+Void Function AutoStartEvent ()
+if !initialised then
+let latex_access=CreateObject (o_latexAccess)
+let initialised=true
+endif
+EndFunction
+
+
+Script reInitialise ()
+let latex_access=CreateObject (o_latexAccess)
+sayMessage(1, msgReInit_s);
+EndScript
+
+
+Void Function SayLine ()
+if ProcessMaths then
+var string input
+let input = GetLine ()
+
+if StringIsBlank(input) then
+let input = "blank"
+else
+let input = latex_access.speech(input)
+let input = StringReplaceSubstrings (input, "&", "&")
+let input = StringReplaceSubstrings (input, "<sub>", smmGetStartMarkupForAttributes (attrib_subscript|attrib_text))
+let input = StringReplaceSubstrings (input, "</sub>", smmGetEndMarkupForAttributes (attrib_subscript|attrib_text))
+let input = StringReplaceSubstrings (input, "<sup>", smmGetStartMarkupForAttributes (attrib_superscript|attrib_text))
+let input = StringReplaceSubstrings (input, "</sup>", smmGetEndMarkupForAttributes (attrib_superscript|attrib_text))
+let input = StringReplaceSubstrings (input, "<bold>", smmGetStartMarkupForAttributes (attrib_bold|attrib_text))
+let input = StringReplaceSubstrings (input, "</bold>", smmGetEndMarkupForAttributes (attrib_bold|attrib_text))
+let input=StringReplaceSubstrings (input, "<mathcal>", smmGetStartMarkupForAttributes (attrib_double_strikeout|attrib_text))
+let input=StringReplaceSubstrings (input, "</mathcal>", smmGetEndMarkupForAttributes (attrib_double_strikeout|attrib_text))
+endif
+Say (input, ot_selected_item, true)
+else
+SayLine ()
+endif
+EndFunction
+
+Script ToggleMaths ()
+if ProcessMaths then
+let ProcessMaths = false
+SayMessage (ot_status, msgProcessingOff_L, msgProcessingOff_S)
+else
+let ProcessMaths = true
+SayMessage(OT_STATUS,msgProcessingOn_L,msgProcessingOn_S)
+endif
+
+EndScript
+
+Script ToggleDollarsBraille ()
+var int result
+let result=latex_access.toggle_dollars_nemeth()
+if result==-1 then
+SayMessage (ot_status, msgBrailleDollarsOff_L, msgBrailleDollarsOff_S)
+else
+SayMessage (ot_status, msgBrailleDollarsOn_L, msgBrailleDollarsOn_S)
+endif
+EndScript
+
+Script ToggleDollarsSpeech ()
+var int result
+let result=latex_access.toggle_dollars_speech()
+if result==-1 then
+SayMessage (ot_status, msgSpeechDollarsOff_L, msgSpeechDollarsOff_S)
+else
+SayMessage (ot_status, msgSpeechDollarsOn_L, msgSpeechDollarsOn_S)
+endif
+EndScript
+
+Int Function BrailleBuildLine ()
+if ProcessMaths then
+var string input
+let input = GetLine()
+let input = StringReplaceSubstrings (input, sScrollDownSymbols , "")
+let input=StringTrimTrailingBlanks (input)
+let input = latex_access.nemeth(input)
+; now sort out bad dots 456
+let input =StringReplaceSubstrings (input, "_", "\127")
+BrailleAddString (input, 0, 0, 0)
+
+endif
+return true
+EndFunction
+
+Script InputMatrix ()
+let matrix=CreateObject (o_latex_access_matrix)
+let row=1
+let column=1
+matrix.tex_init(GetSelectedText ())
+; JT: Replace the msg var with a message variable in the latex.jsm file
+var string msg
+let msg ="Initialised "
+let msg=msg+inttostring(matrix.rows)
+let msg=msg+sPadBy
+let msg=msg+inttostring(matrix.columns)
+let msg=msg +sPadMatrix
+SayString(msg)
+EndScript
+
+Script HotKeyHelp ()
+; check the virtual buffer and close it if active.
+If UserBufferIsActive () Then
+ UserBufferDeactivate ()
+EndIf
+; Display the help text when the user presses JAWSKey+H
+SayFormattedMessage(OT_USER_BUFFER, msgHotKeyHelp)
+AddHotKeyLinks ()
+EndScript
+
+Script MatrixRight ()
+if column < matrix.columns then
+let column = column+1
+saystring(matrix.get_cell(row,column))
+else
+saystring(sEndRow)
+endif
+EndScript
+
+Script MatrixLeft ()
+if column > 1 then
+let column = column - 1
+saystring(matrix.get_cell(row,column))
+else
+saystring(sStartRow)
+endif
+EndScript
+
+Script MatrixDown ()
+if row < matrix.rows then
+let row = row+1
+saystring(matrix.get_cell(row,column))
+else
+saystring(sEndColumn)
+endif
+EndScript
+
+Script MatrixUp ()
+if row > 1 then
+let row = row - 1
+saystring(matrix.get_cell(row,column))
+else
+SayString(sStartColumn)
+endif
+EndScript
+
+; JT: This variable named i must be changed
+Script SayRow (int i)
+if i>0 && i <= matrix.rows then
+saystring(matrix.get_row(i," "))
+else
+saystring(sInvalidRow)
+endif
+EndScript
+; JT: Find out what i is for and replace if needed.
+Script SayColumn (int i)
+if i>0 && i <=matrix.columns then
+saystring(matrix.get_col(i," "))
+else
+saystring(sInvalidColumn)
+endif
+EndScript
+
+Script preprocessorAdd ()
+var string input, int args, string strargs, string translation
+if InputBox (sCommandToRedefine, "Initial LaTeX", input) then
+if InputBox (sEnterCommandArguments, "Number of arguments", strargs) then
+if InputBox (sEnterCustomCommandDef, "Translation", translation) then
+let args=StringToInt (strargs)
+latex_access.preprocessor_add(input,args,translation)
+endif
+endif
+endif
+EndScript
+
+
+Script PreprocessorFromString ()
+latex_access.preprocessor_from_string(GetSelectedText ())
+
+
+EndScript
+
+
+
+Script PreprocessorWrite ()
+var string filename
+if InputBox (sEnterFileToSaveTo , "Filename", filename) then
+if FileExists (filename) then
+var int result
+let result=ExMessageBox (sFileExistError , sFileExistTitle , MB_YESNO)
+if result==IDNO then
+return
+endif
+endif
+latex_access.preprocessor_write(filename)
+endif
+EndScript
+
+
+Script PreprocessorRead ()
+var string filename
+; JT: another literal to move to the latex.jsm file.
+if InputBox ("enter full filename to read from ", "Filename", filename) then
+if FileExists (filename) then
+latex_access.preprocessor_read(filename)
+else
+MessageBox (sFileNoExist )
+endif
+endif
+EndScript
+
+
+
+
+
+
+
+
Added: jaws/modified_by_istvan/latex.jbs
===================================================================
Added: jaws/modified_by_istvan/latex.jkm
===================================================================
--- jaws/modified_by_istvan/latex.jkm (rev 0)
+++ jaws/modified_by_istvan/latex.jkm 2014-10-28 14:04:24 UTC (rev 483)
@@ -0,0 +1,33 @@
+[Common Keys]
+Control+M=ToggleMaths
+Control+Shift+M=InputMatrix
+Control+Shift+L=MatrixRight
+Control+Shift+J=MatrixLeft
+Control+Shift+K=MatrixDown
+Control+Shift+I=MatrixUp
+Control+Shift+1=SayRow(1)
+Control+Shift+2=SayRow(2)
+Control+Shift+3=SayRow(3)
+Control+Shift+4=SayRow(4)
+Control+Shift+5=SayRow(5)
+Control+Shift+6=SayRow(6)
+Control+Shift+7=SayRow(7)
+Control+Shift+8=SayRow(8)
+Control+Shift+9=SayRow(9)
+Control+Alt+1=SayColumn(1)
+Control+Alt+2=SayColumn(2)
+Control+Alt+3=SayColumn(3)
+Control+Alt+4=SayColumn(4)
+Control+Alt+5=SayColumn(5)
+Control+Alt+6=SayColumn(6)
+Control+Alt+7=SayColumn(7)
+Control+Alt+8=SayColumn(8)
+Control+Alt+9=SayColumn(9)
+Control+Shift+D=ToggleDollarsSpeech
+Control+Shift+R=PreprocessorRead
+Control+Shift+A=preprocessorAdd
+Control+Shift+W=PreprocessorWrite
+Control+Shift+H=PreprocessorFromString
+Insert+H=HotKeyHelp
+Control+Alt+Shift+R=reInitialise
+Control+D=ToggleDollarsBraille
Added: jaws/modified_by_istvan/latex.jsb
===================================================================
(Binary files differ)
Index: jaws/modified_by_istvan/latex.jsb
===================================================================
--- jaws/modified_by_istvan/latex.jsb 2014-10-26 05:09:23 UTC (rev 482)
+++ jaws/modified_by_istvan/latex.jsb 2014-10-28 14:04:24 UTC (rev 483)
Property changes on: jaws/modified_by_istvan/latex.jsb
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: jaws/modified_by_istvan/latex.jsd
===================================================================
--- jaws/modified_by_istvan/latex.jsd (rev 0)
+++ jaws/modified_by_istvan/latex.jsd 2014-10-28 14:04:24 UTC (rev 483)
@@ -0,0 +1,56 @@
+:function AutoStartEvent
+
+:script reInitialise
+:Synopsis Loads the COM object again.
+:Description Run this if there is no speech or Braille.
+
+:function SayLine
+:Synopsis An overidden version of the default, which processes maths before it is spoken.
+
+:script ToggleMaths
+:Synopsis Toggles the speaking of mathematical expressions as either straight latex or a more verbal rendering.
+
+:script ToggleDollarsBraille
+:Synopsis Toggles whether or not dollars are removed in braille.
+
+:script ToggleDollarsSpeech
+:Synopsis Toggles the speaking of dollars.
+
+:function BrailleBuildLine
+:Returns int No Return Description
+
+:script InputMatrix
+:Synopsis Highlight a matrix and then run this script to have it created as an object.
+
+:script HotKeyHelp
+
+:script MatrixRight
+:Synopsis Moves the matrix cursor to the right and speaks the new cell.
+
+:script MatrixLeft
+:Synopsis Moves the matrix cursor to the left and speaks the new cell.
+
+:script MatrixDown
+:Synopsis Moves the matrix cursor down and speaks the cell.
+
+:script MatrixUp
+:Synopsis Moves the matrix cursor up and speaks the cell.
+
+:script SayRow
+:Synopsis Speaks the required row of the matrix.
+
+:script SayColumn
+:Synopsis Says the required column of the matrix
+
+:script preprocessorAdd
+:Synopsis Adds a custom command to the preprocessor.
+
+:script PreprocessorFromString
+:Synopsis adds commands defined in the highlighted text to the preprocessor.
+
+:script PreprocessorWrite
+:Synopsis Saves the preprocessor to a file.
+
+:script PreprocessorRead
+:Synopsis Reads preprepreprocessor entries from a file.
+
Added: jaws/modified_by_istvan/latex.jsm
===================================================================
--- jaws/modified_by_istvan/latex.jsm (rev 0)
+++ jaws/modified_by_istvan/latex.jsm 2014-10-28 14:04:24 UTC (rev 483)
@@ -0,0 +1,133 @@
+; latex.jsm
+; A part of the latex-access project at http://latex-access.sourceforge.net/
+; Author: Alastair Irving <ala...@sj...>
+; Modified by: Istvan Velegi <iv...@gm...>
+; Copyright (C) 2011 Alastair Irving/latex-access Contributors
+;
+; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
+; either version 2 of the License, or (at your option) any later version.
+;
+; This program is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+; See the GNU General Public License for more details.
+;
+; You should have received a copy of the GNU General Public License along with this program; if not, visit <http://www.gnu.org/licenses>
+;
+; Created by Jose Tamayo on 2/25/2010
+; this will allow for latex-access to load the messages and vars correctly.
+
+const
+o_latexAccess = "latex_access",
+o_latex_access_matrix = "latex_access_matrix",
+; input variable literals
+sScrollDownSymbols = "scroll down symbol",
+sPadBy = " by ",
+sPadMatrix = " matrix ",
+sEndRow = "end row",
+sStartRow = "start row",
+sEndColumn = "end column",
+sStartColumn = "start column",
+sInvalidRow = "Invalid Row",
+sInvalidColumn = "invalid column",
+sCommandToReDefine = "Enter the command you wish to re-define.",
+sEnterCommandArguments = "Enter the number of arguments of the command.",
+sEnterCustomCommandDef = "Enter the definition of the custom command, that is, the standard LaTeX to which it is equivalent.",
+sEnterFileToSaveTo = "enter full filename to save to",
+sFileExistError = "The file you specified already exists. Do you wish to replace it?",
+sFileExistTitle = "File Exists",
+sFileNoExist = "File does not exist",
+;keystrokes
+ks1 = "control+shift+d" ;open default file
+
+messages
+@msgReInit_s
+LaTeX addon has been re-initialised.
+@@
+@msgReInit_l
+LaTeX addon has been re-initialised.
+@@
+@msgProcessingOn_S
+Processing on
+@@
+@msgProcessingOn_L
+Maths to be processed to a more verbal form
+@@
+@msgProcessingOff_S
+Processing off
+@@
+@msgProcessingOff_L
+maths to be read as plain latex
+@@
+@msgBrailleDollarsOff_S
+Braille Dollars off
+@@
+@msgBrailleDollarsOff_L
+Dollars will now be ignored in braille
+@@
+@msgBrailleDollarsOn_S
+Braille Dollars on
+@@
+@msgBrailleDollarsOn_L
+Dollars will now be shown in braille
+@@
+
+@msgSpeechDollarsOff_S
+Speech Dollars off
+@@
+@msgSpeechDollarsOff_L
+Dollars will now be ignored in speech
+@@
+@msgSpeechDollarsOn_S
+Speech Dollars on
+@@
+@msgSpeechDollarsOn_L
+Dollars will now be shown in Speech
+@@
+
+; JT HERE
+; Hot key help for latex-access
+@msgHotKeyHelp
+Welcome to the LaTeX Access Tools for JAWS.
+
+NOTE: There is currently no means of independently toggling of speech and braille.
+
+Press %KeyFor(ToggleMaths ) to toggle processing of LaTeX on and off
+Press %KeyFor(ToggleDollarsBraille ) To toggle Braille dollars on or off
+Press %KeyFor(ToggleDollarsSpeech ) To toggle Speech dollars on or off
+Press %KeyFor(InputMatrix ) to create a matrix
+
+the Preprocessor
+LaTeX enables you to define custom commands. The scripts can handle
+this but they must be told what the custom commands are. This is done
+by means of the preprocessor.
+
+Press %KeyFor(preprocessorAdd ) to add a preprocessor command
+
+In the first textbox, enter the custom command, in the next enter the number of arguments, 0 if there
+are none, and in the 3rd box enter the translation of the custom
+command. The translation is the standard LaTeX equivalent of the
+command, using #n to denote places where the nth argument should be
+interpolated into the translation. The 3 textboxes correspond to the
+3 arguments to the \newcommand command used to define the custom
+command.
+
+Preprocessor commands are lost when JAWS is restarted. You may load multiple preprocessor files.
+Press %KeyFor(PreprocessorWrite ) to save the custom preprocessor commands to a file.
+Press %KeyFor(PreprocessorRead ) to retreive custom preprocessor commands previously saved
+
+The Matrix Processor
+To load a matrix into the processor, highlight its contents, (not
+including any \begin and \end commands), and press %KeyFor(InputMatrix ) . For
+example you might highlight the following:
+
+1 & 2\\
+3 & 4\\
+
+CTRL+SHIFT+j, K, L, or I act as arrows that navigate the matrix
+CTRL+SHIFT with a number reads that row
+cTRL+ALT with a number reads that column.
+
+Press %KeyFor(HotKeyHelp ) to redisplay this message
+@@
+
+EndMessages
Added: jaws/modified_by_istvan/latex.smf
===================================================================
--- jaws/modified_by_istvan/latex.smf (rev 0)
+++ jaws/modified_by_istvan/latex.smf 2014-10-28 14:04:24 UTC (rev 483)
@@ -0,0 +1,127 @@
+[Attribute Behavior Table]
+default=0|MessageVoice|||
+3=3|||BoldVoice|
+1025=3|||DoubleStrikeoutVoice|
+2049=3|||SuperscriptVoice|
+4097=3|||SubscriptVoice|
+5=3|||ItalicVoice|
+[Indentation Behavior Table]
+default=1|MessageVoice|||
+[HTML Attribute Behavior Table]
+onclick=1|NormalVoice:clickable|||
+onmouseover=1|NormalVoice:on mouse over|||
+visited=1|NormalVoice:visited|||
+[Other Behavior Table]
+Cap=3|NormalVoice||SingleCapVoice|
+AllCaps=3|NormalVoice||AllCapsVoice|
+Repetition=1|MessageVoice|||
+Spell=3|||SpellingVoice|
+Quote=3|||NormalVoice|
+[Font Size Behavior Table]
+default=0|MessageVoice|||
+[Font Name Behavior Table]
+default=0|MessageVoice|||
+[Color Behavior Table]
+default=0|MessageVoice|||
+[ControlType Behavior Table]
+1=1|NormalVoice|||
+2=1|NormalVoice|||
+3=1|NormalVoice|||
+4=1|NormalVoice|||
+5=1|NormalVoice|||
+6=1|NormalVoice|||
+7=1|NormalVoice|||
+8=1|NormalVoice|||
+9=1|NormalVoice|||
+10=1|NormalVoice|||
+11=1|NormalVoice|||
+12=1|NormalVoice|||
+13=1|NormalVoice|||
+14=1|NormalVoice|||
+15=1|NormalVoice|||
+16=1|NormalVoice|||
+17=1|NormalVoice|||
+18=1|NormalVoice|||
+19=1|NormalVoice|||
+20=1|NormalVoice|||
+21=1|NormalVoice|||
+22=1|NormalVoice|||
+23=1|NormalVoice|||
+24=1|NormalVoice|||
+25=1|NormalVoice|||
+26=1|NormalVoice|||
+27=1|NormalVoice|||
+28=1|NormalVoice|||
+29=1|NormalVoice|||
+30=1|NormalVoice|||
+31=1|NormalVoice|||
+32=1|NormalVoice|||
+33=1|NormalVoice|||
+34=1|NormalVoice|||
+35=1|NormalVoice|||
+36=1|NormalVoice|||
+37=1|NormalVoice|||
+38=1|NormalVoice|||
+39=1|NormalVoice|||
+40=1|NormalVoice|||
+41=1|NormalVoice|||
+42=1|NormalVoice|||
+43=1|NormalVoice|||
+44=1|NormalVoice|||
+45=1|NormalVoice|||
+46=1|NormalVoice|||
+47=1|NormalVoice||LinkVoice|
+48=1|NormalVoice||LinkVoice|
+49=1|NormalVoice||LinkVoice|
+50=1|NormalVoice||LinkVoice|
+51=1|NormalVoice|||
+52=1|NormalVoice|||
+53=1|NormalVoice|||
+54=1|NormalVoice|||
+55=1|NormalVoice|||
+56=1|NormalVoice|||
+57=1|NormalVoice|||
+58=1|NormalVoice|||
+59=1|NormalVoice|||
+60=1|NormalVoice|||
+61=1|NormalVoice|||
+62=1|NormalVoice|||
+63=1|NormalVoice|||
+64=1|NormalVoice|||
+65=1|NormalVoice|||
+66=1|NormalVoice|||
+67=1|NormalVoice|||
+68=1|NormalVoice||HeadingLevel1Voice|
+69=1|NormalVoice||HeadingLevel2Voice|
+70=1|NormalVoice||HeadingLevel3Voice|
+71=1|NormalVoice||HeadingLevel4Voice|
+72=1|NormalVoice||HeadingLevel5Voice|
+73=1|NormalVoice||HeadingLevel6Voice|
+74=1|NormalVoice|||
+75=1|NormalVoice|||
+76=1|NormalVoice|||
+77=1|NormalVoice|||
+78=1|NormalVoice|||
+79=1|NormalVoice|||
+80=1|NormalVoice|||
+81=1|NormalVoice|||
+82=1|NormalVoice|||
+83=1|NormalVoice|||
+default=1|NormalVoice|||
+[ControlState Behavior Table]
+1=1|NormalVoice|||
+2=1|NormalVoice|||
+4=1|NormalVoice|||
+8=1|NormalVoice|||
+16=1|NormalVoice|||
+32=1|NormalVoice|||
+64=1|NormalVoice|||
+128=1|NormalVoice|||
+256=1|NormalVoice|||
+512=1|NormalVoice|||
+1024=1|NormalVoice|||
+2048=1|NormalVoice|||
+4096=1|NormalVoice|||
+default=1|NormalVoice|||
+[Information]
+Description=special scheme for use with latex.
Added: latex_access/hungarian_speech.py
===================================================================
--- latex_access/hungarian_speech.py (rev 0)
+++ latex_access/hungarian_speech.py 2014-10-28 14:04:24 UTC (rev 483)
@@ -0,0 +1,428 @@
+# -*- coding: utf8 -*-
+# speech.py
+# A part of the latex-access project at http://latex-access.sourceforge.net/
+# Author: Alastair Irving <ala...@sj...>
+# Modified by: Istvan Velegi <iv...@gm...>
+# Copyright (C) 2011 Alastair Irving/latex-access Contributors
+
+# This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
+# either version 2 of the License, or (at your option) any later version.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License along with this program; if not, visit <http://www.gnu.org/licenses>
+#
+'''Module to provide speech output for latex_access.'''
+
+import latex_access
+from latex_access import get_arg
+import re
+
+primes=re.compile(r"^\s*(\\p+rime\s*)+$")
+argprimes=re.compile(r"^\s*\(.*\)$")
+absertek =re.compile(r"\|([^\|]+)\|")
+#norma =re.compile(r"\\|(.)\\|+")
+sqrt_with_two_args =re.compile(r".*\\sqrt\[(.?)\]")
+
+#Define a list of words to use as denominators of simple fractions
+denominators=[" per 0 "," per 1 "," ketted"," harmad"," negyed",u" ötöd"," hatod"," heted"," nyolcad"," kilenced"]
+
+class speech(latex_access.translator):
+ '''Speech translator class.'''
+
+ def __init__(self):
+ self.handleBracketsAsPrime =False
+ self.abbrev_first_root_arg =False
+ latex_access.translator.__init__(self)
+ self.files.append("speech.table")
+ self.load_files()
+
+ new_table={"\\cap":self.cap, "\\bigcap":self.cap, "\\binom":self.binom,"\\vec":self.vect,"\\underline":self.underline,"$":self.dollar,"^":self.super,"_":("<sub>","</sub>"),"\\pmod":("mod <sub>","</sub>"),"\\widetilde":self.tilde,"\\tilde":self.tilde,"\\sqrt":self.sqrt,"\\frac":self.frac,"\\dfrac":self.frac,"\\ds":self.dsfrac,"\\int":self.integral,"\\dbint":self.dbintegral,"\\ddint":self.ddintegral,"\\oint":self.ointegral,"\\cup":self.union,"\\bigcup":self.union,"\\sum":self.sum,"\\prod":self.prod,"\\bf":("<bold>","</bold>"),"\\mathbf":("<bold>","</bold>"),"\\mathbb":("<bold>","</bold>"),"\\mathcal":("<mathcal>","</mathcal>"), "\\em":("<em>","</em>"), "\\it":("<em>","</em>"), "\\log":self.log,"\\ang":self.ang,"\\tag":self.tag,"\\hat":self.hat,"\\widehat":self.hat,"\\bar":("",u" felülvonás "),"\\overline":self.overline,"\\dot":("","pont"),"\\ddot":("","duplapont")}
+ for (k,v) in new_table.iteritems():
+ self.table[k]=v
+ self.space=" "
+
+
+ def correct(self, inputstr):
+ inputstr =inputstr.replace("xy", "x y")
+ inputstr =inputstr.replace("yx", "y x")
+ inputstr =inputstr.replace("yy", "y y")
+ inputstr =inputstr.replace("ix", "i x")
+ inputstr =inputstr.replace("imx", "i m x")
+ inputstr =inputstr.replace("ikx", "i k x")
+ inputstr =inputstr.replace("isx", "i es x")
+ inputstr =inputstr.replace("inx", "i n x")
+ return inputstr
+
+ def lowerSuffixParse(self, inputstr):
+ l1 =["1", "2", "4", "5", "7", "9", "x", "b", "c"]
+ l2 =["3", "6", "8", "y"]
+ if len(inputstr) ==0:
+ return u"-tól "
+ if len(inputstr) >1 and inputstr.endswith(u"egyenlő 0") or inputstr[:-1].isdigit() and inputstr[-2] ==u"0" and inputstr[-1] ==u"0" and inputstr !=u"1000":
+ return inputstr+u"-tól "
+ if inputstr ==u"0":
+ return u" nullától "
+ if inputstr[-1].lower() in l1:
+ return inputstr+u"-től "
+ elif inputstr[-1].lower() in l2:
+ return inputstr +u"-tól "
+ else:
+ if inputstr[-1].lower() ==u"a":
+ return inputstr[:-1] +inputstr[-1].lower().replace(u"a", u"ától ")
+ if inputstr[-2:].lower() =="a ":
+ return inputstr[:-2] +inputstr[-2:].lower().replace(u"a ", u"ától ")
+ return inputstr +u"-től "
+
+ def upperSuffixParse(self, inputstr):
+ if inputstr.lower().endswith("a"):
+ return inputstr[:-1] +inputstr[-1].lower().replace(u"a", u"áig ")
+ elif inputstr[-2:] =="a ":
+ return inputstr[:-2] +inputstr[-2:].lower().replace(u"a ", u"áig ")
+ else:
+ return inputstr +u"-ig "
+
+ def super(self,input,start):
+ '''Translate superscripts into speech.
+ Returns a touple with translated string and index of
+ first char after end of super.'''
+
+ arg_with_minus =re.compile(r"-.?")
+ arg=get_arg(input,start)
+ #Handle squared and cubed as special cases
+ if arg[0] == "2":
+ translation=u" négyzet "
+ elif arg[0]=="3":
+ translation=u" köb "
+
+ elif len(arg[0]) <2 or arg_with_minus.match(arg[0]):
+ translation =u" ad %s, " % self.correct(self.translate(arg[0]))
+
+ #Handle primes
+ elif primes.match(arg[0]):
+ if arg[0].count("p") ==1:
+ if arg[0].count("\\prime") ==1:
+ translation=u" vessző "
+ else:
+ translation=u" " +str(arg[0].count("\\prime")).replace("2", u"két") +u" vessző "
+ elif arg[0].count("p") >1:
+ translation=u" " +str(self.correct(arg[0]).count("p")).replace("2", u"két") +u" vessző "
+
+ elif argprimes.match(arg[0]) and self.handleBracketsAsPrime:
+ translation =u" %s " % self.translate(self.correct(arg[0])) +u" vessző "
+ else:
+ translation = u" ad <sup> %s </sup>" % self.translate(self.correct(arg[0]))
+ return (translation, arg[1])
+
+ def sqrt(self,input,start):
+ '''Translates roots into speech.
+
+ returns touple.'''
+ if sqrt_with_two_args.match(input):
+ first_arg =latex_access.get_optional_arg(input, start)
+ second_arg=get_arg(input, first_arg[1])
+
+ if self.abbrev_first_root_arg ==True:
+ if first_arg[0].isdigit() or len(first_arg[0]) ==1:
+ translation =denominators[int(first_arg[0])] +" "
+ elif first_arg[0] in ["x", "n"] and len(first_arg[0]) ==1:
+ translation =first_arg[0] +u"-ed "
+ elif first_arg[0] =="3":
+ translation =u" köb "
+ else:
+ translation =self.correct(self.translate(first_arg[0])) +u". "
+
+ else:
+ if first_arg[0] =="3":
+ translation =u" köb "
+ elif first_arg[0].lower() =="n":
+ translation =u"n-edik "
+ elif first_arg[0] =="x":
+ translation ="x-edik "
+ else:
+ translation =self.correct(self.translate(first_arg[0])) +u". "
+
+ if len(second_arg[0]) ==1:
+ translation +=u" gyök " +self.correct(self.translate(second_arg[0]))
+ else:
+ translation +=u" gyök alatt, "+self.correct(self.translate(second_arg[0])) +u", gyök zár "
+ return (translation, second_arg[1])
+
+ arg=get_arg(input, start)
+ if arg[0].isdigit() or len(arg[0])==1:
+ translation=u" gyök " +arg[0]
+ else:
+ translation=u" gyök alatt, " +self.correct(self.translate(arg[0])) +u", gyök zár"
+ return (translation,arg[1])
+
+ def norma(self, input, start):
+ m =absertek.match(input)
+
+ if m is not None:
+ arg=get_arg("{"+m.group(1)+"}", 0)
+ if len(arg[0]) ==1:
+ output =self.translate(arg[0])+u" abszolút "
+ return (output, arg[1])
+ else:
+ output =u" abszolút " +self.translate(arg[0]+u" abszolút ")
+ return (output, arg[1])
+ else:
+ arg =get_arg(input, start-1)
+ output =u" függőleges "
+ return (output, arg[1])
+
+
+ def frac(self,input,start):
+ '''Translate fractions into speech.
+
+ Returns touple.'''
+ numerator=get_arg(input,start)
+ if numerator[1]<len(input):
+ denominator=get_arg(input,numerator[1])
+ else:
+ denominator=("",numerator[1])
+ if len(numerator[0])==1 and len(denominator[0])==1:
+ if numerator[0].isdigit() and denominator[0].isdigit():
+ translation = numerator[0]+denominators[int(denominator[0])]
+ if int(numerator[0])>1:
+ translation+=""
+ translation+=" "
+ else:
+ translation =" %s per %s " % (self.correct(numerator[0]), self.correct(denominator[0]))
+ else:
+ translation=u" tört, %s per %s, tört zár " % (self.translate(self.correct(numerator[0])), self.translate(self.correct(denominator[0])))
+ return (translation,denominator[1])
+
+ def dsfrac(self,input,start):
+ arg=get_arg(input,start)
+ translation=u" tört "+self.correct(self.translate(arg[0])) +u" tört zár "
+ return (translation,arg[1])
+
+ def integral(self,input,start):
+ '''Translate integrals, including limits of integration.
+ Returns touple.'''
+
+ (lower,upper,i)=latex_access.get_subsuper(input,start)
+ output =u"integrál "
+ if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0:
+ output +=self.lowerSuffixParse(self.translate(lower[0]))
+ output +=self.upperSuffixParse(self.translate(upper[0]))
+ else:
+ if lower is not None and len(lower[0]) !=0:
+ output +="<sub>"+self.correct(self.translate(lower[0]))+"</sub>"
+ return (output,i)
+
+ def dbintegral(self,input,start):
+ '''Translate integrals, including limits of integration.
+ Returns touple.'''
+ output =u"kettős integrál "
+ (lower,upper,i)=latex_access.get_subsuper(input,start)
+ if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0:
+ output +=self.lowerSuffixParse(self.translate(lower[0]))
+ output +=self.upperSuffixParse(self.translate(upper[0]))
+ else:
+ if lower is not None and len(lower[0]) !=0:
+ output +="<sub>"+self.correct(self.translate(lower[0]))+"</sub>"
+ return (output,i)
+
+ def ddintegral(self,input,start):
+ '''Translate integrals, including limits of integration.
+ Returns touple.'''
+
+ (lower,upper,i)=latex_access.get_subsuper(input,start)
+ output =u"hármas integrál "
+ if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0:
+ output +=self.lowerSuffixParse(self.translate(lower[0]))
+ output +=self.upperSuffixParse(self.translate(upper[0]))
+ else:
+ if lower is not None and len(lower[0]) !=0:
+ output +="<sub>"+self.correct(self.translate(lower[0]))+"</sub>"
+ return (output,i)
+
+ def ointegral(self,input,start):
+ '''Translate integrals, including limits of integration.
+ Returns touple.'''
+
+ (lower,upper,i)=latex_access.get_subsuper(input,start)
+ output =u"hurokintegrál "
+ if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0:
+ output +=self.lowerSuffixParse(self.translate(lower[0]))
+ output +=self.upperSuffixParse(self.translate(upper[0]))
+ elif lower is not None and len(lower[0]) !=0:
+ output +="<sub>"+self.correct(self.translate(lower[0]))+"</sub>"
+
+ return (output,i)
+
+ def sum(self,input,start):
+ '''Translate summas, including limits of summarization.
+ Returns touple.'''
+ input.replace("\\limits", "")
+ (lower,upper,i)=latex_access.get_subsuper(input,start)
+ output=u" szumma "
+ if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0:
+ output +=self.lowerSuffixParse(self.translate(lower[0])).replace(u"egyenlő", u"megy")
+ output +=self.upperSuffixParse(self.translate(upper[0]))
+ elif lower is not None and len(lower[0]) !=0:
+ output +="<sub>"+self.correct(self.translate(lower[0]))+"</sub>"
+
+ return (output,i)
+
+ def prod(self,input,start):
+ '''Translate products, including limits of producttion.
+ Returns touple.'''
+ input.replace("\\limits", "")
+ (lower,upper,i)=latex_access.get_subsuper(input,start)
+ output=u" produktum "
+ if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0:
+ output +=self.lowerSuffixParse(self.translate(lower[0])).replace(u"egyenlő", u"megy")
+ output +=self.upperSuffixParse(self.translate(upper[0]))
+ elif lower is not None and len(lower[0]) !=0:
+ output +="<sub>"+self.correct(self.translate(lower[0]))+"</sub>"
+
+ return (output,i)
+
+ def union(self,input,start):
+ '''Translate unions, including limits of unition.
+ Returns touple.'''
+ (lower,upper,i)=latex_access.get_subsuper(input,start)
+ output=u" unió "
+ if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0:
+ output +=self.lowerSuffixParse(self.translate(lower[0])).replace(u"egyenlő", u"megy")
+ output +=self.upperSuffixParse(self.translate(upper[0]))
+ elif lower is not None and len(lower[0]) !=0:
+ output +="<sub>"+self.correct(self.translate(lower[0]))+"</sub>"
+
+ return (output,i)
+
+ def cap(self,input,start):
+ '''Translate intersections, including limits of intersection.
+ Returns touple.'''
+ (lower,upper,i)=latex_access.get_subsuper(input,start)
+ output=u" metszet "
+ if lower is not None and upper is not None and len(lower[0]) !=0 and len(upper[0]) !=0:
+ output +=self.lowerSuffixParse(self.translate(lower[0])).replace(u"egyenlő", u"megy")
+ output +=self.upperSuffixParse(self.translate(upper[0]))
+ elif lower is not None and len(lower[0]) !=0:
+ output +="<sub>"+self.correct(self.translate(lower[0]))+"</sub>"
+
+ return (output,i)
+
+ def tag(self,input,start):
+ '''Translate tags into speech.
+
+ Returns a touple with translated string and index of
+ first char after end of tag.'''
+
+ arg=get_arg(input,start)
+ translation=" tag left paren "+arg[0]+" right paren "
+ return (translation,arg[1])
+
+ def ang(self,input,start):
+ '''Translate angles into speech.
+
+ Returns a touple with translated string and index of
+ first char after end of angle.'''
+
+ translation = ""
+ counter = 0
+ arg=get_arg(input,start)
+ if ';' in arg[0]: # we have mins possibly seconds too
+ for x in arg[0]:
+ if ';' == x: # we have mins/sec
+ counter=counter+1
+ if counter == 1:
+ translation=translation+" degrees "
+ continue
+ elif counter == 2:
+ translation=translation+" minutes "
+ continue
+ elif counter == 3:
+ translation=translation+" seconds "
+ continue
+ translation=translation+x
+ if counter == 1:
+ translation=translation+" minutes"
+ elif counter == 2:
+ translation=translation+" seconds"
+ else:
+ translation=arg[0]+" degrees"
+ return (translation,arg[1])
+
+ def log(self,input,start):
+ '''Translate logs into speech.
+ We translate logs in the form \log_a(x) as
+ log base a of x
+
+ If the log appears ambiguous, i.e. we can not reasonably
+ determine the base, we shall translate as just "log" followed by
+ any usual translation.
+
+ Returns a touple with translated string and index of
+ first char after end of entire logarithm.'''
+
+
+ log=get_arg(input,start)
+ if len(log[0]) < 1 or log[0][0] != "_": # \log by itself
+ return (" log ", log[2]) # ignore the supposed command
+
+ # Safe to assume log is of the form \log_a(x)
+ translation =u""
+ base=get_arg(input, log[1])
+ translation+=self.translate(base[0])
+ translation+=u" alapú logaritmus "
+
+ return (translation, base[1])
+
+ def underline(self,input,start):
+ arg=get_arg(input,start)
+ translation=self.translate(arg[0])
+ return (translation,arg[1])
+
+ def overline(self,input,start):
+ arg=get_arg(input,start)
+ if arg[0].isdigit() or len(arg[0])==1:
+ translation=arg[0]+u" felülvonás "
+ else:
+ translation=u" felülvonás "+self.translate(self.correct(arg[0])) +u" felülvonás zár "
+ return (translation,arg[1])
+
+ def tilde(self,input,start):
+ arg=get_arg(input,start)
+ if arg[0].isdigit() or len(arg[0])==1:
+ translation=arg[0]+u" hullám "
+ else:
+ translation=u" hullám "+self.translate(self.correct(arg[0])) +u" hullám zár "
+ return (translation,arg[1])
+
+ def hat(self,input,start):
+ arg=get_arg(input,start)
+ if arg[0].isdigit() or len(arg[0])==1:
+ translation=arg[0]+u" kalap "
+ else:
+ translation=u" kalap "+self.translate(self.correct(arg[0])) +u" kalap zár "
+ return (translation,arg[1])
+
+ def vect(self,input,start):
+ arg=get_arg(input,start)
+ if arg[0].isdigit() or len(arg[0])==1:
+ translation=arg[0].replace("a", u"á") +u" vektor "
+ else:
+ translation=u" vektor, "+self.translate(self.correct(arg[0])) +u", vektor zár "
+ return (translation,arg[1])
+
+ def binom(self, input, start):
+ '''Translate binomials into speech.
+ Returns touple.'''
+
+ arg_1=get_arg(input,start)
+ if arg_1[1]<len(input):
+ arg_2=get_arg(input,arg_1[1])
+ else:
+ arg_2=("",arg_1[1])
+
+ if len(arg_1[0])==1 and len(arg_2[0])==1:
+ translation =" %s alatt %s " % (self.correct(self.translate(arg_1[0])), self.correct(self.translate(arg_2[0])))
+ else:
+ translation=u" binom, %s alatt %s, binom zár " % (self.correct(self.translate(arg_1[0])), self.correct(self.translate(arg_2[0])))
+ return (translation, arg_2[1])
+
Modified: latex_access/hungarian_speech.table
===================================================================
--- latex_access/hungarian_speech.table 2014-10-26 05:09:23 UTC (rev 482)
+++ latex_access/hungarian_speech.table 2014-10-28 14:04:24 UTC (rev 483)
@@ -6,18 +6,21 @@
> nagyobb
* szorozva
\times kereszt
-\div osztva
+\div per
+\over per
+/ per
\pm pluszminusz
\leq kisebb egyenlő
+\leqq kisebb egyenlő
\le kisebb egyenlő
\geq nagyobb egyenlő
\ge nagyobb egyenlő
+\geqq nagyobb egyenlő
\equiv ekvivalens
\neq nem egyenlő
\ne nem egyenlő
\ll kisebb kisebb
\gg nagyobb nagyobb
-\prod produktum
\pm pluszminusz
\mp minuszplusz
\leftrightarrow akkor és csak akkor ha
@@ -27,122 +30,130 @@
\Leftrightarrow akkor és csak akkor ha
\longrightarrow jobbranyíl
\longleftrightarrow akkor és csak akkor ha
+\Longleftrightarrow akkor és csak akkor ha
\wedge és
\vee vagy
\lnot nem
\not nem
+\neg nem
\propto proportional to
-\min min
-\max max
+\min min
+\max max
; Trigonometrikus és hiperbolikus függvények
\tanh tangens hiperbolikusz
\tan tangens
+\arctan arkusz tangens
\sinh szinusz hiperbolikusz
\sin szinusz
+\arcsin arkusz szinusz
\cosh koszinusz hiperbolikusz
\cos koszinusz
+\arccos arkusz koszinusz
; Nagy görög betűk
-\Alpha nagy alfa
-\Beta nagy béta
-\Gamma nagy gamma
-\Delta nagy delta
-\Epsilon nagy epszilon
-\Zeta nagy zeta
-\Eta nagy éta
-\Theta nagy teta
+\Alpha nagy alfa
+\Beta nagy béta
+\Gamma nagy gamma
+\Delta nagy delta
+\Epsilon nagy epszilon
+
+\Zeta nagy zeta
+\Eta nagy éta
+\Theta nagy teta
\Iota nagy iota
\Kappa nagy kappa
-\Lambda nagy lambda
+\Lambda nagy lambda
\Mu nagy mű
\Nu nagy nű
\Xi nagy xí
\Omicron nagy omikron
\Pi nagy pí
\Rho nagy ró
-\Sigma nagy szigma
-\Tau nagy tau
-\Upsilon nagy upszilon
-\Phi nagy fí
+\Sigma nagy szigma
+\Tau nagy tau
+\Upsilon nagy upszilon
+\Phi nagy fí
\Psi nagy pszí
-\Chi nagy khí
-\Omega nagy omega
+\Chi nagy khí
+\Omega nagy omega
; kis görög betűk
-\alpha alfa
-\beta béta
-\gamma gamma
-\delta delta
-\epsilon epszilon
-\zeta zeta
-\eta éta
-\theta teta
+\alpha alfa
+\beta béta
+\gamma gamma
+\delta delta
+\epsilon epszilon
+\zeta zeta
+\eta éta
+\theta teta
\iota iota
\kappa kappa
-\lambda lambda
-\mu mű
-\nu nű
-\xi xí
-\omicron omikron
-\pi pí
-\rho ró
-\sigma szigma
-\tau tau
-\upsilon upszilon
-\phi fí
-\psi pszí
-\chi khí
-\omega omega
+\lambda lambda
+\mu mű
+\nu nű
+\xi xí
+\omicron omikron
+\pi pí
+\rho ró
+\sigma szigma
+\tau tau
+\upsilon upszilon
+\phi fí
+\psi pszí
+\chi khí
+\omega omega
-\varpi pí
-\varphi fí
-\vartheta teta
+\varpi pí
+\varphi fí
+\vartheta teta
+\varepsilon epszilon
-
; set theory
-\bigcap metszet
-\bigcup unió
-\setminus set minus
-\cap metszet
+\setminus különbség
\triangleleft normál alcsoport
-\therefore ezért
+\therefore ezért
\supseteq szuperhalmaz vagy egyenlő
-\supset szuperhalmaz
-\subseteq részhalmaza vagy egyenlő
+\supset szuperhalmaz
+\subseteq részhalmaza vagy egyenlő
\subset részhalmaza
-\rmint belső pontok
+\rmint interior
\subs része
+\setminus különbség
\in eleme
\notin nem eleme
\ni nem eleme
\forall minden
\exists létezik
-\emptyset üres halmaz
-\cup unió
+\emptyset üres halmaz
\lim limesz
-\{ kezdőkapcsos
-\} végkapcsos
+\{ kezdőkapcsos
+\} végkapcsos
-; Standard latex parancsok jobb olvasáshoz:
+; Standard latex parancsok gördülékenyebb olvasáshoz:
\cdot szorozva
-\cdots pont pont pont
-\right
-\quad
-\qquad
-\left
+\cdots pont pont pont
+\vdots pont pont pont
+\right
+\quad
+\qquad
+\left
\ldots pont pont pont
\dots pont pont pont
-\;
-\,
-\!
+\;
+\,
+\!
+\rm
\textbackslash \
-\dsp
+\dsp
+\Dsp
+\mathop
+\limits
\textdegree fok
; calculus
-\partial parciális
-\nabla nabla
+\partial parciális
+\nabla nabla
Speciális karakterek
@@ -152,7 +163,21 @@
Valószínűség és permutáció
\Pr valószínűség
! faktoriális
-| függőleges
+\choose alatt
+\Choose alatt
+
+
+Egyéb jelölések
' vessző
\Vert norma
-\vert norma
\ No newline at end of file
+\vert norma
+| függőleges
+\haf f kalap
+\clF fourier transzformált
+\lceil felfelé kerekít
+\rceil kerekítés zár
+\exp e ad
+\ovz z konjugált
+
+;list item operators:
+\item item
\ No newline at end of file
Modified: latex_access/speech.py
===================================================================
--- latex_access/speech.py 2014-10-26 05:09:23 UTC (rev 482)
+++ latex_access/speech.py 2014-10-28 14:04:24 UTC (rev 483)
@@ -1,174 +1,174 @@
-# speech.py
-# A part of the latex-access project at http://latex-access.sourceforge.net/
-# Author: Alastair Irving <ala...@sj...>
-# Copyright (C) 2011 Alastair Irving/latex-access Contributors
-#
-# This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
-# either version 2 of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with this program; if not, visit <http://www.gnu.org/licenses>
-#
-'''Module to provide speech output for latex_access.'''
-
-
-import latex_access
-from latex_access import get_arg
-
-#Define a list of words to use as denominators of simple fractions
-denominators=[" over zero"," over1 "," half"," third"," quarter"," fifth"," sixth"," seventh"," eight"," ninth"]
-
-class speech(latex_access.translator):
- '''Speech translator class.'''
- def __init__(self):
- latex_access.translator.__init__(self)
- self.files.append("speech.table")
- self.load_files()
- new_table={"^":self.super,"_":("<sub>","</sub>"),"\\pmod":("mod <sub>","</sub>"),"\\sqrt":self.sqrt,"\\frac":self.frac,"\\tfrac":self.frac,"\\dfrac":self.frac,"\\int":self.integral,"\\mathbf":("<bold>","</bold>"),"\\mathbb":("<bold>","</bold>"),"\\mathcal":("<mathcal>","</mathcal>"),
- "\\log":self.log,"\\ang":self.ang,"\\tag":self.tag,"\\hat":("","hat"),"\\widehat":("","hat"),"\\bar":("","bar"),"\\overline":("","bar"),"\\dot":("","dot"),"\\ddot":("","double dot")}
-
- for (k,v) in new_table.iteritems():
- self.table[k]=v
- self.space=" "
-
-
-
-
-
- def super(self,input,start):
- '''Translate superscripts into speech.
-
- Returns a touple with translated string and index of
- first char after end of super.'''
- arg=get_arg(input,start)
- #Handle squared and cubed as special cases
- if arg[0] == "2":
- translation=" squared "
- elif arg[0]=="3":
- translation=" cubed "
- #Handle primes
- elif latex_access.primes.match(arg[0]):
- translation=" prime "*arg[0].count("\\prime")
- else:
- translation = " to the %s end super " % self.translate(arg[0])
- return (translation,arg[1])
-
-
- def sqrt(self,input,start):
- '''Translates squareroots into speech.
-
- returns touple.'''
- arg=get_arg(input,start)
- if arg[0].isdigit() or len(arg[0])==1:
- translation=" root "+arg[0]
- else:
- translation=" begin root "+self.translate(arg[0])+" end root "
- return (translation,arg[1])
-
-
-
- def frac(self,input,start):
- '''Translate fractions into speech.
-
- Returns touple.'''
- numerator=get_arg(input,start)
- if numerator[1]<len(input):
- denominator=get_arg(input,numerator[1])
- else:
- denominator=("",numerator[1])
- if len(numerator[0])==1 and len(denominator[0])==1:
- if numerator[0].isdigit() and denominator[0].isdigit():
- translation = numerator[0]+denominators[int(denominator[0])]
- if int(numerator[0])>1:
- translation+="s"
- translation+=" "
- else:
- translation =" %s over %s " % (numerator[0], denominator[0])
- else:
- translation=" begin frac %s over %s end frac " % (self.translate(numerator[0]), self.translate(denominator[0]))
- return (translation,denominator[1])
-
- def integral(self,input,start):
- '''Translate integrals, including limits of integration.
-
- Returns touple.'''
- (lower,upper,i)=latex_access.get_subsuper(input,start)
- output=" integral "
- if lower is not None:
- output+="from "
- output+=self.translate(lower[0])
- if upper is not None:
- output+=" to "
- output+=self.translate(upper[0])
- output+=" of "
- return (output,i)
-
- def tag(self,input,start):
- '''Translate tags into speech.
-
- Returns a touple with translated string and index of
- first char after end of tag.'''
-
- arg=get_arg(input,start)
- translation=" tag left paren "+arg[0]+" right paren "
- return (translation,arg[1])
-
- def ang(self,input,start):
- '''Translate angles into speech.
-
- Returns a touple with translated string and index of
- first char after end of angle.'''
-
- translation = ""
- counter = 0
- arg=get_arg(input,start)
- if ';' in arg[0]: # we have mins possibly seconds too
- for x in arg[0]:
- if ';' == x: # we have mins/sec
- counter=counter+1
- if counter == 1:
- translation=translation+" degrees "
- continue
- elif counter == 2:
- translation=translation+" minutes "
- continue
- elif counter == 3:
- translation=translation+" seconds "
- continue
- translation=translation+x
- if counter == 1:
- translation=translation+" minutes"
- elif counter == 2:
- translation=translation+" seconds"
- else:
- translation=arg[0]+" degrees"
- return (translation,arg[1])
-
- def log(self,input,start):
- '''Translate logs into speech.
-
- We translate logs in the form \log_a(x) as
- log base a of x
-
- If the log appaears ambiguous, i.e. we can not reasonably
- determine the base, we shall translate as just "log" followed by
- any usual translation.
-
- Returns a touple with translated string and index of
- first char after end of entire logarithm.'''
-
- log=get_arg(input,start)
- translation=" log "
- if len(log[0]) < 1 or log[0][0] != "_": # \log by itself
- return (translation, log[2]) # ignore the supposed command
-
-# Safe to assume log is of the form \log_a(x)
- translation+="base "
- base=get_arg(input, log[1])
- translation+=self.translate (base[0])
- translation+=" of "
- return (translation, base[1])
-
+# speech.py
+# A part of the latex-access project at http://latex-access.sourceforge.net/
+# Author: Alastair Irving <ala...@sj...>
+# Copyright (C) 2011 Alastair Irving/latex-access Contributors
+#
+# This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
+# either version 2 of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with this program; if not, visit <http://www.gnu.org/licenses>
+#
+'''Module to provide speech output for latex_access.'''
+
+
+import latex_access
+from latex_access import get_arg
+
+#Define a list of words to use as denominators of simple fractions
+denominators=[" over zero"," over1 "," half"," third"," quarter"," fifth"," sixth"," seventh"," eight"," ninth"]
+
+class speech(latex_access.translator):
+ '''Speech translator class.'''
+ def __init__(self):
+ latex_access.translator.__init__(self)
+ self.files.append("speech.table")
+ self.load_files()
+ new_table={"^":self.super,"_":("<sub>","</sub>"),"\\pmod":("mod <sub>","</sub>"),"\\sqrt":self.sqrt,"\\frac":self.frac,"\\tfrac":self.frac,"\\dfrac":self.frac,"\\int":self.integral,"\\mathbf":("<bold>","</bold>"),"\\mathbb":("<bold>","</bold>"),"\\mathcal":("<mathcal>","</mathcal>"),
+ "\\log":self.log,"\\ang":self.ang,"\\tag":self.tag,"\\hat":("","hat"),"\\widehat":("","hat"),"\\bar":("","bar"),"\\overline":("","bar"),"\\dot":("","dot"),"\\ddot":("","double dot")}
+
+ for (k,v) in new_table.iteritems():
+ self.table[k]=v
+ self.space=" "
+
+
+
+
+
+ def super(self,input,start):
+ '''Translate superscripts into speech.
+
+ Returns a touple with translated string and index of
+ first char after end of super.'''
+ arg=get_arg(input,start)
+ #Handle squared and cubed as special cases
+ if arg[0] == "2":
+ translation=" squared "
+ elif arg[0]=="3":
+ translation=" cubed "
+ #Handle primes
+ elif latex_access.primes.match(arg[0]):
+ translation=" prime "*arg[0].count("\\prime")
+ else:
+ translation = " to the %s end super " % self.translate(arg[0])
+ return (translation,arg[1])
+
+
+ def sqrt(self,input,start):
+ '''Translates squareroots into speech.
+
+ returns touple.'''
+ arg=get_arg(input,start)
+ if arg[0].isdigit() or len(arg[0])==1:
+ translation=" root "+arg[0]
+ else:
+ translation=" begin root "+self.translate(arg[0])+" end root "
+ return (translation,arg[1])
+
+
+
+ def frac(self,input,start):
+ '''Translate fractions into speech.
+
+ Returns touple.'''
+ numerator=get_arg(input,start)
+ if numerator[1]<len(input):
+ denominator=get_arg(input,numerator[1])
+ else:
+ denominator=("",numerator[1])
+ if len(numerator[0])==1 and len(denominator[0])==1:
+ if numerator[0].isdigit() and denominator[0].isdigit():
+ translation = numerator[0]+denominators[int(denominator[0])]
+ if int(numerator[0])>1:
+ translation+="s"
+ translation+=" "
+ else:
+ translation =" %s over %s " % (numerator[0], denominator[0])
+ else:
+ translation=" begin frac %s over %s end frac " % (self.translate(numerator[0]), self.translate(denominator[0]))
+ return (translation,denominator[1])
+
+ def integral(self,input,start):
+ '''Translate integrals, including limits of integration.
+
+ Returns touple.'''
+ (lower,upper,i)=latex_access.get_subsuper(input,start)
+ output=" integral "
+ if lower is not None:
+ output+="from "
+ output+=self.translate(lower[0])
+ if upper is not None:
+ output+=" to "
+ output+=self.translate(upper[0])
+ output+=" of "
+ return (output,i)
+
+ def tag(self,input,start):
+ '''Translate tags into speech.
+
+ Returns a touple with translated string and index of
+ first char after end of tag.'''
+
+ arg=get_arg(input,start)
+ translation=" tag left paren "+arg[0]+" right paren "
+ return (translation,arg[1])
+
+ def ang(self,input,start):
+ '''Translate angles into speech.
+
+ Returns a touple with translated string and index of
+ first char after end of angle.'''
+
+ translation = ""
+ counter = 0
+ arg=get_arg(input,start)
+ if ';' in arg[0]: # we have mins possibly seconds too
+ for x in arg[0]:
+ if ';' == x: # we have mins/sec
+ counter=counter+1
+ if counter == 1:
+ translation=translation+" degrees "
+ continue
+ elif counter == 2:
+ translation=translation+" minutes "
+ continue
+ elif counter == 3:
+ translation=translation+" seconds "
+ continue
+ translation=translation+x
+ if counter == 1:
+ translation=translation+" minutes"
+ elif counter == 2:
+ translation=translation+" seconds"
+ else:
+ translation=arg[0]+" degrees"
+ return (translation,arg[1])
+
+ def log(self,input,start):
+ '''Translate logs into speech.
+
+ We translate logs in the form \log_a(x) as
+ log base a of x
+
+ If the log appaears ambiguous, i.e. we can not reasonably
+ determine the base, we shall translate as just "log" followed by
+ any usual translation.
+
+ Returns a touple with translated string and index of
+ first char after end of entire logarithm.'''
+
+ log=get_arg(input,start)
+ translation=" log "
+ if len(log[0]) < 1 or log[0][0] != "_": # \log by itself
+ return (translation, log[2]) # ignore the supposed command
+
+# Safe to assume log is of the form \log_a(x)
+ translation+="base "
+ base=get_arg(input, log[1])
+ translation+=self.translate (base[0])
+ translation+=" of "
+ return (translation, base[1])
+
Added: latex_access/speech_modified.py
===================================================================
--- latex_access/speech_modified.py (rev 0)
+++ latex_access/speech_modified.py 2014-10-28 14:04:24 UTC (rev 483)
@@ -0,0 +1,397 @@
+# -*- coding: utf8 -*-
+# speech.py
+# A part of the latex-access project at http://latex-access.sourceforge.net/
+# Author: Alastair Irving <ala...@sj...>
+# Modified by: Istvan Velegi <iv...@gm...>
+# Copyright (C) 2011 Alastair Irving/latex-access Contributors
+#
+# This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
+# either version 2 of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with this program; if not, visit <http://www.gnu.org/licenses>
+#
+'''Module to provide speech output for latex_access.'''
+
+
+import latex_access
+from latex_access import get_arg
+import re
+
+#Define a list of words to use as denominators of simple fractions
+denominators=[" over zero"," over1 "," half"," third"," quarter"," fifth"," sixth"," seventh"," eight"," ninth"]
+
+sqrt_with_two_args =re.compile(r".*\\sqrt\[(.?)\]")
+
+class speech(latex_access.translator):
+ '''Speech translator class.'''
+ def __init__(self):
+ latex_access.translator.__init__(self)
+ self.files.append("speech.table")
+ self.load_files()
+ new_table ={"\\cap":self.cap,"\\bigcap":self.cap, "\\ln":self.ln,"\\binom":self.binom,"\\vec":self.vect,"^":self.super,"_":("<sub>","</sub>"),"\\pmod":("mod <sub>","</sub>"),
+ "\\sqrt":self.sqrt,"\\frac":self.frac,"\\tfrac":self.frac,"\\dfrac":self.frac,
+ "\\int":self.integral,"\\dbint":self.dbintegral,"\\ddint":self.ddintegral,"\\oint":self.ointegral,
+ "\\it":("<it>","</it>"),"\\bf":("<bold>","</bold>"),"\\mathbf":("<bold>","</bold>"),"\\mathbb":("<bold>","</bold>"),
+ "\\mathcal":("<mathcal>","</mathcal>"),"\\log":self.log,"\\ang":self.ang,
+ "\\tag":self.tag,"\\hat":("","hat"),"\\widehat":("","hat"),"\\bar":("","bar"),
+ "\\overline":("","bar"),"\\dot":("","dot"),"\\ddot":("","double dot"),"\\sum":self.sum,"\\prod":self.prod,"\\cup":self.union,"\\bigcup":self.union}
+
+ for (k,v) in new_table.iteritems():
+ self.table[k]=v
+ self.space=" "
+
+ sqrt_with_two_args =re.compile(r".*\\sqrt\[(.*)\]+.*")
+
+ def correct(self, inputstr):
+ inputstr =inputstr.replace("xy", "x y")
+ inputstr =inputstr.replace("yx", "y x")
+ inputstr =inputstr.replace("yy", "y y")
+ inputstr =inputstr.replace("ix", "i x")
+ inputstr =inputstr.repl...
[truncated message content] |
|
From: Alastair I. <ala...@sj...> - 2014-10-27 13:48:23
|
Hi
Firstly, adding you to the SVN hasn't worked I think you maybe gave me
an incorrect username.
Those changes look sensible. Please commit them once your SVN access is
sorted. However, once I see the code I might decide to remove or change
some of your improvements if I'm not happy with how they're implemented.
Best wishes
Alastair
On 26/10/2014 11:48, Velegi István wrote:
> Hi alstair,
>
> No problem. Thank you for your reply.
>
> Before I did any modifications on the server, I'd like to ask what your
> opinions are about my changes, written below:
> Added implementation for the following:
> processing of roots including nth and special ones like square, cube.
> Sum, including limits
> production, including limits
>
> set operations:
> union, including limits
> intersection, including limits, eg.g
> \cap_{1}^{n} a_i =P
> The above operation commands were removed from the speech.table as their
> implementation is made in "speech.py".
>
> Added support for the following:
> 1. Double integrals and loop integrals.
> 2. A new command of fractions, namely the "\ds" command.
> For example: \ds{a\over b
>
> 3. Binomials with two commands: \binom{a}{b} and "a \choose b"
>
> 4. vector command in two ways:
> \vec{x} and \vec{x +2}
>
> Changed behaviour for superscript text. Now Jaws reads the superscripted
> data with the superscript voice without telling "begin super" and "end
> super", making the reading more convenient.
> In the jaws scripts, the <sup> and </sup> tags are treated as
> superscript texts, which is done in speech.py, similar to the way the
> italic text is implemented. Of course I modified the super function and
> didn't use a sinple touple.
> I think it vastes a lot of time when we have to hear the begin and end
> marks instead of changing the speech pitch in certain cases.
>
> Improved support for bold, italic texts by adding new commands for them
> in the same way as they were implemented originally.
>
> These changes are done in both the original English "speech.py" and the
> hungarian version named "hungarian_speech.py" and "hungarian_speech.table.
>
> The english translations in the new files are done by a friend of mine,
> Daniel Hajas who has been studying physics in England for almost three
> years, so I don't think there will be any grammar mistakes in them.
>
> Cheers!
> Istvan
> 2014/10/26 2:47 keltezéssel, Alastair Irving írta:
>> Hi
>>
>> I'm very sorry, I completely forgot about it.
>>
>> I've just tried to add you to the SVN, please let me know if its worked.
>> I look forward to getting your changes.
>>
>> If calling the reInitialise function is helful then I'm happy for you to
>> do so. I wish we knew why it doesn't always work first time though, its
>> very annoying.
>>
>> I'd rather you didn't commit the code inserting function. I think the
>> focus of latex-access should be translation and that features like code
>> insertion are best left to the text editor.
>>
>> Best wishes
>>
>> Alastair
>>
>>
>>
>>
>> On 25/10/2014 07:34, Velegi István wrote:
>>> Hi alastair,
>>>
>>> Have you got my messages sent at the end of summer? I didn't get any
>>> reply to it.
>>>
>>> Cheers,
>>> Istvan
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> Latex-access-devel mailing list
>> Lat...@li...
>> https://lists.sourceforge.net/lists/listinfo/latex-access-devel
>>
>
|
|
From: Alastair I. <ala...@sj...> - 2014-10-26 14:32:39
|
I agree this would be very messy. Any change made to one set of scripts would need to be made to the other, etc. Alastair On 26/10/2014 01:17, Nathaniel Schmidt wrote: > Could we possibly have two folders within the JAWS folder: one for the application-specific scripts and one for the default scripts? I suspect that this would still get a bit messy though because the features of the individual script projects are a little different from each other... > > Nathaniel > Student > La Trobe University, Albury-Wodonga campus > Email (don't use this one unless you are contacting me regarding matters specific to university): 180...@st... > http://www.latrobe.edu.au/ > > ABC's of Salvation: > > Admit you are a sinner. Romans 3:23 > > Believe in Christ. Acts 16:31 > > Confess your faith. Romans 10:9-10 > http://abcsalvation.org/ > > -----Original Message----- > From: Alastair Irving [mailto:ala...@sj...] > Sent: Sunday, 26 October 2014 12:56 PM > To: lat...@li... > Subject: Re: [Latex-access-devel] improved jaws scripts > > Hi > > I've tested your scripts, it was very easy to get them to work. > > I gave some thought to commiting your changes to our SVN but decided against it. I think most users will use a single application for editting LaTeX and therefore won't want the scripts to be available everywhere. A common working pattern for me, and I suspect many other users, is to be edditing LaTeX files in emails whilst reading emails, browsing the web, etc. It would be very inconvenient to turn off the translation every time I switch to a different application from emacs. > > Best wishes > > Alastair > > > > On 24/10/2014 14:21, Victorious wrote: >> Hi all >> >> I’ve posted some improvements to the jaws scripts over those in the >> project at >> https://dl.dropboxusercontent.com/u/2138237/latex%20access/enhanced%20 >> jaws%20scripts.html >> >> Hope someone finds them useful. >> >> >> >> ---------------------------------------------------------------------- >> -------- >> >> >> >> _______________________________________________ >> Latex-access-devel mailing list >> Lat...@li... >> https://lists.sourceforge.net/lists/listinfo/latex-access-devel >> > > > ------------------------------------------------------------------------------ > _______________________________________________ > Latex-access-devel mailing list > Lat...@li... > https://lists.sourceforge.net/lists/listinfo/latex-access-devel > |
|
From: Alastair I. <ala...@sj...> - 2014-10-26 14:29:34
|
Yes, it worked. Alastair On 26/10/2014 01:12, Nathaniel Schmidt wrote: > Hi, > > Did my commit just work? TortoiseSVN said that paths were modified, > sent, then completed but then there was an error. The error message > said that I cancelled but that the commit was successful…??? > > Nathaniel > > Student > > La Trobe University, Albury-Wodonga campus > > Email (don't use this one unless you are contacting me regarding matters > specific to university): 180...@st... > > http://www.latrobe.edu.au/ > > ABC's of Salvation: > > Admit you are a sinner. Romans 3:23 > > Believe in Christ. Acts 16:31 > > Confess your faith. Romans 10:9-10 > > http://abcsalvation.org/ > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Latex-access-devel mailing list > Lat...@li... > https://lists.sourceforge.net/lists/listinfo/latex-access-devel > |
|
From: Nathaniel S. <nat...@we...> - 2014-10-26 05:13:09
|
Hi, Did my commit just work? TortoiseSVN said that paths were modified, sent, then completed but then there was an error. The error message said that I cancelled but that the commit was successful.??? Nathaniel Student La Trobe University, Albury-Wodonga campus Email (don't use this one unless you are contacting me regarding matters specific to university): 180...@st... http://www.latrobe.edu.au/ ABC's of Salvation: Admit you are a sinner. Romans 3:23 Believe in Christ. Acts 16:31 Confess your faith. Romans 10:9-10 http://abcsalvation.org/ |
|
From: <nsc...@us...> - 2014-10-26 05:09:34
|
Revision: 482
http://sourceforge.net/p/latex-access/code/482
Author: nschmidt19
Date: 2014-10-26 05:09:23 +0000 (Sun, 26 Oct 2014)
Log Message:
-----------
* Minor updates to the NVDA plugin readme: changed the URL for the SVN Repo and we now always recommend that the user has the latest version of NVDA (currently 2014.3) installed. This is important because changes to NVDA's processing of caret movement changes very frequently and often the plugin can't be used with earlier versions.
* One or two rather pedantic changes to the plugin which I made ages ago but lost when the repository was re-located.
Modified Paths:
--------------
nvda/latex_access.py
nvda/readme.html
nvda/readme.t2t
Modified: nvda/latex_access.py
===================================================================
--- nvda/latex_access.py 2014-10-18 20:45:05 UTC (rev 481)
+++ nvda/latex_access.py 2014-10-26 05:09:23 UTC (rev 482)
@@ -274,7 +274,7 @@
# Useful functions:
def GetLine ():
"""Retrieves the line of text that the current navigator object is focussed on, then returns it.
- @tryutndz; The current line under the cursor.
+ @returns: The current line under the cursor.
@rtype: STR
"""
Modified: nvda/readme.html
===================================================================
--- nvda/readme.html 2014-10-18 20:45:05 UTC (rev 481)
+++ nvda/readme.html 2014-10-26 05:09:23 UTC (rev 482)
@@ -48,7 +48,7 @@
<H3>1.2. What is this globalPlugin for?</H3>
<P>
-This global plugin implements Communication between NVDA 2011.1 or later and the latex-access COM objects, letting the user read translated LaTeX documents in an easier fashion.
+This global plugin implements Communication between NVDA 2014.3 or later and the latex-access COM objects, letting the user read translated LaTeX documents in an easier fashion.
</P>
<A NAME="require"></A>
@@ -59,10 +59,10 @@
</P>
<UL>
-<LI>NVDA, version 2011.1 or later. The NVDA website can be found at <A HREF="http://www.nvda-project.org">http://www.nvda-project.org</A>, and the download page can be found <A HREF="http://www.nvda-project.org/download/">here</A>.
+<LI>NVDA, version 2014.3 or later. The NVDA website can be found at <A HREF="http://www.nvda-project.org/">http://www.nvda-project.org/</A>, and the download page can be found <A HREF="http://www.nvda-project.org/download/">here</A>.
<LI>The latest build of version 2 of the python programming language. Official website: <A HREF="http://www.python.org/">http://www.python.org/</A>. I am currently using python 2.7.
<LI>The python for windows extentions, which can be downloaded at <A HREF="http://sourceforge.net/projects/pywin32/">http://sourceforge.net/projects/pywin32/</A>. This package is required to registor the latex-access COM object, the matrix and perhaps the table COM object if that gets created.
-<LI>The latex-access scripts. You probably already have these, but if not, you will need subversion. How to use this VCS is beyond the scope of this readme, but the svn repository can be found at: <A HREF="https://latex-access.svn.sourceforge.net/svnroot/latex-access">https://latex-access.svn.sourceforge.net/svnroot/latex-access</A>. Please remember the exact location where you installed the scripts! I recommend using <A HREF="http://tortoisesvn.net/">tortoise svn</A> as your subversion client, it's accessible, and easy to use.
+<LI>The latex-access scripts. You probably already have these, but if not, you will need subversion. How to use this VCS is beyond the scope of this readme, but the svn repository can be found at: <A HREF="https://svn.code.sf.net/p/latex-access/code/">https://svn.code.sf.net/p/latex-access/code/</A>. Please remember the exact location where you installed the scripts! I recommend using <A HREF="http://tortoisesvn.net/">tortoise svn</A> as your subversion client, it's accessible, and easy to use.
</UL>
<A NAME="Register"></A>
Modified: nvda/readme.t2t
===================================================================
--- nvda/readme.t2t 2014-10-18 20:45:05 UTC (rev 481)
+++ nvda/readme.t2t 2014-10-26 05:09:23 UTC (rev 482)
@@ -29,15 +29,15 @@
Latex-access is a set of python scripts that provides realtime translation of a line of LaTeX into nemeth braille and speech, making the mathematics more readable to the blind user. To find out more, [visit this webpage http://latex-access.sf.net], although you have probably already been there if you are viewing this readme file.
++What is this globalPlugin for?++[gpfor]
-This global plugin implements Communication between NVDA 2011.1 or later and the latex-access COM objects, letting the user read translated LaTeX documents in an easier fashion.
+This global plugin implements Communication between NVDA 2014.3 or later and the latex-access COM objects, letting the user read translated LaTeX documents in an easier fashion.
+Requirements.+[require]
To use this plugin, you will need to install the following software/libraries:
-- NVDA, version 2011.1 or later. The NVDA website can be found at http://www.nvda-project.org, and the download page can be found [here http://www.nvda-project.org/download/].
+- NVDA, version 2014.3 or later. The NVDA website can be found at http://www.nvda-project.org/, and the download page can be found [here http://www.nvda-project.org/download/].
- The latest build of version 2 of the python programming language. Official website: http://www.python.org/. I am currently using python 2.7.
- The python for windows extentions, which can be downloaded at http://sourceforge.net/projects/pywin32/. This package is required to registor the latex-access COM object, the matrix and perhaps the table COM object if that gets created.
-- The latex-access scripts. You probably already have these, but if not, you will need subversion. How to use this VCS is beyond the scope of this readme, but the svn repository can be found at: https://latex-access.svn.sourceforge.net/svnroot/latex-access. Please remember the exact location where you installed the scripts! I recommend using [tortoise svn http://tortoisesvn.net/] as your subversion client, it's accessible, and easy to use.
+- The latex-access scripts. You probably already have these, but if not, you will need subversion. How to use this VCS is beyond the scope of this readme, but the svn repository can be found at: https://svn.code.sf.net/p/latex-access/code/. Please remember the exact location where you installed the scripts! I recommend using [tortoise svn http://tortoisesvn.net/] as your subversion client, it's accessible, and easy to use.
-
+Registering the COM object and installing the globalPlugin.+[Register]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Alastair I. <ala...@sj...> - 2014-10-26 01:56:05
|
Hi I've tested your scripts, it was very easy to get them to work. I gave some thought to commiting your changes to our SVN but decided against it. I think most users will use a single application for editting LaTeX and therefore won't want the scripts to be available everywhere. A common working pattern for me, and I suspect many other users, is to be edditing LaTeX files in emails whilst reading emails, browsing the web, etc. It would be very inconvenient to turn off the translation every time I switch to a different application from emacs. Best wishes Alastair On 24/10/2014 14:21, Victorious wrote: > Hi all > > I’ve posted some improvements to the jaws scripts over those in the > project at > https://dl.dropboxusercontent.com/u/2138237/latex%20access/enhanced%20jaws%20scripts.html > > Hope someone finds them useful. > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Latex-access-devel mailing list > Lat...@li... > https://lists.sourceforge.net/lists/listinfo/latex-access-devel > |
|
From: Alastair I. <ala...@sj...> - 2014-10-26 01:47:50
|
Hi I'm very sorry, I completely forgot about it. I've just tried to add you to the SVN, please let me know if its worked. I look forward to getting your changes. If calling the reInitialise function is helful then I'm happy for you to do so. I wish we knew why it doesn't always work first time though, its very annoying. I'd rather you didn't commit the code inserting function. I think the focus of latex-access should be translation and that features like code insertion are best left to the text editor. Best wishes Alastair On 25/10/2014 07:34, Velegi István wrote: > Hi alastair, > > Have you got my messages sent at the end of summer? I didn't get any > reply to it. > > Cheers, > Istvan |
|
From: Nathaniel S. <nat...@we...> - 2014-10-25 11:08:57
|
Hi Victorious, You wrote: "I don't understand how it would make both jaws and the keyboard unusable; e.g just pasting the using latex.jsb line at the bottom would only load the compiled latex scripts at startup, without affecting keyboard behaviour. Then, the step with modifying default.jkm would add the additional keyboard entries. Have you had jaws break before when trying to modify default.jss?" Yes, I have had it break and hated it so much!!! Maybe Alistair can explain but I still don't understand how you don't have any problems when installing the scripts the way you do. The user settings override the shared settings, so if you don't use a backup copy of FS's own code, none of it is processed at JAWS' start-up. I'm not sure if you are aware of Doug Lee's JAWS scripts for Skype project or not but my understanding of his script installation instructions was that this is the reason why he used to always instruct users to use default_fs.jsb. I forgot to make a copy of this file once when installing SkypeWatch and regretted it big time afterwards!!! Not that it matters any longer because the scripts have an automatic installer. Kind regards, Nathaniel Student La Trobe University, Albury-Wodonga campus Email (don't use this one unless you are contacting me regarding matters specific to university): 180...@st... http://www.latrobe.edu.au/ ABC's of Salvation: Admit you are a sinner. Romans 3:23 Believe in Christ. Acts 16:31 Confess your faith. Romans 10:9-10 <http://abcsalvation.org/> http://abcsalvation.org/ From: Victorious [mailto:dtv...@gm...] Sent: Saturday, 25 October 2014 3:31 PM To: 'Nathaniel Schmidt' Subject: RE: [Latex-access-devel] improved jaws scripts Hi Nathaniel Thanks for the tip on the updated svn repository link. Yeah, a reason why the html document was so comprehensive was because I've recommended this project to some friends who would like to use it but find some of the instructions too complicated (i.e having an archive as an alterantive to those that don't want to use SVN). I was trying to simplify some of the instructions as far as possible. Unfortunately, I wasn't able to get the jaws scripts exchange installer programme to work, because that would greatly help in easing the script install process. Hm, come to think about it, I could simplify some of the instructions even further by adding a batch file to do the command line steps. Will do that. Regarding the scripts potentially breaking stuff, yeah that's why I recommended doing a backup of the entire user settings folder before starting. I don't understand how it would make both jaws and the keyboard unusable; e.g just pasting the using latex.jsb line at the bottom would only load the compiled latex scripts at startup, without affecting keyboard behaviour. Then, the step with modifying default.jkm would add the additional keyboard entries. Have you had jaws break before when trying to modify default.jss? Victorious From: Nathaniel Schmidt [mailto:nat...@we...] Sent: Saturday, October 25, 2014 12:19 PM To: 'Victorious'; lat...@li... <mailto:lat...@li...> Subject: RE: [Latex-access-devel] improved jaws scripts Hi Victorious, I had a look at the HTML document you posted and it looks like you have put a lot of work into these scripts. I would be interested to know what Alistair thinks of them but I have a couple of thoughts and questions for you: 1. Your documentation uses the old check-out SVN repository. is this what you are still using yourself? We don't checkout there anymore: we instead use: https://svn.code.sf.net/p/latex-access/code/ 2. Forgive my ignorance, because I haven't done any JAWS scripting for a while now; and this is not necessarily a criticism but I just don't understand: how can your code integrate itself into the default scripts without the entire computer keyboard becoming completely unusable??? I can only presume that you have somehow tested your code because your documentation contains a section called "Known Issues" but I don't understand how you would have been able to test your code. I would not feel safe in closely following the script installation instructions that you have provided. One way around this problem would be to copy and paste default.jsb from the shared settings folder, renaming it to default_fs.jsb before opening up the script manager and adding 'use "latex.jsb". Naturally, before the line of code that says to use latex.jsb, you would have to add another line in default.jss that says 'use "default_fs.jsb". Note the order of the lines of code! At the risk of being repetitious, I would be incredibly curious to know how you got your code working successfully without both JAWS and the keyboard becoming unusable. Because I can't use the mouse, I would possibly not even be able to unload JAWS and restarting my computer would not even help: I would need a lot of sighted help to get myself out of trouble, unless I used NVDA. Even then though, I still might need to use the mouse to an extent to bring JAWS back to its default behaviour. Look forward to hearing from you and kind regards, Nathaniel Student La Trobe University, Albury-Wodonga campus Email (don't use this one unless you are contacting me regarding matters specific to university): 180...@st... <mailto:180...@st...> http://www.latrobe.edu.au/ ABC's of Salvation: Admit you are a sinner. Romans 3:23 Believe in Christ. Acts 16:31 Confess your faith. Romans 10:9-10 <http://abcsalvation.org/> http://abcsalvation.org/ From: Victorious [mailto:dtv...@gm...] Sent: Saturday, 25 October 2014 5:22 AM To: lat...@li... <mailto:lat...@li...> Subject: [Latex-access-devel] improved jaws scripts Hi all I've posted some improvements to the jaws scripts over those in the project at https://dl.dropboxusercontent.com/u/2138237/latex%20access/enhanced%20jaws%2 0scripts.html Hope someone finds them useful. |
|
From: Nathaniel S. <nat...@we...> - 2014-10-25 04:49:29
|
Hi Victorious, I had a look at the HTML document you posted and it looks like you have put a lot of work into these scripts. I would be interested to know what Alistair thinks of them but I have a couple of thoughts and questions for you: 1. Your documentation uses the old check-out SVN repository. is this what you are still using yourself? We don't checkout there anymore: we instead use: https://svn.code.sf.net/p/latex-access/code/ 2. Forgive my ignorance, because I haven't done any JAWS scripting for a while now; and this is not necessarily a criticism but I just don't understand: how can your code integrate itself into the default scripts without the entire computer keyboard becoming completely unusable??? I can only presume that you have somehow tested your code because your documentation contains a section called "Known Issues" but I don't understand how you would have been able to test your code. I would not feel safe in closely following the script installation instructions that you have provided. One way around this problem would be to copy and paste default.jsb from the shared settings folder, renaming it to default_fs.jsb before opening up the script manager and adding 'use "latex.jsb". Naturally, before the line of code that says to use latex.jsb, you would have to add another line in default.jss that says 'use "default_fs.jsb". Note the order of the lines of code! At the risk of being repetitious, I would be incredibly curious to know how you got your code working successfully without both JAWS and the keyboard becoming unusable. Because I can't use the mouse, I would possibly not even be able to unload JAWS and restarting my computer would not even help: I would need a lot of sighted help to get myself out of trouble, unless I used NVDA. Even then though, I still might need to use the mouse to an extent to bring JAWS back to its default behaviour. Look forward to hearing from you and kind regards, Nathaniel Student La Trobe University, Albury-Wodonga campus Email (don't use this one unless you are contacting me regarding matters specific to university): 180...@st... http://www.latrobe.edu.au/ ABC's of Salvation: Admit you are a sinner. Romans 3:23 Believe in Christ. Acts 16:31 Confess your faith. Romans 10:9-10 <http://abcsalvation.org/> http://abcsalvation.org/ From: Victorious [mailto:dtv...@gm...] Sent: Saturday, 25 October 2014 5:22 AM To: lat...@li... Subject: [Latex-access-devel] improved jaws scripts Hi all I've posted some improvements to the jaws scripts over those in the project at https://dl.dropboxusercontent.com/u/2138237/latex%20access/enhanced%20jaws%2 0scripts.html Hope someone finds them useful. |
|
From: Daniel D. <dan...@gm...> - 2014-10-25 00:17:04
|
Best idea is to submit a patch that we can apply to SVN. This way everyone can get the bennefit of your work and it stays in sync with our changes. I'm only a developer of the emacs/brltty work, but one of the other devs can definitely review a patch and comit for you if you would like. Daniel On Sat, Oct 25, 2014 at 5:21 AM, Victorious <dtv...@gm...> wrote: > Hi all > > > > I’ve posted some improvements to the jaws scripts over those in the project > at > https://dl.dropboxusercontent.com/u/2138237/latex%20access/enhanced%20jaws%20scripts.html > > > > Hope someone finds them useful. > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Latex-access-devel mailing list > Lat...@li... > https://lists.sourceforge.net/lists/listinfo/latex-access-devel > |
|
From: Victorious <dtv...@gm...> - 2014-10-24 18:22:09
|
Hi all I've posted some improvements to the jaws scripts over those in the project at https://dl.dropboxusercontent.com/u/2138237/latex%20access/enhanced%20jaws%2 0scripts.html Hope someone finds them useful. |
|
From: <ala...@us...> - 2014-10-18 20:45:15
|
Revision: 481
http://sourceforge.net/p/latex-access/code/481
Author: alastair-irving
Date: 2014-10-18 20:45:05 +0000 (Sat, 18 Oct 2014)
Log Message:
-----------
Uppdated the NVDA code so that it corresponds to the latest versions of NVDA. This is hopefully the first of a number of commits to try and bring the NVDA code up-to-date.
Modified Paths:
--------------
nvda/latex_access.py
Modified: nvda/latex_access.py
===================================================================
--- nvda/latex_access.py 2014-09-21 23:53:59 UTC (rev 480)
+++ nvda/latex_access.py 2014-10-18 20:45:05 UTC (rev 481)
@@ -33,7 +33,8 @@
import controlTypes
import globalPluginHandler
import NVDAObjects
-import scriptHandler
+from scriptHandler import isScriptWaiting, willSayAllResume, getLastScriptRepeatCount
+import review
import textInfos# to get information such as caret position and the current line.
class EditableText (NVDAObjects.behaviors.EditableText):
@@ -62,7 +63,7 @@
This method ensures that LaTeX translation occurs when the system caret moves, and also makes sure that normal behaviour occurs when l{processMaths} is off.
"""
- if scriptHandler.isScriptWaiting ():
+ if isScriptWaiting ():
return
if not info:
@@ -70,9 +71,8 @@
info = self.makeTextInfo (textInfos.POSITION_CARET)
except:
return
- if config.conf["reviewCursor"]["followCaret"] and api.getNavigatorObject() is self:
- api.setReviewPosition (info)
- if speakUnit == textInfos.UNIT_LINE and EditableText.processMaths:
+ review.handleCaretMove(info)
+ if speakUnit == textInfos.UNIT_LINE and EditableText.processMaths and not willSayAllResume(gesture):
spokenLine = GetLine ()
brailledLine = GetLine ()
if not spokenLine and not brailledLine:# Is it a blank line?
@@ -84,9 +84,10 @@
speech.speakMessage (spokenLine)
braille.handler.message (brailledLine)
else:
- if speakUnit:
+ if speakUnit and not willSayAllResume(gesture):
info.expand(speakUnit)
speech.speakTextInfo(info, unit=speakUnit, reason=controlTypes.REASON_CARET)
+ braille.handler.handleCaretMove(self)
def script_reportCurrentLine (self, gesture):
"""
@@ -104,7 +105,7 @@
except (NotImplementedError, RuntimeError):
info=obj.makeTextInfo(textInfos.POSITION_FIRST)
info.expand(textInfos.UNIT_LINE)
- if scriptHandler.getLastScriptRepeatCount()==0:
+ if getLastScriptRepeatCount()==0:
if EditableText.processMaths:
spokenLine = GetLine ()
brailledLine = GetLine ()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|