pax_global_header00006660000000000000000000000064131604537160014520gustar00rootroot0000000000000052 comment=5235bbb34a110d74199929773590925d4a8e9dc0 liblouisutdml-2.7.0/000077500000000000000000000000001316045371600144165ustar00rootroot00000000000000liblouisutdml-2.7.0/.gitignore000066400000000000000000000020671316045371600164130ustar00rootroot00000000000000*~ *.orig *.o *.la *.lo .deps .libs TAGS GPATH GRTAGS GSYMS GTAGS **Makefile **Makefile.in aclocal.m4 autom4te.cache config.log config.status configure build-aux/compile build-aux/config.guess build-aux/config.sub build-aux/install-sh build-aux/missing build-aux/mdate-sh build-aux/texinfo.tex build-aux/depcomp build-aux/ltmain.sh build-aux/test-driver doc/liblouisutdml.html doc/liblouisutdml.info doc/liblouisutdml.txt doc/liblouisutdml.pdf doc/liblouisutdml.t2p doc/stamp-vti doc/version.texi file2brl.temp file2brl.log gnulib/unistd.h gnulib/arg-nonnull.h gnulib/c++defs.h gnulib/stdlib.h gnulib/sys/types.h gnulib/warn-on-use.h INSTALL liblouisutdml.pc liblouisutdml/config.h liblouisutdml/config.h.in liblouisutdml/stamp-h1 liblouisutdml-*.tar.gz libtool man/file2brl.1 aclocal.m4 m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 tests/run_test_suite.sh tests/testTranslateString tests/tripleTrans tests/*.log tests/*.trs tests/**/output.txt tests/**/error.log tools/file2brl # Java **/*.class # Eclipse .cproject .project liblouisutdml-2.7.0/.travis.yml000066400000000000000000000014571316045371600165360ustar00rootroot00000000000000# define liblouisutdml so that Travis CI service can build and test it language: c compiler: - gcc # make sure we have libxml and java (for jni.h). Make sure we have # texinfo 5.0 or higher. Travis currently runs the old Ubuntu LTS # which has an old version of texinfo, so we need to install from ppa. before_install: - sudo add-apt-repository -y ppa:marutter/texlive.backport - sudo apt-get update -qq - sudo apt-get install -y texinfo - sudo apt-get install -y libxml2 - sudo apt-get install openjdk-6-jdk # let's have two parallel builds. One with stable liblouis and one # with bleeding edge liblouis env: - LIBLOUIS_VERSION=3.2.0 - LIBLOUIS_VERSION=master script: ./scripts/run-tests.sh # tell the irc channel about the results of the build notifications: irc: "irc.oftc.net#liblouis" liblouisutdml-2.7.0/ANNOUNCEMENT000066400000000000000000000032621316045371600162360ustar00rootroot00000000000000liblouisutdml 2.6.0 has been released. The release is available for download at: https://github.com/liblouis/liblouisutdml/releases Introduction ============ Liblouisutdml is an open-source braille formatter. The formatting can be configured via a style sheet. By incorporating Liblouis[1] it provides the capability of translating any XML or plain text file into properly transcribed, embosser-ready braille. This includes translation into grade two, mathematical codes, etc. Changes in this release ======================= This is the first official Liblouisutdml release in a long time. Many bug fixes and stability improvements have gone into it. There are a couple of new features like end note functionality and boxlines for example. Also there is an extensive test suite now and the documentation has been vastly enhanced. New features ~~~~~~~~~~~~ - Added an extensive test suite which tests liblouisutml under various circumstances. - Add a configure option to disable the Java bindings. - Added Java bindings for logging callback API in liblouis. - Add end note functionality. Thanks to Paul Wood from Torch Trust Bug fixes ~~~~~~~~~ - fixed a problem with duplicate semantics attributes - solve multiple brl nodes after math nodes - Improve the documentation on XPath expressions. - Fixed numerous problems in the build system. - Fixed the character used when UCS2 builds encounter characters above u+ffff Documentation updates ~~~~~~~~~~~~~~~~~~~~~ - Document the end note functionality - Add an index for the default styles - Update the documentation appendix - Add the boxline style. Thanks to Michael Whapples. Footnotes ========= [1] See https://github.com/liblouis/liblouis liblouisutdml-2.7.0/AUTHORS000066400000000000000000000006041316045371600154660ustar00rootroot00000000000000John J. Boyer, Dave Mielke and other BRLTy team members Leon ungier of Viewplus Technologies John Gardner of Viewplus Technologies Yuemei Sun of ViewPlus Technologies Eitan Isaacson Alastair Irving Christian Egli Lars Bjørndal Bert Frees , Katholieke Universiteit Leuven liblouisutdml-2.7.0/COPYING000066400000000000000000001045131316045371600154550ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 3 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, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . liblouisutdml-2.7.0/COPYING.LIB000066400000000000000000000167251316045371600160710ustar00rootroot00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. liblouisutdml-2.7.0/ChangeLog000066400000000000000000000154471316045371600162030ustar00rootroot000000000000002010-01-06 Christian Egli * man/Makefile.am (pdf2brl.1): Automatically generate man pages for rtf2brl and pdf2brl. * doc/liblouisxml.texi (Transcribing PDF files with pdf2brl): Add documentation for the pdf2brl tool. * README: Mention the dependency on poppler or xpdf for pdf2brl and rtf2xml for rtf2brl. * tools/Makefile.am (bin_SCRIPTS): Added the pdf2brl script properly to the build process, i.e. make sure it is generated by configure and packaged and installed by make. 2009-12-28 John J. Boyer * implemented handling of xpath expressions * Added pdf2brl tool 2009-11-24 Christian Egli * doc/liblouisxml.texi (html.sem): Fix some typos and add references to the appendix with the sem file examples. 2009-11-23 John J. Boyer * Release 2.1.0: Many new features, see NEWS 2009-11-04 Christian Egli * Makefile.am: * configure.ac: * man/Makefile.am: Automatically generate man pages using help2man if it is available. * Makefile.am: * configure.ac: * gnulib/*: * tools/xml2brl.c: Integrate gnulib and use it to do option parsing using getopt. xml2brl now handles --help and --version. 2009-10-03 Christian Egli * tests/check_version.c: Add a test case for lbx_version(). 2009-08-11 Christian Egli * doc/Makefile.am (man_MANS): Only define the man pages once, otherwise they will be installed twice. * doc/liblouisxml.texi (style): Fixed a small typo with the invocation of the settings macro 2009-07-28 John J. Boyer * Alpha realase of UK Maths files 2009-07-17 Lars Bjørndal * contrib/liblouisxml.spec: Added rpm spec file 2009-07-06 Christian Egli * doc/liblouisxml.texi (Semantic Actions Overview): Fixed two small capitalization typos. 2009-03-12 John J. Boyer * doc/Makefile.am: datarootdir may not work: use datadir 2009-03-09 Christian Egli * doc/Makefile.am (doc_DATA): Use the default location for docdir. Thanks to Lars Bjørndal for the report. 2009-03-04 John J. Boyer * Release 1.9.0 2009-02-20 John J. Boyer * Added the directory mac-osx-10.5 and its files for building on the Mac. 2009-02-18 John J. Boyer * Changing e-mail, website and company name to abilitiessoft. 2009-02-16 John J. Boyer * Added __stdcall as per liblouis. * Moved qetProgramPath from paths.c to compileTranslationTable.c in liblouis and made it exportable as lou_getProgramPath for Windows only. 2009-02-10 (2) John J. Boyer * Put in new path.c module, which finds the program location in Windows. 2009-02-13 Christian Egli * doc/liblouisxml.texi (Semantic Actions in detail): Added docu for config* semantic actions. 2009-02-10 John J. Boyer * Put in new path.c module, which finds the program location in Windows. * Added README.win32 on how to build on Windows. 2009-02-10 Christian Egli * tests/testcode.xml: * liblouisxml/transcribe_music.c: * liblouisxml/transcribe_graphic.c: * liblouisxml/transcribe_chemistry.c: * liblouisxml/make_sem_names.c: Move license from GPL + restrictions/permissions to LGPL with the blessing of the copyright holders. 2009-02-09 Christian Egli * README: Remove any mentioning of mathml2brl * doc/liblouis.texi (Programming with liblouis): Move the programming section to the back and rename to emphasize more on the user instead of the programmer. * doc/liblouisxml-guide.texi: Renamed to liblouisxml.texi 2009-02-08 John J. Boyer * More proofreading and correcting ob liblouis-guide.texi. 2009-02-07 John J. Boyer * Update documentation examples * remove outdated mathml2brl program 2009-02-04 John J. Boyer * Fixed a problem in xml2brl when using the -p option (poorly formatted text) which caused it to fail to recognize text that was in fact properly formatted. 2009-02-04 Christian Egli * doc/liblouisxml-guide.texi (Semantic Actions in detail): Added a separate section to document the semantic actions individually (Table of contents): Added docu for the table of contents feature. 2009-02-03 John J. Boyer * Implemented lbx_version. 2009-02-02 Christian Egli * NEWS: Added NEWS for release 1.8.0 2009-01-26 John J. Boyer * added the configfile, configstring and configtweak semantic actions 2009-01-21 Christian Egli * doc/Makefile.am (msword2brl.1): Generate the man page automatically with the help of a proper usage message, --help and --version options and the help2man utility. 2009-01-08 Christian Egli * doc/msword2brl.1: Add a man page for msword2brl * configure.ac: Generate version string for msword2brl automatically. * doc/Makefile.am (AM_MAKEINFOHTMLFLAGS): Generate the html as one big page. 2008-12-23 Christian Egli * doc/Makefile.am : Integrated the man page and the liblouisxml-guide in the build process. * doc/xml2brl.1: Added a man page for xml2brl. * doc/liblouisxml-guide.texi: Added a texinfo version of the liblouisxml-guide. John J. Boyer, john.boyer@jjb-software.com Release liblouisxml-1.4.2, June 16, 2008 Converted to Gnu autotools A few bugs fixed Release liblouisxml-1.4.1 linux-Makefile optimized for RedHat If there are errors in a liblouis table you will now get only a single arror report instead of myriads. Release liblouisxml-1.4.0, May 12, 2008 doc directory renamed docs . Semantic-action and configuration files in this directory have been prefixed with example_ mode parameter added to functions in liblouisxml.h Cdata sections can now be translated as text, computer code or ignored. A function to find the true namo of the "Program Files" directory in Windows has been written by Yuemei Sun of ViewPlus Technologies. It is in the paths.c module. Paths for translation tables, semantic action files and configuration files can now be assigned more flexibly. See paths.c xml2brl will now accept configuration settings on the command line, so it is unnecessary to change a configuration file. It is now possible to pass a configuration string in memory to the library, not just the name of a configuration file. For details on all these changes see docs/liblouisxml-guide.html liblouisutdml-2.7.0/Makefile.am000066400000000000000000000003751316045371600164570ustar00rootroot00000000000000SUBDIRS = gnulib doc lbu_files liblouisutdml tools tests man m4 java windows ACLOCAL_AMFLAGS = -I m4 -I gnulib/m4 pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = liblouisutdml.pc EXTRA_DIST = liblouisutdml.pc README.windows README.mac README.org liblouisutdml-2.7.0/NEWS000066400000000000000000000075431316045371600151260ustar00rootroot00000000000000liblouisxml NEWS -- history of user-visible changes. * Noteworthy changes in release 2.7.0 (2017-09-20) This Liblouisutdml release finally has support for liblouis 3.0. ** Bug fixes - Fixes for locating jni.h on macOS thanks to Gordon Byrnes - Fix so footer doesn't stop KeepWithNext working thanks to Paul Wood - Fix log level type in default callback thanks to Boris Dušek * Noteworthy changes in release 2.6.0 (2015-06-09) This is the first official Liblouisutdml release in a long time. Many bug fixes and stability improvements have gone into it. There are a couple of new features like end note functionality and boxlines for example. Also there is an extensive test suite now and the documentation has been vastly enhanced. ** New features - Added an extensive test suite which tests liblouisutml under various circumstances. - Add a configure option to disable the Java bindings. - Added Java bindings for logging callback API in liblouis. - Add end note functionality. Thanks to Paul Wood from Torch Trust ** Bug fixes - fixed a problem with duplicate semantics attributes - solve multiple brl nodes after math nodes - Improve the documentation on XPath expressions. - Fixed numerous problems in the build system. - Fixed the character used when UCS2 builds encounter characters above u+ffff ** Documentation updates - Document the end note functionality - Add an index for the default styles - Update the documentation appendix - Add the boxline style. Thanks to Michael Whapples. * Noteworthy changes in release 2.1.0 (2009-11-23) The main focus for this release has been the addition of user-defined styles with the associated documentation overhaul. Also there is a new tool rtf2brl and all the tools now have man pages. ** New features *** Styles - User-defined styles - styles can be nested in a document - Persistent style settings - roman page numbering *** Semantic action - "newentries no" semantic action - "linespacing" semantic action *** rtf2brl There is a new tool to generate Braille from rtf. *** man pages All tools accept the --version and --help options and are documented in man pages. The tools are now licensed with GPL. ** Bug fixes - The version number is now displayed correctly. * Noteworthy changes in release 2.0.0 (2009-08-21) This release contains support for UK and Marburg math and the usual assortment of bug fixes. ** New features - Beta version of UK Maths - Alpha version of Marburg math - rpm spec file ** Bug fixes - Updated semantic files - Documentation fixes - Fix for building static libs * Noteworthy changes in release 1.9.1 (2009-04-21) ** Bug fixes - Fix the table of contents generator - Improved the documentation * Noteworthy changes in release 1.9.0 (2009-03-04) This release contains some new semantic actions and some major documentation updates. ** New features *** configfile and configstring semantic actions The configfile, configstring and configtweak semantic actions enable the configuration of liblouisxml to be changed according to the contents of the document being transcribed. *** Documentation up-to-date The documentation is brought up-to-date. Specifically the semantic actions are now described in detail. Also there is now documentation about the table of contents feature. ** Bug fixes - Fix a problem with -p option in xml2brl - New paths.c which finds where the program is under Windows - Added build instructions for Windows and Mac - Fix a buffer overflow in table of contents generation ** Changes in behavior None * Noteworthy changes in release 1.8.0 (2009-02-01) This is the first release of liblouisxml from the Google code page. It is a bug fix release to work with the latest release of liblouis. ** New features No new user visible features ** Bug fixes Search for liblouis tables under /usr/share now. ** Changes in behavior None Local variables: mode: org end: liblouisutdml-2.7.0/README000077700000000000000000000000001316045371600167372README.orgustar00rootroot00000000000000liblouisutdml-2.7.0/README.mac000066400000000000000000000030571316045371600160420ustar00rootroot00000000000000Following the below steps will install the latest liblouisutdml tar ball from http://code.google.com/p/liblouisutdml/downloads/list NOTE: I am assuming that you already have liblouis installed in /usr or /usr/local. 1. Download pkg-config from http://pkg-config.freedesktop.org/releases/ Release 0.22 seems to work best. Uncompress it and switch to the newly created directory. Install it with ./configure; make; sudo make install. This will install it in /usr/local by default. 2. Add the following line to your ~/.profile (you can change the system profile if you prefer): export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/lib/pkgconfig" This line tells configure where to look for the *.pc files for installed libraries. You should check to make sure that both of these directories exist. Both of these directories will be needed because libxml2 comes installed in /usr/lib, and the liblouis library will by default install in /usr/local/lib. 3. Download the latest liblouisutdml tarball from http://code.google.com/p/liblouisutdml/downloads/list ; decompress it; switch to the liblouisutdml directory and run ./configure; make; sudo make install This works on my mac, and so hopefully should work for you. If you run into linking problems it might be that there are multiple versions of libxml2 installed. In that case uninstall all of the libxml2 versions except for the one in /usr/ and try again. If libraries have been installed in nonstandard locations, then those pkgconfig paths should be added to the PKG_CONFIG_PATH variable in ~/.profile. liblouisutdml-2.7.0/README.org000066400000000000000000000042701316045371600160670ustar00rootroot00000000000000* Introduction #+BEGIN_HTML Build Status #+END_HTML Liblouisutdml is an open-source library providing complete braille transcription services for xml, html and text documents. It translates into appropriate braille codes and formats according to its style sheet and the specifications in the document. A command-line program, ~file2brl~ which uses this library is also included. The latest version of liblouis is required. Java bindings are built in to the library. The library is licensed under the GNU Lesser General Public License (LGPL) version 3 or later. See the file COPYING.LIB. The command line tools, are licensed under the GNU General Public License version 3.0 or later. See the file COPYING. * Documentation For documentation, see ~liblouisutdml.html~ or ~liblouisutdml.txt~. These are in the docs directory. For an example of a configuration file, see ~liblouisutdml.ini~ and ~preferences.cfg~. For examples of semantics-action files, see ~dtbook.sem~ and ~nemeth.sem~. These files are in the ~lbu_files~ subdirectory. For examples of translation tables, see ~en-us-g2.ctb~, ~en-us-g1.ctb~, ~chardefs.cti~, ~nemeth.ctb~ and whatever other files they may include. These are all in the ~tables~ directory of [[https://github.com/liblouis/liblouis][liblouis]]. * Installation First obtain the latest version of [[https://github.com/liblouis/liblouis][liblouis]] and compile it. Before compiling, you should chose between 16- and 32-bit Unicode, as described in the README file and the documentation. liblouisutdml inherits this choice from liblouis. After unpacking the distribution tarball for liblouisutdml go to the directory it creates. After running ~configure~ run ~make~ and ~make install~. You will need root privileges for the installation step. This will produce the liblouisutdml library and the program ~file2brl~. To compile the Java bindings go to the java subdirectory and run ~ant~. Note that that the library and programs will not work properly unless you have first installed the latest version of [[https://github.com/liblouis/liblouis][liblouis]]. liblouisutdml-2.7.0/README.windows000066400000000000000000000063561316045371600170010ustar00rootroot00000000000000Here are the instructions for making liblouisutdml.dll and liblouis.dll, which liblouisutdml uses for actual translation. First, make sure you have Microsoft Visual C++, Microsoft SDKs or Microsoft Visual Studio, which should contain the C compiler and the nmake program maintenance tool. The environment variables must be set correctly. If you have Windows Vista or 7 and Microsoft SDKs you can press the Windows key, type sdk and enter. A batch file that sets the environment variables will run and a cmd prompt will appear. The exact procedure for starting the command-line C tool environment may vary with the Microsoft package you are using. You must also have a Java Development Kit (JDK) for Java 1.6 or later. the JRE does not contain the necessary files. You will get either 32-bit or 64-bit liblouisutdml.dll and liblouisutdml.lib according to which version of the compiler you are running. However, liblouisutdml.dll depends on Windows libraries which are either 32 or 64 bits, depending on what version your Windows is. The "For Developers" page of http://www.brailleblaster.org contains links for liblouis, liblouisutdml, the recommended version of libxml2 and the swt.jar files for various platforms and architectures. Download the latest version of liblouis, unpack it and go to the windows subdirectory. (You should unpack it in a location that doesn't need escaping with quotes i.e. a DOS compatible path.) Edit the file configure.mk If you want 32-bit Unicode, change the 2 in the line that reads UCS=2 to a 4. Then run the following command: nmake /f Makefile.nmake liblouis-2.dll and liblouis-2.lib will be in the directory. The Makefile that generates liblouisutdml.dll and liblouisutd.lib will know where the files are when you edit the configure.mk. Next, download the latest tarball of liblouisutdml and unpack it. Remember to unpack in a DOS compatible location. Note that in the windows subdirectory there is a file called configure.mk. You will be editing this later. Also in the windows subdirectory is another subdirectory called include It contains files that replace some in the source directory of libxml2. Next download the tarball of libxml2 for version 2.7.2 from the BrailleBlaster website, as described above and unpack it. You will need to copy the file xmlversion.h from the liblouisutdml windows/include directory into the include/libxml directory of the libxml2 directory. Note that it replaces the file of the same name that is already there. Going back to the directory obtained by unpacking the liblouisutdml tarball, go to its windows subdirectory. Edit the file configure.mk replacing the sample values with the ones for your machine. Next run nmake /f Makefile.nmake The directory will now contain liblouisutdml.dll, liblouisutdml.lib and a number of object files. You will also find a new directory, brailleblasterlib, so-called because the files it contains are intended to be copied into the BrailleBlaster dist/native/lib directory. These can be used with file2brl.exe You will also find the directory libslib which contains liblouis-2.lib and liblouisutdml.lib. These files are not needed for BrailleBlaster. They are provided in case someone wants to link liblouis and/or liblouisutdml with something else. liblouisutdml-2.7.0/autogen.sh000077500000000000000000000034371316045371600164260ustar00rootroot00000000000000#!/bin/sh # liblouisutdml Braille Transcription Library # # This file may contain code borrowed from the Linux screenreader # BRLTTY, copyright (C) 1999-2006 by # the BRLTTY Team # # Copyright (C) 2004, 2005, 2006, 2013 # ViewPlus Technologies, Inc. www.viewplus.com # and # Abilitiessoft, Inc. www.abilitiessoft.org # All rights reserved # # This file is free software; you can redistribute it and/or modify it # under the terms of the Lesser or Library GNU General Public License # (LGPL) as published by the # Free Software Foundation; either version 3, or (at your option) any # later version. # # This file 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 # Library GNU General Public License for more details. # # You should have received a copy of the Library GNU General Public # License along with this program; see the file COPYING. If not, # write to # the Free Software Foundation, 51 Franklin Street, Fifth Floor, # Boston, MA 02110-1301, USA. # # Maintained by John J. Boyer john.boyer@abilitiessoft.org # # # autogen.sh glue for liblouis # # Requires: automake 1.9, autoconf 2.57+ # Conflicts: autoconf 2.13 set -e # Refresh GNU autotools toolchain. echo Cleaning autotools files... find -type d -name autom4te.cache -print0 | xargs -0 rm -rf \; find -type f \( -name missing -o -name install-sh -o -name mkinstalldirs \ -o -name depcomp -o -name ltmain.sh -o -name configure \ -o -name config.sub -o -name config.guess -o -name config.h.in \ -o -name mdate-sh -o -name texinfo.tex \ -o -name Makefile.in -o -name aclocal.m4 \) -print0 | xargs -0 rm -f echo Running autoreconf... autoreconf --force --install exit 0 liblouisutdml-2.7.0/build-aux/000077500000000000000000000000001316045371600163105ustar00rootroot00000000000000liblouisutdml-2.7.0/build-aux/snippet/000077500000000000000000000000001316045371600177725ustar00rootroot00000000000000liblouisutdml-2.7.0/build-aux/snippet/_Noreturn.h000066400000000000000000000004621316045371600221200ustar00rootroot00000000000000#if !defined _Noreturn && __STDC_VERSION__ < 201112 # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ || 0x5110 <= __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) # elif 1200 <= _MSC_VER # define _Noreturn __declspec (noreturn) # else # define _Noreturn # endif #endif liblouisutdml-2.7.0/build-aux/snippet/arg-nonnull.h000066400000000000000000000023001316045371600223720ustar00rootroot00000000000000/* A C macro for declaring that specific arguments must not be NULL. Copyright (C) 2009-2013 Free Software Foundation, Inc. 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 3 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, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) # endif #endif liblouisutdml-2.7.0/build-aux/snippet/c++defs.h000066400000000000000000000267531316045371600213720ustar00rootroot00000000000000/* C++ compatible function declaration macros. Copyright (C) 2010-2013 Free Software Foundation, Inc. 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 3 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, see . */ #ifndef _GL_CXXDEFS_H #define _GL_CXXDEFS_H /* The three most frequent use cases of these macros are: * For providing a substitute for a function that is missing on some platforms, but is declared and works fine on the platforms on which it exists: #if @GNULIB_FOO@ # if !@HAVE_FOO@ _GL_FUNCDECL_SYS (foo, ...); # endif _GL_CXXALIAS_SYS (foo, ...); _GL_CXXALIASWARN (foo); #elif defined GNULIB_POSIXCHECK ... #endif * For providing a replacement for a function that exists on all platforms, but is broken/insufficient and needs to be replaced on some platforms: #if @GNULIB_FOO@ # if @REPLACE_FOO@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef foo # define foo rpl_foo # endif _GL_FUNCDECL_RPL (foo, ...); _GL_CXXALIAS_RPL (foo, ...); # else _GL_CXXALIAS_SYS (foo, ...); # endif _GL_CXXALIASWARN (foo); #elif defined GNULIB_POSIXCHECK ... #endif * For providing a replacement for a function that exists on some platforms but is broken/insufficient and needs to be replaced on some of them and is additionally either missing or undeclared on some other platforms: #if @GNULIB_FOO@ # if @REPLACE_FOO@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef foo # define foo rpl_foo # endif _GL_FUNCDECL_RPL (foo, ...); _GL_CXXALIAS_RPL (foo, ...); # else # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ _GL_FUNCDECL_SYS (foo, ...); # endif _GL_CXXALIAS_SYS (foo, ...); # endif _GL_CXXALIASWARN (foo); #elif defined GNULIB_POSIXCHECK ... #endif */ /* _GL_EXTERN_C declaration; performs the declaration with C linkage. */ #if defined __cplusplus # define _GL_EXTERN_C extern "C" #else # define _GL_EXTERN_C extern #endif /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); declares a replacement function, named rpl_func, with the given prototype, consisting of return type, parameters, and attributes. Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ _GL_EXTERN_C rettype rpl_func parameters_and_attributes /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); declares the system function, named func, with the given prototype, consisting of return type, parameters, and attributes. Example: _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); */ #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ _GL_EXTERN_C rettype func parameters_and_attributes /* _GL_CXXALIAS_RPL (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to rpl_func, if GNULIB_NAMESPACE is defined. Example: _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); */ #define _GL_CXXALIAS_RPL(func,rettype,parameters) \ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ rettype (*const func) parameters = ::rpl_func; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different declaration. A cast is used to silence the "invalid conversion" error that would otherwise occur. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ rettype (*const func) parameters = \ reinterpret_cast(::rpl_func); \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE is defined. Example: _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); */ #if defined __cplusplus && defined GNULIB_NAMESPACE /* If we were to write rettype (*const func) parameters = ::func; like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls better (remove an indirection through a 'static' pointer variable), but then the _GL_CXXALIASWARN macro below would cause a warning not only for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */ # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ static rettype (*func) parameters = ::func; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); is like _GL_CXXALIAS_SYS (func, rettype, parameters); except that the C function func may have a slightly different declaration. A cast is used to silence the "invalid conversion" error that would otherwise occur. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ static rettype (*func) parameters = \ reinterpret_cast(::func); \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); is like _GL_CXXALIAS_SYS (func, rettype, parameters); except that the C function is picked among a set of overloaded functions, namely the one with rettype2 and parameters2. Two consecutive casts are used to silence the "cannot find a match" and "invalid conversion" errors that would otherwise occur. */ #if defined __cplusplus && defined GNULIB_NAMESPACE /* The outer cast must be a reinterpret_cast. The inner cast: When the function is defined as a set of overloaded functions, it works as a static_cast<>, choosing the designated variant. When the function is defined as a single variant, it works as a reinterpret_cast<>. The parenthesized cast syntax works both ways. */ # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ namespace GNULIB_NAMESPACE \ { \ static rettype (*func) parameters = \ reinterpret_cast( \ (rettype2(*)parameters2)(::func)); \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIASWARN (func); causes a warning to be emitted when ::func is used but not when GNULIB_NAMESPACE::func is used. func must be defined without overloaded variants. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIASWARN(func) \ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) # define _GL_CXXALIASWARN_1(func,namespace) \ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ # if !__OPTIMIZE__ # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING # define _GL_CXXALIASWARN_2(func,namespace) \ extern __typeof__ (func) func # else # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_EXTERN_C int _gl_cxxalias_dummy # endif #else # define _GL_CXXALIASWARN(func) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); causes a warning to be emitted when the given overloaded variant of ::func is used but not when GNULIB_NAMESPACE::func is used. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ GNULIB_NAMESPACE) # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ # if !__OPTIMIZE__ # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ extern __typeof__ (func) func # else # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ _GL_EXTERN_C int _gl_cxxalias_dummy # endif #else # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif #endif /* _GL_CXXDEFS_H */ liblouisutdml-2.7.0/build-aux/snippet/warn-on-use.h000066400000000000000000000120071316045371600223160ustar00rootroot00000000000000/* A C macro for emitting warnings if a function is used. Copyright (C) 2010-2013 Free Software Foundation, Inc. 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 3 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, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration for FUNCTION which will then trigger a compiler warning containing the text of "literal string" anywhere that function is called, if supported by the compiler. If the compiler does not support this feature, the macro expands to an unused extern declaration. This macro is useful for marking a function as a potential portability trap, with the intent that "literal string" include instructions on the replacement function that should be used instead. However, one of the reasons that a function is a portability trap is if it has the wrong signature. Declaring FUNCTION with a different signature in C is a compilation error, so this macro must use the same type as any existing declaration so that programs that avoid the problematic FUNCTION do not fail to compile merely because they included a header that poisoned the function. But this implies that _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already have a declaration. Use of this macro implies that there must not be any other macro hiding the declaration of FUNCTION; but undefining FUNCTION first is part of the poisoning process anyway (although for symbols that are provided only via a macro, the result is a compilation error rather than a warning containing "literal string"). Also note that in C++, it is only safe to use if FUNCTION has no overloads. For an example, it is possible to poison 'getline' by: - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], [getline]) in configure.ac, which potentially defines HAVE_RAW_DECL_GETLINE - adding this code to a header that wraps the system : #undef getline #if HAVE_RAW_DECL_GETLINE _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" "not universally present; use the gnulib module getline"); #endif It is not possible to directly poison global variables. But it is possible to write a wrapper accessor function, and poison that (less common usage, like &environ, will cause a compilation error rather than issue the nice warning, but the end result of informing the developer about their portability problem is still achieved): #if HAVE_RAW_DECL_ENVIRON static char ***rpl_environ (void) { return &environ; } _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); # undef environ # define environ (*rpl_environ ()) #endif */ #ifndef _GL_WARN_ON_USE # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ extern __typeof__ (function) function __attribute__ ((__warning__ (message))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ extern __typeof__ (function) function # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") is like _GL_WARN_ON_USE (function, "string"), except that the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ extern rettype function parameters_and_attributes \ __attribute__ ((__warning__ (msg))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ extern rettype function parameters_and_attributes # else /* Unsupported. */ # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif /* _GL_WARN_EXTERN_C declaration; performs the declaration with C linkage. */ #ifndef _GL_WARN_EXTERN_C # if defined __cplusplus # define _GL_WARN_EXTERN_C extern "C" # else # define _GL_WARN_EXTERN_C extern # endif #endif liblouisutdml-2.7.0/configure.ac000066400000000000000000000100641316045371600167050ustar00rootroot00000000000000# Process this file with autoconf to produce a configure script. AC_PREREQ(2.68) AC_INIT([liblouisutdml], [2.7.0], [liblouis-liblouisxml@freelists.org], [liblouisutdml], [http://www.liblouis.org]) AC_CONFIG_SRCDIR([liblouisutdml/semantics.c]) AC_CONFIG_HEADER([liblouisutdml/config.h]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE # increment if the interface has additions, changes, removals. LIBLOUISUTDML_CURRENT=8 # increment any time the source changes; set to # 0 if you increment CURRENT LIBLOUISUTDML_REVISION=0 # increment if any interfaces have been added; set to 0 # if any interfaces have been changed or removed. removal has # precedence over adding, so set to 0 if both happened. LIBLOUISUTDML_AGE=0 AC_SUBST(LIBLOUISUTDML_CURRENT) AC_SUBST(LIBLOUISUTDML_REVISION) AC_SUBST(LIBLOUISUTDML_AGE) # Checks for programs. AC_PROG_CC # gnulib gl_EARLY gl_INIT # Checks for more programs. AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET # AC_PROG_RANLIB AC_ISC_POSIX AC_LIBTOOL_WIN32_DLL AM_PROG_LIBTOOL # GNU help2man creates man pages from --help output; in many cases, # this is sufficient, and obviates the need to maintain man pages # separately. However, some developers do not have it so we do not # make its use mandatory. AC_CHECK_PROG([HELP2MAN], [help2man], [help2man]) AM_CONDITIONAL([HAVE_HELP2MAN], [test x$HELP2MAN = xhelp2man]) AC_PATH_PROG(PKG_CONFIG, pkg-config) PKG_CHECK_MODULES(BASE_DEPENDENCIES, [liblouis >= 3.0.0, libxml-2.0]) # Checks for libraries. # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([stdlib.h string.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST # Checks for library functions. AC_FUNC_MALLOC AC_FUNC_REALLOC AC_FUNC_STAT AC_CHECK_FUNCS([memset]) case $host in *mingw* | *cygwin*) LDFLAGS="$LDFLAGS -avoid-version" CFLAGS="$CFLAGS -Wl,--add-stdcall-alias" ;; esac # Disable building the Java bindings on request AC_ARG_ENABLE( [java_bindings], [ --disable-java-bindings do not build the Java bindings], [case "${enableval}" in yes) java_bindings=yes ;; no) java_bindings=no ;; *) AC_MSG_ERROR([bad value ${enableval} for --disable-java-bindings]) ;; esac],[java_bindings=yes]) AM_CONDITIONAL([JAVA_BINDINGS], [test x$java_bindings == xyes]) AC_MSG_CHECKING([whether Java bindings should be built]) AC_MSG_RESULT($java_bindings) if test x$java_bindings == xyes ; then # make sure jni include dirs are found # using a macro from the autoconf archive AX_JNI_INCLUDE_DIR for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS do CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR" found_jni_h=yes done fi if test x$java_bindings == xyes -a x$found_jni_h != xyes ; then AC_MSG_ERROR([Please install jni properly or disable the Java bindings with --disable-java-bindings.]) fi AC_CONFIG_FILES([Makefile gnulib/Makefile doc/Makefile java/Makefile java/lib/Makefile java/src/Makefile java/src/org/Makefile java/src/org/liblouis/Makefile java/tests/Makefile java/tests/org/Makefile java/tests/org/liblouis/Makefile java/testdata/Makefile java/testdata/liblouis/Makefile java/testdata/liblouis/tables/Makefile java/testdata/liblouisutdml/Makefile java/testdata/liblouisutdml/lbu_files/Makefile man/Makefile lbu_files/Makefile liblouisutdml/Makefile liblouisutdml.pc tests/Makefile tests/test_suite/Makefile tests/test_suite/test_01/Makefile tests/test_suite/test_02/Makefile tests/test_suite/test_03/Makefile tests/test_suite/test_04/Makefile tests/test_suite/test_05/Makefile tests/test_suite/test_06/Makefile tests/test_suite/test_07/Makefile tests/test_suite/test_08/Makefile tests/test_suite/test_09/Makefile tests/test_suite/test_10/Makefile tests/test_suite/test_11/Makefile tests/test_suite/test_12/Makefile tests/test_suite/test_13/Makefile tests/test_suite/test_14/Makefile tools/Makefile windows/Makefile windows/include/Makefile m4/Makefile]) # generate the shell script to run the test suite and make sure it is executable AC_CONFIG_FILES([tests/run_test_suite.sh], [chmod +x tests/run_test_suite.sh]) AC_OUTPUT liblouisutdml-2.7.0/copyright-notice.cmt000066400000000000000000000022441316045371600204140ustar00rootroot00000000000000# liblouisutdml Braille Transcription Library # # This file may contain code borrowed from the Linux screenreader # BRLTTY, copyright (C) 1999-2006 by # the BRLTTY Team # # Copyright (C) 2004, 2005, 2006, 2013 # ViewPlus Technologies, Inc. www.viewplus.com # and # Abilitiessoft, Inc. www.abilitiessoft.org # All rights reserved # # This file is free software; you can redistribute it and/or modify it # under the terms of the Lesser or Library GNU General Public License # (LGPL) as published by the # Free Software Foundation; either version 3, or (at your option) any # later version. # # This file 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 # Library GNU General Public License for more details. # # You should have received a copy of the Library GNU General Public # License along with this program; see the file COPYING. If not, # write to # the Free Software Foundation, 51 Franklin Street, Fifth Floor, # Boston, MA 02110-1301, USA. # # Maintained by John J. Boyer john.boyer@abilitiessoft.org # liblouisutdml-2.7.0/copyright-notice.txt000066400000000000000000000022021316045371600204420ustar00rootroot00000000000000/* liblouisutdml Braille Transcription Library This file may contain code borrowed from the Linux screenreader BRLTTY, copyright (C) 1999-2006 by the BRLTTY Team Copyright (C) 2004, 2005, 2006, 2013 ViewPlus Technologies, Inc. www.viewplus.com and Abilitiessoft, Inc. www.abilitiessoft.org All rights reserved This file is free software; you can redistribute it and/or modify it under the terms of the Lesser or Library GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. This file 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 Library GNU General Public License for more details. You should have received a copy of the Library GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Maintained by John J. Boyer john.boyer@abilitiessoft.org */ liblouisutdml-2.7.0/doc/000077500000000000000000000000001316045371600151635ustar00rootroot00000000000000liblouisutdml-2.7.0/doc/Makefile.am000066400000000000000000000007531316045371600172240ustar00rootroot00000000000000# docdir is only needed if you have Autoconf older than 2.60 docdir = ${datadir}/doc/${PACKAGE} doc_DATA = \ copyright-notice \ liblouisutdml.html \ liblouisutdml.txt EXTRA_DIST = \ copyright-notice \ liblouisutdml.html \ liblouisutdml.txt CLEANFILES = liblouisutdml.html liblouisutdml.txt info_TEXINFOS = liblouisutdml.texi # generate one big html file AM_MAKEINFOHTMLFLAGS = --no-headers --no-split SUFFIXES = .txt .texi.txt: $(MAKEINFO) --plaintext $< -o $@ liblouisutdml-2.7.0/doc/copyright-notice000066400000000000000000000021631316045371600203770ustar00rootroot00000000000000liblouisutdml Braille Transcription Library This file may contain code borrowed from the Linux screenreader BRLTTY, copyright (C) 1999-2006 by the BRLTTY Team Copyright (C) 2004, 2005, 2006 ViewPlus Technologies, Inc. www.viewplus.com and JJB Software, Inc. www.jjb-software.com All rights reserved This file is free software; you can redistribute it and/or modify it under the terms of the Lesser or Library GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. This file 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 Library GNU General Public License for more details. You should have received a copy of the Library GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Maintained by John J. Boyer john.boyer@jjb-software.com liblouisutdml-2.7.0/doc/liblouisutdml.texi000066400000000000000000003451361316045371600207620ustar00rootroot00000000000000\input texinfo @c %**start of header @setfilename liblouisutdml.info @include version.texi @settitle Liblouisutdml User's and Programmer's Manual @dircategory Misc @direntry * Liblouisutdml: (liblouisutdml). An xml to Braille Translation Library. @end direntry @finalout @defindex semantic @defindex style @c Macro definitions @c setting. @macro setting{name, args} @tindex \name\ @item \name\ \args\ @end macro @macro settingref{name} @code{\name\} setting (@pxref{\name\ setting,\name\,@code{\name\}}) @end macro @c semantic action. @macro semanticAction{name, args} @semanticindex \name\ @anchor{\name\ semantic} @item \name\ \args\ @end macro @macro semanticref{name} @code{\name\} semantic action (@pxref{\name\ semantic,\name\,@code{\name\}}) @end macro @copying This manual is for liblouisutdml (version @value{VERSION}, @value{UPDATED}), an xml to Braille Translation Library. This file may contain code borrowed from the Linux screenreader @acronym{BRLTTY}, Copyright @copyright{} 1999-2009 by the @acronym{BRLTTY} Team. @noindent Copyright @copyright{} 2004-2009 ViewPlus Technologies, Inc. @uref{www.viewplus.com} and Copyright @copyright{} 2006,2009 Abilitiessoft, Inc. @uref{www.abilitiessoft.org}. @quotation This file is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser (or library) General Public License (LGPL) as published by the Free Software Foundation; either version 3, or (at your option) any later version. This file 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 Lesser (or Library) General Public License LGPL for more details. You should have received a copy of the GNU Lesser (or Library) General Public License (LGPL) along with this program; see the file COPYING. If not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @end quotation @end copying @titlepage @title Liblouisutdml User's and Programmer's Manual @subtitle Release @value{VERSION} @author by John J. Boyer @c The following two commands start the copyright page. @page @vskip 0pt plus 1filll @insertcopying @end titlepage @c Output the table of contents at the beginning. @contents @ifnottex @node Top @top Liblouisutdml User's and Programmer's Manual @insertcopying @end ifnottex @menu * Introduction:: * Transcribing Documents:: * Customization Configuring liblouisutdml:: * Connecting with the xml Document:: * Special Features:: * Special Formats:: * Implementing Braille Mathematics Codes:: * Programming with liblouisutdml:: * Example files:: * Configuration Settings Index:: * Semantic Action Index:: * Style Index:: * Function Index:: * Program Index:: * Concept Index:: @detailmenu --- The Detailed Node Listing --- Transcribing Documents * Transcribing XML files with file2brl:: * Transcribing Text Documents:: * Transcribing Poorly Formatted Documents:: * Transcribing html Documents:: Customization: Configuring liblouisutdml * outputFormat:: * translation:: * xml:: * style:: Connecting with the xml Document - Semantic-Action Files * Semantic Actions Overview:: * Semantic Actions in detail:: * Pseudo-actions:: * Using XPath Expressions:: * Using Macros:: Pseudo-actions * include:: * newentries:: * namespaces:: Special Features * Table of contents:: * Back-translation:: * Reformatting:: * Interlining:: * Browser-Friendly Output:: * CDATA Sections:: * End notes:: End notes * Use of Endnotes:: * Output:: * Configuration:: * Styles:: * Semantic Actions:: * Example:: Special Formats * Tables:: * Reserving Space for Graphics:: * Displayed Text:: * Displayed Mathematics:: * Spatial Layouts in Mathematics:: * Arithmetic Examples:: * Poetry:: * Dividing a Book Into Volumes:: Programming with liblouisutdml * License:: * Overview:: * Files and Paths:: * lbu_version:: * lbu_initialize:: * lbu_translateString:: * lbu_translateFile:: * lbu_translateTextFile:: * lbu_backTranslateFile:: * lbu_free:: @end detailmenu @end menu @node Introduction @chapter Introduction liblouisutdml is a software component which can be incorporated into software packages to provide the capability of translating any file in the computer lingua franca xml format or plain text into properly transcribed braille. This includes translation into grade two, if desired, mathematical codes, etc. It also includes formatting according to a style sheet which can be modified by the user. The first program into which liblouisutdml has been incorporated is @command{file2brl}. This program will translate an xml or text file into an embosser-ready braille file. It is not necessary to know xml, because MSWord and other word processors can export files in this format. If the word processor has been used correctly @command{file2brl} will produce an excellent braille file. Users who want to generate Braille using @command{file2brl} will be interested in @ref{Transcribing XML files with file2brl}. Those who wish to change the output generated by liblouisutdml should read @ref{Customization Configuring liblouisutdml}. If you encounter a type of xml file with which liblouisutdml is not familiar you can learn how to tell it how to process that file by reading @ref{Connecting with the xml Document}. If you wish to implement a new braille mathematics code read @ref{Implementing Braille Mathematics Codes}. Finally, computer programmers who wish to use liblouisutdml in their software can find the information they need in @ref{Programming with liblouisutdml}. You will also find it advantageous to be acquainted with the companion library liblouis, which is a braille translator and back-translator (@pxref{Top, , Overview, liblouis, Liblouis User's and Programmer's Manual}). @node Transcribing Documents @chapter Transcribing Documents @menu * Transcribing XML files with file2brl:: * Transcribing Text Documents:: * Transcribing Poorly Formatted Documents:: * Transcribing html Documents:: @end menu @node Transcribing XML files with file2brl @section Transcribing XML files with file2brl @pindex file2brl At the moment, actual transcription with liblouisutdml is done with the command-line (or console) program @command{file2brl}. The line to type is: @example file2brl [OPTIONS] [-f config-file] [infile] [outfile] @end example The brackets indicate that something is optional. You will see that nothing is required except the program name itself, @command{file2brl}. The various optional parts control how the program will behave, as follows: @table @option @item -h @itemx --help This option causes @command{file2brl} to print a help message describing usage and exit. @item -v @itemx --version This option causes @command{file2brl} to display the version information and exit. @item -f configfile @itemx --config-file configfile This specifies the configuration file which tells @command{file2brl} how to do the transcription. (It may be a list of file names separated by commas.) This file specifies such things as the number of cells per line, the number of lines per page, The translation tables to be used, how paragraphs and headings are to be formatted, etc. If this part of the command line is omitted, @command{file2brl} assumes that the configuration file is named @file{preferences.cfg}. If the configuration file name contains a pathname @command{file2brl} will consider this as a path on which to look for files that it needs (@pxref{Files and Paths}). If no pathname is given the standard paths are searched and finally the current directory. To make @command{file2brl} search the current directory first, precede the file name with @code{./}. @item -b @itemx --backward back-translate. The input file must be a braille file, such as @file{.brf}. The output file is a back-translation of this file. It may be in either plain-text or xhtml (html), according to the setting of @code{backFormat} in the @code{outputFormat} section of the configuration file. Html files will contain page numbers and emphasis. To get good html, the liblouis table must have the entry @samp{space \e 1b} so that it will pass through escape characters. The @file{html.sem} file must also contain the line @samp{pagenum pagenum}. Text output files simply have a blank line between paragraphs. Encoding of text files is controlled by the @code{outputEncoding} setting. Html files are always in UTF-8. @item -r @itemx --reformat Reformat. The input file must be a braille file, such as @file{.brf}. The output is a braille file formatted according to the configuration file. It is advisable to set backFormat to html, since this will preserve print page numbers and emphasis. This option can be useful for changing the line length and page length of a braille file, for example, from 40 to 32 cells. It is also an excellent way to check the accuracy of liblouis tables. The original page numbers at the tops and bottoms of pages are discarded, and new ones are generated. @item -T @item --text Consider the document to be a text file, even if it is xml or html. @item -t @itemx --html The document is an h(t)ml file, not xhtml. This option is useful with files downloaded from the Web in source form. Without it, the program will first try to parse the file as an xml document, producing lots of error messages. It will then try the html parser. With this option, it goes directly to the html parser. See also the @code{formatFor} configuration (@pxref{formatFor setting}) file setting, which enables you to format the braille output for viewing in a browser. @item -p @itemx --poorly-formatted Poorly formatted input translation. Infile is any text file such as may have been obtained by extracting the text in a pdf file. The input file may also be an xml or html file which is so poorly formatted that better braille can be obtained by ignoring the formatting. @command{file2brl} tries to guess paragraph breaks. The output is generally reasonably formatted, that is, with reasonable paragraph breaks. @item -P @itemx --paragraph-line Treat each block of text ending in a newline as a paragraph. If there are two newline characters a blank line will be inserted before the next paragraph. @item -Csetting=value @itemx --config-setting setting=value This option enables you to specify configuration settings on the command line instead of changing the configuration file. You can use as many @option{-C} options as you wish. Any settings can be specified except those having to do with styles. @xref{Configuration Settings Index}, for a list of available settings. These must be specified in configuration files. The settings may be in any order. They override any settings in @file{liblouisutdml.ini} or in the configuration file used by @command{file2brl}. @item -w @itemx --writeable-path This option enables you to specify where the log file and other temporary files will be written. @item -l @itemx --log-file This option will cause @command{file2brl} and liblouisutdml to print error messages to @file{file2brl.log} instead of stderr. The file will be in the current directory. This option is particularly useful if @command{file2brl} is called by a GUI script or Web application. @item infile This is the name of the input file containing the material to be transcribed. The file may be either an xml file or a text file. The @option{-b}, @option{-r} and @option{-p} options discussed above provide for other types of files and processing. Typical xml files are those provided by @uref{www.bookshare.org} or those derived from a word processor by saving in xml format. If a text file is used paragraphs and headings should be separated by blank lines. In such a file there is no way to distinguish between paragraphs and headings, so they will all be formatted as paragraphs, as specified by the configuration file. However, if you want a blank line in the braille transcription use two consecutive blank lines in the text file. @item outfile This is the name of the output file. It will be transcribed as specified by the configuration file and the @option{-C} configuration settings. The following paragraphs provide more information on both the input and output files. @end table @command{file2brl} is set up so that it can be used in a "pipe". To do this, omit both infile and outfile. Input is then taken from the standard input unit. The first file name encountered (a word not preceded by a minus sign) is taken to be the input file and the second to be the output file. If you wish input to be taken from stdin and still want to specify an output file, use one minus sign (@samp{-}) for the input file. If only the program name is typed @command{file2brl} assumes that the configuration file is @file{preferences.cfg}, input is from the standard input unit, and output is to the standard output unit. @node Transcribing Text Documents @section Transcribing Text Documents See the previous section on using @command{file2brl}. This program recognizes text files automatically and transcribes them according to the information in the configuration files. Paragraphs must be separated with a blank line. If you want a blank line in the output use two blank lines. @node Transcribing Poorly Formatted Documents @section Transcribing Poorly Formatted Documents @example file2brl -p infile outfile @end example Some text documents, such as those derived from pdf files, and even some xml and html documents, are so poorly formatted that you can get better braille by ignoring whatever markup they contain. The @option{-p} option of @command{file2brl} does this. It ignores xml or html markup and uses heuristics to find the beginning of paragraphs. Its choices are usually good. Note that it does not work with rtf files. @node Transcribing html Documents @section Transcribing html Documents @example file2brl -t infile outfile @end example The @option{-t} option prevents @command{file2brl} from trying to transcribe infile as an xml document. This will produce a lot of error messages. @command{file2brl} will then try the html parser. Note that xhtml documents are actually xml. @node Customization Configuring liblouisutdml @chapter Customization: Configuring liblouisutdml The operation of liblouisutdml is controlled by two types of files: semantic-action files and configuration files. The former are discussed in the section Connecting with the xml Document - Semantic-action Files (@pxref{Connecting with the xml Document, Connecting with the xml Document - Semantic-Action Files, Connecting with the xml Document - Semantic-Action Files }). The latter are discussed in this section. A third type of file, braille translation tables, is discussed in the liblouis documentation (@pxref{Top, , Overview, liblouis, Liblouis User's and Programmer's Manual}). Another section of the present document which may be of interest is Implementing Braille Mathematical Codes (@pxref{Implementing Braille Mathematics Codes}). Besides files, liblouisutdml can also be controlled by configuration strings, which are character strings in memory containing configuration settings separated by end-of-line characters. Such strings can be generated by the @option{-C} option on the @command{file2brl} command line, by the @code{configstring} and @code{configtweak} semantic actions, or by passing a string to the @code{lbu_initialize} function. The information below applies to @command{file2brl} as much as to liblouisutdml. Before discussing configuration files in detail it is worth noting that the application program has access to the information in the configuration files by calling the liblouisutdml function @code{lbu_initialize}. This function returns a pointer to a data structure containing the configuration information. The calling program must include the header file @code{louisutdml.h}. You do not need to call @code{lbu_initialize} unless you need the facilities which it provides. A configuration file specification may contain more than one file name, separated by commas. liblouisutdml will process these files in sequence, merging the information they contain. The first file name may also contain a path. liblouisutdml will search for the files it needs first on this path. To make it search first the current directory precede the first file name with @code{./}. After the path, if any, has been evaluated, but before reading any of the files, liblouisutdml reads in a file called @file{liblouisutdml.ini}. This file can contain any configuration settings, but it usually contains only the minimum ones for liblouisutdml to operate properly. You may alter the values in the distribution @file{liblouisutdml.ini}, but you should not delete any settings. Do not specify @file{liblouisutdml.ini} as your configuration file. This will lead to error messages and program termination. If a configuration file read in later contains a particular setting name, the value specified simply replaces the one specified in @file{liblouisutdml.ini} or any previously read configuration file. Originally, configuration files contained four main sections, @code{outputFormat}, @code{translation}, @code{xml} and @code{style}. The section names, except for @code{style} are now optional. In addition, a configuration file can contain an include entry. This causes the file named on that line to be read in at the point where the line occurs. The sections need not follow each other in any particular order, nor is the order of settings within each section important. The section names, except for @code{style} are optional. In this document and in the @file{liblouisutdml.ini} file, where section and setting names consist of more than one word, the first letter of each word following the initial one is capitalized. This is merely for readability. The case of the letters in these names is ignored by the program. Section and setting names may not contain spaces. In addition to @file{liblouisutdml.ini} the distribution also contains a number of configuration files. The most important of these is @file{preferences.cfg}, which contains all possible settings and a "default" value for each. You should use this file as a reference. It is the file read by the @command{file2brl} command-line interface program if no configuration file is given. Here, then, is an explanation of each section and setting in the @file{preferences.cfg} file. When you look at this file you will see that the section names start at the left margin, while the settings are indented one tab stop. This is done for readability. it has no effect on the meaning of the lines. You will also see lines beginning with a number sign (@samp{#}), which are comments. Blank lines can also be used anywhere in a configuration file. In general, a section name is a single word or combination of unspaced words. However, each style has a section of its own, so the word @samp{style} is followed by a space then by the name of the style. Setting lines begin with the name of the setting, followed by at least one space or tab, followed by the value of the setting. A few settings have two values. @menu * outputFormat:: * translation:: * xml:: * style:: @end menu @node outputFormat @section outputFormat This section specifies the format of the output file (or string). @table @code @setting{cellsPerLine, 40} The number of cells in a braille line. @setting{linesPerPage, 25} The number of lines on a braille page @setting{interpoint, no} Whether or not the output will be used to produce interpoint braille. This affects the placement of page numbers and may affect other things in the future. The only two values recognized are @samp{yes} and @samp{no}. @setting{lineEnd, \\r\\n} This specifies the control characters to be placed at the end of each output line. These characters vary from one intended use of the output to another. Most embossers require the carriage-return and line-feed combination specified above. However, a braille display may work best with just one or the other. Any valid control characters can be specified. @setting{pageEnd, \\f} The control Character to be given at the end of a page. Here it is a forms-feed character, but it can be something else if deeded. @setting{fileEnd, ^z} The control character to be placed at the end of the file, here a control-z. @setting{printPages, yes} Whether or not to show print page numbers if they are given in the xml input. The two valid values are @samp{yes} and @samp{no}. @setting{braillePages, yes} Whether or not to format the output into pages. Here the value is @samp{yes}, for use with an embosser. However the user of a braille display may wish to specify @samp{no}, so as not to be bothered with page numbers and forms feed characters. If no is specified the lines will still be of the length given in @code{cellsPerLine}, but the value of @code{linesPerPage} will be ignored. @setting{paragraphs, yes} Whether or not to format the output into paragraphs, using appropriate styles. If @samp{no} is specified, what would be a paragraph is output simply as one long line. Applications that wish to do their own formatting may specify @samp{no}. @setting{beginningPageNumber, 1} This is the number to be placed on the first Braille page if @code{braillePages} is yes. This is useful when producing multiple Braille volumes. @setting{printPageNumberAt, top} If print page numbers are given in the xml input file they will be placed at the top of each braille page in the right-hand corner. If @code{pageSeparator} is set to @samp{yes}, a page separator line will also be produced on the Braille page where the print page break actually occurs. You may also specify @samp{bottom} for this setting. @setting{braillePageNumberAt, bottom} The braille page number will be placed in the bottom right-hand corner of each page. If @code{interpoint yes} has been specified only odd pages will receive page numbers. You may also specify @samp{top} for this setting. If print page numbers and Braille page numbers are both placed at the top or bottom, they are rendered next to each other with a space in between. @anchor{continuePages setting} @setting{continuePages, yes} Print page numbers can be prefixed with a letter (a, b, c, etc.) on continued pages. The two valid values are @samp{yes} and @samp{no}. @anchor{pageSeparator setting} @setting{pageSeparator, yes} A page separator line (or page break indicator), a line of unspaced Braille dots 36, will be placed wherever a print page break occurs. No page separator lines are placed on the first or last line of a Braille page, and no page separator lines are shown when the new print page coincides with a new Braille page. @setting{pageSeparatorNumber, yes} Show a page number at the far right margin of a page separator line. No space is left between the separator line and the first symbol of the page number. @setting{ignoreEmptyPages, yes} An empty page occurs when a @code{pagenum} tag is immediately followed by another @code{pagenum} tag. By default, empty pages are completely ignored. If you specify @samp{no} for this setting, a sequence of @code{pagenum} tags will lead to a @emph{combined} print page number: the number of the first empty page is combined with that of the page on which text reappears, e.g. 5-7. If lettered continuation pages are required (see @code{continuePages}), they carry only the number of the page on which text reappears. @anchor{printPageNumberRange setting} @setting{printPageNumberRange, no} By default, only the page number of the @emph{first} print page on a Braille page is shown at the top or bottom. However, if @code{printPageNumberRange} is set to @samp{yes}, the @emph{range} of print pages contained in the current Braille page is displayed. If the first page in this range is a continued print page, it is prefixed with a letter as usual (see @code{continuePages}). @setting{mergeUnnumberedPages, yes} Page breaks without a page number can simply be ignored. This means that unnumbered print pages will be treated as if they were a part of the preceding page. You can also specify @samp{no} for this setting. @setting{pageNumberTopSeparateLine, yes} Whether or not to provide a separate line for page numbers when they are placed at the top of a Braille page. The two valid values are @samp{yes} and @samp{no}. A print page number range (see @code{printPageNumberRange}) at the top of a page is always displayed on a separate line. @setting{pageNumberBottomSeparateLine, yes} Whether or not to provide a separate line for page numbers when they are placed at the bottom of a Braille page. @setting{hyphenate, no} If @samp{yes} is specified words will be hyphenated at the ends of lines if a hyphenation table is available. In contracted English Braille hyphenation is not generally used, but it can save considerable space. The hyphenation table is specified as part of the table list in the @code{literaryTextTable} setting of the translation section. @setting{outputEncoding, ascii8} This specifies that the output is to be in the form of 8-bit ASCII characters. This is generally used if the output is intended directly for a braille embosser or display. The other values of encoding are @samp{UTF8}, @samp{UTF16} and @samp{UTF32}. These are useful if the application will process the output further, such as for generating displays of braille dots on a screen. @setting{inputTextEncoding, ascii8} This setting is used to specify the encoding of an input text file. The valid values are @samp{UTF8} and @samp{ascii8}. @anchor{formatFor setting} @setting{formatFor, textDevice} This setting specifies the type of device the output is intended for. @samp{textDevice} is any device that accepts plain text, including embossers. You can also specify @samp{browser}. In this case the output will be formatted for viewing in a browser. If the input file contains links, they will be preserved and can be used in the normal way. The text will be translated into braille with the correct line length. Math and computer material will be translated appropriately. These files work well in lynx and Internet Explorer, not so well in elinks and Firefox (Before Jaws 10). @setting{backFormat, plain} This setting specifies the format of back-translated files. @samp{Plain} specifies plain-text, while @samp{html} specifies xhtml. The latter is always encoded in UTF-8. Plain-text files can be encoded in ascii8, UTF-8 or UTF-16. Html is strongly recommended, since it will preserve print page numbering and emphasis. @setting{backLineLength, 70} This setting specifies the length of lines in back-translated files, whether in plain-text or html. This is mainly for human readability. Lines may sometimes be somewhat longer. @anchor{lineFill setting} @setting{lineFill, '} This setting defines the fill character that will be used before the page numbers in the table of contents for example. The default fill character is an apostrophe (dot 3). @end table @node translation @section translation This section specifies the liblouis translation tables to be used for various purposes. @table @code @setting{literaryTextTable, en-us-g2.ctb} The table used for producing literary braille. This may be either contracted or uncontracted. @setting{uncontractedTable, en-us-g1.ctb} The table used for producing uncontracted or Grade One braille. This setting appears to be superfluous and may be eliminated in the future. @setting{compbrailleTable, en-us-compbrl.ctb} The table used for producing large amounts of output in computer braille, such as computer programs. The computer braille table is usually combined with one of the two tables above. @setting{mathtextTable, en-us-mathtext.ctb} This table specifies how the non-mathematical parts of math books are to be translated. In many cases it will be the same as literaryTextTable or uncontractedTable. For books translated with the Nemeth Code it is different, because this code requires modification of standard Grade Two. @setting{MathexpTable, nemeth.ctb} This is the table used to translate mathematical expressions. @setting{editTable, nemeth_edit.ctb} When the output includes both mathematics and text there may be errors where one type of translation directly follows another. The editTable removes these errors. @end table @node xml @section xml This section provides various information for the processing of xml files. @table @code @setting{semanticFiles, *\,nemeth.sem} This setting gives a list of semantic-action files. These files are read in the sequence given in the list. Here the first member of the list is an asterisk (@samp{*}). This means that the corresponding file is to be named by taking the root element of the document and appending @samp{.sem}. This asterisk member may occur anywhere in the list. @setting{xmlheader, } This line gives the xml header to be added to strings produced by programs like @command{Mathtype} that lack one. @setting{entity, nbsp ^1} This line defines an entity or substitution in an xml file. It is one of those that has two values. The first is the thing to be replaced, and the second is the replacement. As many entity lines as necessary can be used. The information they contain is added to the information provided by xmlHeader. In @file{liblouisutdml.ini} this line is commented out, because specifying it at this point would prevent the user from specifying his own xmlheader. @setting{internetAccess, yes} The computer has an internet connection and liblouisutdml may obtain information necessary for the processing of this file from the Internet. If this setting is @samp{no} liblouisutdml will not try to use the internet. The necessary information may, however, be provided on the local machine in the form of a "dtd" file. @setting{newEntries, yes} liblouisutdml may create a new semantic-action file (beginning with @file{new_}) for a document with an unknown root element or a file (beginning with @file{appended_}) containing new entries for an existing semantic-action file. Both kinds of files are placed on the current directory. If this setting is @samp{no} liblouisutdml will not create a file of new entries and if it encounters a document with an unknown root element it will issue an error message. Setting newEntries to @samp{no} may be useful if users should not be bothered with the minutiae of semantic-action files. @end table @node style @section style The following sections all deal with styles. Each style has its own section. Style section names are unlike other section names in that they consist of the word style, followed by a space, followed by a style name. With some exceptions, styles are not hard-coded. The user may define any style desired, with any name except @code{document}, @code{para}, @code{heading1}, @code{heading2}, @code{heading3}, @code{heading4}, @code{contentsheader}, @code{contents1}, @code{contents2}, @code{contents3} and @code{contents4}. The first two are needed for basic formatting. The others are needed for the table of contents tool. The user must define settings for these styles as for any others. This is done in @file{liblouisutdml.ini}, which also contains definitions and settings for many other styles. The user can add styles at any time in her/his own configuration files. Styles can be nested. That is, a document may contain a section of one style, and inside this may be a section of another style. For example, you might have styles named frontMatter, titlePage, dedication, contents, and so on. Your document might contain a section of style frontMatter. Inside this section might be subsections of styles titlePage, dedication, contents, and so on. Inside the titlePage section there might be other sections with styles heading1, para, centered, etc. Your frontMatter style might also define the "persistent" style setting @code{braillePageNumberFormat roman}. This setting will apply to all the styles nested within frontMatter, unless they have a setting other than @samp{normal}, which is the default and means ordinary braille page numbers. However, the titlePage style might have the setting @code{braillePageNumberFormat blank}. This will apply to all styles nested within it. When the titlePage section ends, the frontMatter setting @samp{roman} will be restored. The @samp{braiblePageNumberFormat} setting is an example of a "persistent" style setting. Most settings apply only to the style for which they are declared. Below are the settings for the predefined style names. The @samp{document} style contains all possible settings. The others contain only settings that are different from the defaults. @subsection style document @styleindex document This is a predefined style name. All settings have their default values. The user must specify any other values. If a "persistent" style setting is specified, it will apply to the whole ducument. @table @code @setting{linesBefore, 0} This setting gives the number of blank lines which should be left before the text to which this style applies. It is set to a non-zero value for some header styles. @setting{linesAfter, 0} The number of blank lines which should be left after the text to which this style applies. @setting{leftMargin, 0} The number of cells by which the left margin of all lines in the text should be indented. Used for hanging indents, among other things. This is a "persistent" setting, so by default all nested styles will inherit the setting. @setting{rightMargin, 0} The equivalent of @samp{leftMargin} for the right side of the page. This is also a persistent setting. @setting{firstLineIndent, 0} The number of cells by which the first line is to be indented relative to leftMargin. firstLineIndent may be negative. If the result is less than 0 it will be set to 0. This setting is persistent. @setting{translate, contracted} This setting is currently inactive. It may be used in the future. This setting tells how text in this style should be translated. Possible values are @samp{contracted}, @samp{uncontracted}, @samp{compbrl}, @samp{mathtext} and @samp{mathexpr}. @setting{skipNumberLines, no} If this setting is @samp{yes} the top and bottom lines on the page will be skipped if they contain braille or print page numbers. This is useful in some of the mathematical and graphical styles. @setting{format, leftJustified} The format setting controls how the text in the style will be formatted. Valid values are @samp{leftJustified}, @samp{rightJustified}, @samp{centered}, @samp{computerCoded}, @samp{alignColumnsLeft}, @samp{alignColumnsRight}, and @samp{contents}. The first three are self-explanatory. @samp{computerCoded} is used for computer programs and similar material. The next two are used for tabular material. @samp{alignColumnsLeft} causes the left ends of columns to be aligned. @samp{alignColumnsRight} causes the right ends of columns to be aligned. @samp{contents} is used only in styles specifically intended for tables of contents. In the case of @samp{leftJustified}, @samp{rightJustified} and @samp{centered}, nested styles inherit this setting by default. @setting{newPageBefore, no} If this setting is @samp{yes}, the text will begin on a new page. This is useful for certain mathematical and graphical styles. Page numbers are handled properly. @setting{newPageAfter, no} If this setting is @samp{yes} any remaining space on the page after the material covered by this style is handled is left blank, except for page numbers. @setting{rightHandPage, no} if this setting is @samp{yes} and interpoint is yes the material covered by this style will start on a right-hand page. This may cause a left-hand page to be left blank except for page numbers. If interpoint is @samp{no} this setting is equivalent to newPageBefore. @setting{braillePageNumberFormat, normal} This setting specifies the format of braille page numbers. @samp{normal} means ordinary Arabic numbers. @samp{roman} means Roman numbers. @samp{p} means to precede Arabic numbers with the letter "p" (for preliminary). Finally, @samp{blank} causes the page number to be blank (no page numbers). This is a "persistent" style setting. @setting{dontSplit, no} If this setting is @samp{yes}, the element is protected from being split across pages. This means that if a block of text doesn't fit on the current page, it will be placed at the beginning of the next one. This setting applies to the whole element, including children, so if nested styles specify other values for @samp{dontSplit}, these values will be ignored. @setting{keepWithNext, no} If this setting is @samp{yes}, the element covered by this style is protected from being split across pages, and in addition it is kept together with the first line of text of the next sibling. @setting{orphanControl, 0} With this setting you can control how many lines of text of an element must be printed at least at the bottom of a braille page. The default value is @samp{0}. To have an effect, the setting must have a value of @samp{2} or more. @end table @anchor{contentsheader style} @subsection style contentsheader @styleindex contentsheader This style is used to specify where the table of contents should be placed and its title. The xml tag assigned to it in the semantic action file should be placed in the document where you want the table of contents, and it should contain the title of that table between its starting and ending markers. @table @code @setting{linesBefore, 1} @setting{linesAfter, 1} @setting{format, centered} @end table @subsection style contents1 @styleindex contents1 This style and the other contents styles are used for the table of contents and correspond to the ten heading levels (@samp{contents5}, @samp{contents6}, @samp{contents7}, @samp{contents8}, @samp{contents9} and @samp{contents10} are not showed here). @table @code @setting{firstLineIndent, -2} @setting{leftMargin, 2} @setting{format, contents} @end table @subsection style contents2 @styleindex contents2 @table @code @setting{firstLineIndent, -2} @setting{leftMargin, 4} @setting{format, contents} @end table @subsection style contents3 @styleindex contents3 @table @code @setting{firstLineIndent, -2} @setting{leftMargin, 6} @setting{format, contents} @end table @subsection style contents4 @styleindex contents4 @table @code @setting{firstLineIndent, -2} @setting{leftMargin, 8} @setting{format, contents} @end table @subsection style heading1 @styleindex heading1 This style is used for main headings, such as chapter titles. @table @code @setting{linesBefore, 1} @setting{center, yes} @setting{linesAfter, 1} @end table @subsection style heading2 @styleindex heading2 The first level of subheadings after the main heading. @table @code @setting{linesBefore, 1} @setting{firstLineIndent, 4} @end table @subsection style heading3 @styleindex heading3 The third level of headings. @table @code @setting{firstLineIndent, 4} @end table @subsection style heading4 @styleindex heading4 The fourth level of headings. There are six more levels: @samp{heading5}, @samp{heading6}, @samp{heading7}, @samp{heading8}, @samp{heading9} and @samp{heading10}. @table @code @setting{firstLineIndent, 4} @end table @subsection style para @styleindex para Paragraph. This is ordinary body text. @table @code @setting{firstLineIndent, 2} @end table @subsection style boxline @styleindex boxline Typically used to form the top and bottom lines of "boxed" material. The character must be chosen to produce the desired dot pattern on the embosser or display in use. @table @code @setting{topBoxline, .} This should be set to the character you want used for the boxline which appears before the content. @setting{bottomBoxline, .} This should be set to the character you want used for the boxline which appears after the content. @end table @node Connecting with the xml Document @chapter Connecting with the xml Document - Semantic-Action Files @menu * Semantic Actions Overview:: * Semantic Actions in detail:: * Pseudo-actions:: * Using XPath Expressions:: * Using Macros:: @end menu @node Semantic Actions Overview @section Overview When liblouisutdml (or @command{file2brl}) processes an xml document, it needs to be told how to use the information in that document to produce a properly translated and formatted braille document. These instructions are provided by a semantic-action file, so called because it explains the meaning, or semantics, of the various specifications in the xml document. To understand how this works, it is necessary to have a basic knowledge of the organization of an xml document. An xml document is organized like a book, but with much finer detail. First there is the title of the whole book. Then there are various sections, such as author, copyright, table of contents, dedication, acknowledgments, preface, various chapters, bibliography, index, and so on. Each chapter may be divided into sections, and these in turn can be divided into subsections, subsubsections, etc. In a book the parts have names or titles distinguished by capitalization, type fonts, spacing, and so forth. In an xml document the names of the parts are enclosed in angle brackets (@samp{<>}). For example, if liblouisutdml encounters @code{} at the beginning of a document, it knows it is dealing with a document that conforms to the standards of the extensible markup language (xhtml) - at least we hope it does. When you see a book, you know it's a book. The computer can know only by being told. Something enclosed in angle brackets is called an "element" (more properly, a "tag") in xml parlance. (There may be more between the angle brackets than just the name of the element. More of this later). The first "element" in a document thus tells liblouisutdml what kind of document it is dealing with. This element is called the "root element" because the document is visualized as branching out from it like a tree. Some examples of root elements are @code{}, @code{}, @code{}, @code{} and @code{}. Whenever liblouisutdml encounters a root element that it doesn't know about it creates a new file called a semantic-action file. The name of this file is formed by stripping the angle brackets from the root element, putting @samp{new_} in front of it and adding a period plus the letters @samp{sem}. For example, @samp{new_myformat.sem}. If you look in a directory containing semantic-action files you will see names like @file{html.sem}, @file{dtbook.sem}, @file{math.sem}, and so on. The "new" semantic-action files must be edited by a person and the prefix "new" removed to get an ordinary semantic-action file name. Sometimes it is advantageous to preempt the creation of a semantic-action file for a new root element. For example, an article written according to the docbook specification may have the root element @code{
}. However, the specification itself has the root element @code{}. In this case you can specify the @file{book.sem} file in the configuration file by writing, in the xml section,: @example semanticFiles book.sem @end example You will note that this setting uses the plural of "file". This is because you can actually specify a list of file names separated by commas. You might want to do this to specify the semantic-action file for the particular braille mathematical code to be used. For example: @example semanticFiles book.sem,ukmaths.sem @end example You can use an asterisk @code{*} to specify the semantic-action file corresponding to the root element of the document anywhere in the list. As you will see in the next section, different braille style conventions and different braille mathematical codes may require different semantic-action files liblouisutdml records the names of all elements found in the document in the semantic-action file. The document has a multitude of elements, which can be thought of as describing the headings of various parts of the document. One element is used to denote a chapter heading. Another is used to denote a paragraph, Still another to denote text in bold type, and so on. In other words, the elements take the place of the capitalization, changes in type font, spacing, etc. in a book. However, the computer still does not know what to do when it encounters an element. The semantic-action file tells it that. Consider @file{html.sem}. A copy is included as part of this documentation with the name @file{example_html.sem} (@pxref{Example files}). It may differ from the file that liblouisutdml is currently using. You will see that it begins with some lines about copyrights. Each line begins with a number sign (@samp{#}). This indicates that it is a "comment", intended for the human reader and the computer should ignore it. Then there is a blank line. Finally, there are two other comments explaining that the file must be edited to get proper output. This is because a human being must tell the computer what to do with each element. The semantic files for common types of documents have already been edited, so you generally don't have to worry about this. But if you encounter a new type of document or wish to specify special handling for styles or mathematics you may have to edit the semantic-action file or send it to the maintainer for editing. In any case the rest of this section is essential for understanding how liblouisutdml handles documents and for making changes if the way it does so is not correct. After another blank line you will see a table consisting of two, and sometimes three, columns. The first column contains a word which tells the computer to do something. For example, the first entry in the table is: @samp{include nemeth.sem}. This tells liblouisutdml to include the information in the @file{nemeth.sem} file when it is deciphering an html (actually xhtml) document (it may be preferable to use the semanticFiles setting in the configuration file rather than an include). The second row of the table is: @example no hr @end example @samp{hr} is an element with the angle brackets removed. It means nothing in itself. However, the first column contains the word @samp{no}. This tells liblouisutdml "no do", that is, do nothing. This is not strictly true, since liblouisutdml will sometimes insert a blank space so that words in text do not run together. After a few more lines with @samp{no} in the first column, we see one that says: @example softreturn br @end example This means that when the element @code{

} is encountered, liblouisutdml is to do a soft return, that is, start a new line without starting a new paragraph. The next line says: @example heading1 h1 @end example This tells liblouisutdml that when it encounters the element @code{

} it is to format the text which follows as a first-level braille heading, that is, the text will be centered and preceeded and followed by blank lines. (You can change this by changing the definition of the heading1 style). The next line says: @example italicx em @end example This tells liblouisutdml that when it encounters the element @code{} it is to enclose the text which follows in braille italic indicators. The @samp{x} at the end of the semantic action name is there to prevent conflicts with names elsewhere in the software. Just where the italic indicators will be placed is controlled by the liblouis translation table in use. The next line says: @example skip style @end example This tells liblouis to simply skip ahead until it encounters the element @code{}. Nothing in between will have any effect on the braille output. Note the slash (@samp{/}) before the @samp{style}. This means the end of whatever the @code{