[sword-svn] r2998 - in trunk: bindings/java-jni/jni cmake include lib/bcppmake lib/vcppmake src/mgr src/modules/filters utilities/diatheke

chrislit at crosswire.org chrislit at crosswire.org
Mon Dec 30 06:10:36 MST 2013


Author: chrislit
Date: 2013-12-30 06:10:35 -0700 (Mon, 30 Dec 2013)
New Revision: 2998

Added:
   trunk/include/gbflatex.h
   trunk/include/osislatex.h
   trunk/include/thmllatex.h
   trunk/src/modules/filters/gbflatex.cpp
   trunk/src/modules/filters/osislatex.cpp
   trunk/src/modules/filters/thmllatex.cpp
Modified:
   trunk/bindings/java-jni/jni/Android.mk
   trunk/cmake/sources.cmake
   trunk/include/Makefile.am
   trunk/include/defs.h
   trunk/lib/bcppmake/libsword.bpf
   trunk/lib/vcppmake/libsword.vcxproj
   trunk/src/mgr/markupfiltmgr.cpp
   trunk/src/modules/filters/Makefile.am
   trunk/utilities/diatheke/corediatheke.cpp
   trunk/utilities/diatheke/diafiltmgr.cpp
   trunk/utilities/diatheke/diatheke.cpp
Log:
refdoc's patch to add LaTeX output from GBF, ThML, & OSIS

Modified: trunk/bindings/java-jni/jni/Android.mk
===================================================================
--- trunk/bindings/java-jni/jni/Android.mk	2013-12-30 09:35:50 UTC (rev 2997)
+++ trunk/bindings/java-jni/jni/Android.mk	2013-12-30 13:10:35 UTC (rev 2998)
@@ -142,6 +142,9 @@
 ../../../src/modules/filters/teiplain.cpp \
 ../../../src/modules/filters/swbasicfilter.cpp \
 ../../../src/modules/filters/scsuutf8.cpp \
+../../../src/modules/filters/gbflatex.cpp \
+../../../src/modules/filters/thmllatex.cpp \
+../../../src/modules/filters/osislatex.cpp \
 ../../../src/mgr/stringmgr.cpp \
 ../../../src/mgr/swmgr.cpp \
 ../../../src/mgr/swsearchable.cpp \


Property changes on: trunk/bindings/java-jni/jni/Android.mk
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/cmake/sources.cmake
===================================================================
--- trunk/cmake/sources.cmake	2013-12-30 09:35:50 UTC (rev 2997)
+++ trunk/cmake/sources.cmake	2013-12-30 13:10:35 UTC (rev 2998)
@@ -74,6 +74,7 @@
 	src/modules/filters/gbfredletterwords.cpp
 	src/modules/filters/gbfmorph.cpp
 	src/modules/filters/gbfwordjs.cpp
+	src/modules/filters/gbflatex.cpp
 
 	src/modules/filters/thmlstrongs.cpp
 	src/modules/filters/thmlfootnotes.cpp
@@ -89,6 +90,7 @@
 	src/modules/filters/thmlhtmlhref.cpp
 	src/modules/filters/thmlwebif.cpp
 	src/modules/filters/thmlwordjs.cpp
+	src/modules/filters/thmllatex.cpp
 
 	src/modules/filters/teiplain.cpp
 	src/modules/filters/teirtf.cpp
@@ -101,11 +103,11 @@
 	src/modules/filters/thmlplain.cpp
 	src/modules/filters/osisosis.cpp
 
-	src/modules/filters/osisenum.cpp 
-	src/modules/filters/osisglosses.cpp 
-	src/modules/filters/osisxlit.cpp 
+	src/modules/filters/osisenum.cpp
+	src/modules/filters/osisglosses.cpp
+	src/modules/filters/osisxlit.cpp
 	src/modules/filters/osisheadings.cpp
-	src/modules/filters/osisfootnotes.cpp 
+	src/modules/filters/osisfootnotes.cpp
 	src/modules/filters/osishtmlhref.cpp
 	src/modules/filters/osisxhtml.cpp
 	src/modules/filters/osiswebif.cpp
@@ -120,6 +122,7 @@
 	src/modules/filters/osiswordjs.cpp
 	src/modules/filters/osismorphsegmentation.cpp
 	src/modules/filters/osisreferencelinks.cpp
+	src/modules/filters/osislatex.cpp	
 
 	src/modules/filters/latin1utf8.cpp
 	src/modules/filters/latin1utf16.cpp
@@ -270,8 +273,9 @@
 	include/gbfstrongs.h
 	include/gbfwordjs.h
 	include/gbfthml.h
+	include/gbflatex.h
+
 	include/greeklexattribs.h
-
 	include/hebrewmcim.h
 	include/hrefcom.h
 	include/installmgr.h
@@ -297,13 +301,14 @@
 	include/osisrtf.h
 	include/osisosis.h
 	include/osisstrongs.h
-	include/osisfootnotes.h   
-	include/osislemma.h   
-	include/osisredletterwords.h   
-	include/osisscripref.h   
-	include/osiswordjs.h   
-	include/osisvariants.h   
-	include/osisreferencelinks.h   
+	include/osisfootnotes.h
+	include/osislemma.h
+	include/osisredletterwords.h
+	include/osisscripref.h
+	include/osiswordjs.h
+	include/osisvariants.h
+	include/osisreferencelinks.h
+	include/osislatex.h
 
 	include/papyriplain.h
 	include/rawcom.h
@@ -364,6 +369,7 @@
 	include/thmlstrongs.h
 	include/thmlvariants.h
 	include/thmlwordjs.h
+	include/thmllatex.h
 
 	include/teiplain.h
 	include/teirtf.h


Property changes on: trunk/cmake/sources.cmake
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/include/Makefile.am
===================================================================
--- trunk/include/Makefile.am	2013-12-30 09:35:50 UTC (rev 2997)
+++ trunk/include/Makefile.am	2013-12-30 13:10:35 UTC (rev 2998)
@@ -32,8 +32,9 @@
 pkginclude_HEADERS += $(swincludedir)/gbfstrongs.h
 pkginclude_HEADERS += $(swincludedir)/gbfwordjs.h
 pkginclude_HEADERS += $(swincludedir)/gbfthml.h
+pkginclude_HEADERS += $(swincludedir)/gbflatex.h
+
 pkginclude_HEADERS += $(swincludedir)/greeklexattribs.h
-
 pkginclude_HEADERS += $(swincludedir)/hebrewmcim.h
 pkginclude_HEADERS += $(swincludedir)/hrefcom.h
 pkginclude_HEADERS += $(swincludedir)/installmgr.h
@@ -65,6 +66,7 @@
 pkginclude_HEADERS += $(swincludedir)/osiswordjs.h   
 pkginclude_HEADERS += $(swincludedir)/osisvariants.h   
 pkginclude_HEADERS += $(swincludedir)/osisxlit.h   
+pkginclude_HEADERS += $(swincludedir)/osislatex.h
 
 pkginclude_HEADERS += $(swincludedir)/papyriplain.h
 pkginclude_HEADERS += $(swincludedir)/rawcom.h
@@ -130,6 +132,7 @@
 pkginclude_HEADERS += $(swincludedir)/thmlstrongs.h
 pkginclude_HEADERS += $(swincludedir)/thmlvariants.h
 pkginclude_HEADERS += $(swincludedir)/thmlwordjs.h
+pkginclude_HEADERS += $(swincludedir)/thmllatex.h
 
 pkginclude_HEADERS += $(swincludedir)/teiplain.h
 pkginclude_HEADERS += $(swincludedir)/teirtf.h

Modified: trunk/include/defs.h
===================================================================
--- trunk/include/defs.h	2013-12-30 09:35:50 UTC (rev 2997)
+++ trunk/include/defs.h	2013-12-30 13:10:35 UTC (rev 2998)
@@ -155,7 +155,7 @@
 
 
 enum {DIRECTION_LTR = 0, DIRECTION_RTL, DIRECTION_BIDI};
-enum {FMT_UNKNOWN = 0, FMT_PLAIN, FMT_THML, FMT_GBF, FMT_HTML, FMT_HTMLHREF, FMT_RTF, FMT_OSIS, FMT_WEBIF, FMT_TEI, FMT_XHTML};
+enum {FMT_UNKNOWN = 0, FMT_PLAIN, FMT_THML, FMT_GBF, FMT_HTML, FMT_HTMLHREF, FMT_RTF, FMT_OSIS, FMT_WEBIF, FMT_TEI, FMT_XHTML, FMT_LATEX};
 enum {ENC_UNKNOWN = 0, ENC_LATIN1, ENC_UTF8, ENC_SCSU, ENC_UTF16, ENC_RTF, ENC_HTML};
 enum {BIB_BIBTEX = 0, /* possible future formats: BIB_MARCXML, BIB_MARC21, BIB_DCMI BIB_OSISHEADER, BIB_SBL_XHTML, BIB_MLA_XHTML, BIB_APA_XHTML, BIB_CHICAGO_XHTML */};
 

Added: trunk/include/gbflatex.h
===================================================================
--- trunk/include/gbflatex.h	                        (rev 0)
+++ trunk/include/gbflatex.h	2013-12-30 13:10:35 UTC (rev 2998)
@@ -0,0 +1,42 @@
+/***************************************************************************
+ *
+ *  gbflatex.h -	Implementation of GBFLaTeX
+ *
+ * $Id$
+ *
+ * Copyright 2013 CrossWire Bible Society (http://www.crosswire.org)
+ *	CrossWire Bible Society
+ *	P. O. Box 2528
+ *	Tempe, AZ  85280-2528
+ *
+ * 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 version 2.
+ *
+ * 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.
+ *
+ */
+
+#ifndef GBFLATEX_H
+#define GBFLATEX_H
+
+#include <swfilter.h>
+
+SWORD_NAMESPACE_START
+
+/** This filter converts GBF text to LaTeX text
+ */
+class SWDLLEXPORT GBFLaTeX : public SWFilter {
+public:
+	GBFLaTeX();
+	virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0);
+};
+
+SWORD_NAMESPACE_END
+#endif
+
+
+


Property changes on: trunk/include/gbflatex.h
___________________________________________________________________
Added: svn:keywords
   + Author Date Id
Added: svn:eol-style
   + native

Added: trunk/include/osislatex.h
===================================================================
--- trunk/include/osislatex.h	                        (rev 0)
+++ trunk/include/osislatex.h	2013-12-30 13:10:35 UTC (rev 2998)
@@ -0,0 +1,43 @@
+/******************************************************************************
+ *
+ *  osislatex.h -	Implementation of OSISLaTeX
+ *
+ * $Id$
+ *
+ * Copyright 2013 CrossWire Bible Society (http://www.crosswire.org)
+ *	CrossWire Bible Society
+ *	P. O. Box 2528
+ *	Tempe, AZ  85280-2528
+ *
+ * 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 version 2.
+ *
+ * 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.
+ *
+ */
+
+#ifndef OSISLATEX_H
+#define OSISLATEX_H
+
+#include <swbasicfilter.h>
+#include <utilxml.h>
+
+SWORD_NAMESPACE_START
+
+/** this filter converts OSIS text to LaTeX text
+ */
+class SWDLLEXPORT OSISLaTeX : public SWBasicFilter {
+public:
+protected:
+	virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key);
+	virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);
+public:
+	OSISLaTeX();
+};
+
+SWORD_NAMESPACE_END
+#endif


Property changes on: trunk/include/osislatex.h
___________________________________________________________________
Added: svn:keywords
   + Author Date Id
Added: svn:eol-style
   + native

Added: trunk/include/thmllatex.h
===================================================================
--- trunk/include/thmllatex.h	                        (rev 0)
+++ trunk/include/thmllatex.h	2013-12-30 13:10:35 UTC (rev 2998)
@@ -0,0 +1,39 @@
+/******************************************************************************
+ *
+ *  thmllatex.h -	Implementation of ThMLLaTeX
+ *
+ * $Id$
+ *
+ * Copyright 2013 CrossWire Bible Society (http://www.crosswire.org)
+ *	CrossWire Bible Society
+ *	P. O. Box 2528
+ *	Tempe, AZ  85280-2528
+ *
+ * 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 version 2.
+ *
+ * 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.
+ *
+ */
+
+#ifndef THMLLATEX_H
+#define THMLLATEX_H
+
+#include <swfilter.h>
+
+SWORD_NAMESPACE_START
+
+/** this filter converts ThML text to LaTeX text
+ */
+class SWDLLEXPORT ThMLLaTeX : public SWFilter {
+public:
+	ThMLLaTeX();
+	virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0);
+};
+
+SWORD_NAMESPACE_END
+#endif


Property changes on: trunk/include/thmllatex.h
___________________________________________________________________
Added: svn:keywords
   + Author Date Id
Added: svn:eol-style
   + native

Modified: trunk/lib/bcppmake/libsword.bpf
===================================================================
--- trunk/lib/bcppmake/libsword.bpf	2013-12-30 09:35:50 UTC (rev 2997)
+++ trunk/lib/bcppmake/libsword.bpf	2013-12-30 13:10:35 UTC (rev 2998)
@@ -161,6 +161,9 @@
 USEUNIT("..\..\src\modules\filters\osisxlit.cpp");
 USEUNIT("..\..\src\modules\filters\osisreferencelinks.cpp");
 USEUNIT("..\..\src\modules\filters\scsuutf8.cpp");
+USEUNIT("..\..\src\modules\filters\gbflatex.cpp");
+USEUNIT("..\..\src\modules\filters\osislatex.cpp");
+USEUNIT("..\..\src\modules\filters\thmllatex.cpp");
 //---------------------------------------------------------------------------
 #define Library
 

Modified: trunk/lib/vcppmake/libsword.vcxproj
===================================================================
--- trunk/lib/vcppmake/libsword.vcxproj	2013-12-30 09:35:50 UTC (rev 2997)
+++ trunk/lib/vcppmake/libsword.vcxproj	2013-12-30 13:10:35 UTC (rev 2998)
@@ -1,479 +1,485 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-  </ItemGroup>
-  <PropertyGroup Label="Globals">
-    <ProjectGuid>{97449E5E-F880-4D22-933A-0D2FC32034D4}</ProjectGuid>
-    <RootNamespace>libsword</RootNamespace>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseOfMfc>false</UseOfMfc>
-    <CharacterSet>MultiByte</CharacterSet>
-    <PlatformToolset>v110</PlatformToolset>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseOfMfc>false</UseOfMfc>
-    <CharacterSet>MultiByte</CharacterSet>
-    <PlatformToolset>v110</PlatformToolset>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <ImportGroup Label="ExtensionSettings">
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
-  </ImportGroup>
-  <PropertyGroup Label="UserMacros" />
-  <PropertyGroup>
-    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</IntDir>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</IntDir>
-    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
-    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
-    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
-    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
-    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
-    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <LinkIncremental>
-    </LinkIncremental>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <LinkIncremental>true</LinkIncremental>
-  </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <ClCompile>
-      <AdditionalOptions>/D _CRT_SECURE_NO_DEPRECATE %(AdditionalOptions)</AdditionalOptions>
-      <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>../../include;../../include/internal/regex;../../../icu-sword/include;../../src/utilfuns/win32;../../../curl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>_DEBUG;_ICU_;_ICUSWORD_;WIN32;_LIB;REGEX_MALLOC;SWMAKINGDLL;CURLAVAILABLE;CURL_STATICLIB;USBINARY;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <PrecompiledHeaderOutputFile>.\Debug/libsword.pch</PrecompiledHeaderOutputFile>
-      <AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
-      <ObjectFileName>.\Debug/</ObjectFileName>
-      <ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
-      <CompileAs>Default</CompileAs>
-      <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
-      <MultiProcessorCompilation>true</MultiProcessorCompilation>
-      <WarningLevel>Level1</WarningLevel>
-    </ClCompile>
-    <ResourceCompile>
-      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <Culture>0x0409</Culture>
-    </ResourceCompile>
-    <Link>
-      <AdditionalDependencies>libcurl_a_debug.lib;ws2_32.lib;winmm.lib;wldap32.lib;icuuc.lib;icuin.lib;icudt.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>../../../curl/builds/libcurl-vc10-x86-debug-static-ipv6-sspi-spnego-winssl/lib;../../../icu-sword/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
-      <DataExecutionPrevention>
-      </DataExecutionPrevention>
-      <ImageHasSafeExceptionHandlers>
-      </ImageHasSafeExceptionHandlers>
-      <EnableCOMDATFolding>false</EnableCOMDATFolding>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <ClCompile>
-      <Optimization>Full</Optimization>
-      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
-      <AdditionalIncludeDirectories>../../include;../../include/internal/regex;../../../icu-sword/include;../../src/utilfuns/win32;../../../curl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>NDEBUG;_ICU_;_ICUSWORD_;WIN32;_LIB;REGEX_MALLOC;SWMAKINGDLL;CURLAVAILABLE;CURL_STATICLIB;USBINARY;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <StringPooling>
-      </StringPooling>
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <PrecompiledHeaderOutputFile>.\Release/libsword.pch</PrecompiledHeaderOutputFile>
-      <AssemblerListingLocation>.\Release/</AssemblerListingLocation>
-      <ObjectFileName>.\Release/</ObjectFileName>
-      <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
-      <SuppressStartupBanner>true</SuppressStartupBanner>
-      <CompileAs>Default</CompileAs>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
-      <MultiProcessorCompilation>true</MultiProcessorCompilation>
-      <WarningLevel>Level1</WarningLevel>
-    </ClCompile>
-    <ResourceCompile>
-      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <Culture>0x0409</Culture>
-    </ResourceCompile>
-    <Link>
-      <AdditionalDependencies>libcurl_a.lib;ws2_32.lib;winmm.lib;wldap32.lib;icuuc.lib;icuin.lib;icudt.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>../../../curl/builds/libcurl-vc10-x86-release-static-ipv6-sspi-spnego-winssl/lib;../../../icu-sword/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
-      <DataExecutionPrevention>
-      </DataExecutionPrevention>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemGroup>
-    <ClCompile Include="..\..\src\mgr\remotetrans.cpp" />
-    <ClCompile Include="..\..\src\mgr\versificationmgr.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\cipherfil.cpp" />
-    <ClCompile Include="..\..\src\mgr\curlftpt.cpp" />
-    <ClCompile Include="..\..\src\mgr\curlhttpt.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\osisenum.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\osisglosses.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\osisxlit.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\osisreferencelinks.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\scsuutf8.cpp" />
-    <ClCompile Include="..\..\src\utilfuns\win32\dirent.cpp" />
-    <ClCompile Include="..\..\src\mgr\encfiltmgr.cpp" />
-    <ClCompile Include="..\..\src\modules\common\entriesblk.cpp" />
-    <ClCompile Include="..\..\src\mgr\filemgr.cpp" />
-    <ClCompile Include="..\..\src\utilfuns\ftpparse.c" />
-    <ClCompile Include="..\..\src\modules\filters\gbffootnotes.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\gbfheadings.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\gbfhtml.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\gbfhtmlhref.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\gbfmorph.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\gbfosis.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\gbfplain.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\gbfredletterwords.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\gbfrtf.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\gbfstrongs.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\gbfthml.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\gbfwebif.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\gbfwordjs.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\gbfxhtml.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\greeklexattribs.cpp" />
-    <ClCompile Include="..\..\src\modules\comments\hrefcom\hrefcom.cpp" />
-    <ClCompile Include="..\..\src\mgr\installmgr.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\latin1utf16.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\latin1utf8.cpp" />
-    <ClCompile Include="..\..\src\keys\listkey.cpp" />
-    <ClCompile Include="..\..\src\mgr\localemgr.cpp" />
-    <ClCompile Include="..\..\src\modules\common\lzsscomprs.cpp" />
-    <ClCompile Include="..\..\src\mgr\markupfiltmgr.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\osisfootnotes.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\osisheadings.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\osishtmlhref.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\osislemma.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\osismorph.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\osismorphsegmentation.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\osisosis.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\osisplain.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\osisredletterwords.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\osisrtf.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\osisscripref.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\osisstrongs.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\osisvariants.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\osiswebif.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\osiswordjs.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\osisxhtml.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\papyriplain.cpp" />
-    <ClCompile Include="..\..\src\modules\comments\rawcom\rawcom.cpp" />
-    <ClCompile Include="..\..\src\modules\comments\rawcom4\rawcom4.cpp" />
-    <ClCompile Include="..\..\src\modules\comments\rawfiles\rawfiles.cpp" />
-    <ClCompile Include="..\..\src\modules\genbook\rawgenbook\rawgenbook.cpp" />
-    <ClCompile Include="..\..\src\modules\lexdict\rawld\rawld.cpp" />
-    <ClCompile Include="..\..\src\modules\lexdict\rawld4\rawld4.cpp" />
-    <ClCompile Include="..\..\src\modules\common\rawstr.cpp" />
-    <ClCompile Include="..\..\src\modules\common\rawstr4.cpp" />
-    <ClCompile Include="..\..\src\modules\texts\rawtext\rawtext.cpp" />
-    <ClCompile Include="..\..\src\modules\texts\rawtext4\rawtext4.cpp" />
-    <ClCompile Include="..\..\src\modules\common\rawverse.cpp" />
-    <ClCompile Include="..\..\src\modules\common\rawverse4.cpp" />
-    <ClCompile Include="..\..\src\utilfuns\regex.c" />
-    <ClCompile Include="..\..\src\utilfuns\roman.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\rtfhtml.cpp" />
-    <ClCompile Include="..\..\src\modules\common\sapphire.cpp" />
-    <ClCompile Include="..\..\src\mgr\stringmgr.cpp" />
-    <ClCompile Include="..\..\src\keys\strkey.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\swbasicfilter.cpp" />
-    <ClCompile Include="..\..\src\utilfuns\swbuf.cpp" />
-    <ClCompile Include="..\..\src\mgr\swcacher.cpp" />
-    <ClCompile Include="..\..\src\modules\common\swcipher.cpp" />
-    <ClCompile Include="..\..\src\modules\comments\swcom.cpp" />
-    <ClCompile Include="..\..\src\modules\common\swcomprs.cpp" />
-    <ClCompile Include="..\..\src\mgr\swconfig.cpp" />
-    <ClCompile Include="..\..\src\frontend\swdisp.cpp" />
-    <ClCompile Include="..\..\src\mgr\swfiltermgr.cpp" />
-    <ClCompile Include="..\..\src\modules\genbook\swgenbook.cpp" />
-    <ClCompile Include="..\..\src\keys\swkey.cpp" />
-    <ClCompile Include="..\..\src\modules\lexdict\swld.cpp" />
-    <ClCompile Include="..\..\src\mgr\swlocale.cpp" />
-    <ClCompile Include="..\..\src\frontend\swlog.cpp" />
-    <ClCompile Include="..\..\src\mgr\swmgr.cpp" />
-    <ClCompile Include="..\..\src\modules\swmodule.cpp" />
-    <ClCompile Include="..\..\src\utilfuns\swobject.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\swoptfilter.cpp" />
-    <ClCompile Include="..\..\src\mgr\swsearchable.cpp" />
-    <ClCompile Include="..\..\src\modules\texts\swtext.cpp" />
-    <ClCompile Include="..\..\src\utilfuns\swversion.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\teixhtml.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\teihtmlhref.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\teiplain.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\teirtf.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\thmlfootnotes.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\thmlgbf.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\thmlheadings.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\thmlhtml.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\thmlhtmlhref.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\thmllemma.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\thmlmorph.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\thmlosis.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\thmlplain.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\thmlrtf.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\thmlscripref.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\thmlstrongs.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\thmlvariants.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\thmlwebif.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\thmlwordjs.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\thmlxhtml.cpp" />
-    <ClCompile Include="..\..\src\keys\treekey.cpp" />
-    <ClCompile Include="..\..\src\keys\treekeyidx.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\unicodertf.cpp" />
-    <ClCompile Include="..\..\src\utilfuns\zlib\adler32.c" />
-    <ClCompile Include="..\..\src\utilfuns\zlib\compress.c" />
-    <ClCompile Include="..\..\src\utilfuns\zlib\crc32.c" />
-    <ClCompile Include="..\..\src\utilfuns\zlib\deflate.c" />
-    <ClCompile Include="..\..\src\utilfuns\zlib\gzclose.c" />
-    <ClCompile Include="..\..\src\utilfuns\zlib\gzlib.c" />
-    <ClCompile Include="..\..\src\utilfuns\zlib\gzread.c" />
-    <ClCompile Include="..\..\src\utilfuns\zlib\gzwrite.c" />
-    <ClCompile Include="..\..\src\utilfuns\zlib\infback.c" />
-    <ClCompile Include="..\..\src\utilfuns\zlib\inffast.c" />
-    <ClCompile Include="..\..\src\utilfuns\zlib\inflate.c" />
-    <ClCompile Include="..\..\src\utilfuns\zlib\inftrees.c" />
-    <ClCompile Include="..\..\src\utilfuns\zlib\trees.c" />
-    <ClCompile Include="..\..\src\utilfuns\zlib\uncompr.c" />
-    <ClCompile Include="..\..\src\utilfuns\zlib\untgz.c" />
-    <ClCompile Include="..\..\src\utilfuns\url.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\utf16utf8.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\utf8arabicpoints.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\utf8arshaping.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\utf8bidireorder.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\utf8cantillation.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\utf8greekaccents.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\utf8hebrewpoints.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\utf8html.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\utf8latin1.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\utf8nfc.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\utf8nfkd.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\utf8transliterator.cpp" />
-    <ClCompile Include="..\..\src\modules\filters\utf8utf16.cpp" />
-    <ClCompile Include="..\..\src\utilfuns\utilstr.cpp" />
-    <ClCompile Include="..\..\src\utilfuns\utilxml.cpp" />
-    <ClCompile Include="..\..\src\keys\versekey.cpp" />
-    <ClCompile Include="..\..\src\keys\versetreekey.cpp" />
-    <ClCompile Include="..\..\src\modules\comments\zcom\zcom.cpp" />
-    <ClCompile Include="..\..\src\modules\common\zipcomprs.cpp" />
-    <ClCompile Include="..\..\src\modules\common\bz2comprs.cpp" />
-    <ClCompile Include="..\..\src\modules\common\xzcomprs.cpp" />
-    <ClCompile Include="..\..\src\modules\lexdict\zld\zld.cpp" />
-    <ClCompile Include="..\..\src\modules\common\zstr.cpp" />
-    <ClCompile Include="..\..\src\modules\texts\ztext\ztext.cpp" />
-    <ClCompile Include="..\..\src\modules\common\zverse.cpp" />
-    <ClCompile Include="..\..\src\utilfuns\zlib\zutil.c" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClInclude Include="..\..\include\canon.h" />
-    <ClInclude Include="..\..\include\canon_abbrevs.h" />
-    <ClInclude Include="..\..\include\canon_catholic.h" />
-    <ClInclude Include="..\..\include\canon_catholic2.h" />
-    <ClInclude Include="..\..\include\canon_german.h" />
-    <ClInclude Include="..\..\include\canon_kjva.h" />
-    <ClInclude Include="..\..\include\canon_leningrad.h" />
-    <ClInclude Include="..\..\include\canon_luther.h" />
-    <ClInclude Include="..\..\include\canon_lxx.h" />
-    <ClInclude Include="..\..\include\canon_mt.h" />
-    <ClInclude Include="..\..\include\canon_nrsv.h" />
-    <ClInclude Include="..\..\include\canon_nrsva.h" />
-    <ClInclude Include="..\..\include\canon_null.h" />
-    <ClInclude Include="..\..\include\canon_orthodox.h" />
-    <ClInclude Include="..\..\include\canon_synodal.h" />
-    <ClInclude Include="..\..\include\canon_synodalprot.h" />
-    <ClInclude Include="..\..\include\canon_vulg.h" />
-    <ClInclude Include="..\..\include\cipherfil.h" />
-    <ClInclude Include="..\..\include\curlftpt.h" />
-    <ClInclude Include="..\..\include\curlhttpt.h" />
-    <ClInclude Include="..\..\include\defs.h" />
-    <ClInclude Include="..\..\include\encfiltmgr.h" />
-    <ClInclude Include="..\..\include\entriesblk.h" />
-    <ClInclude Include="..\..\include\filemgr.h" />
-    <ClInclude Include="..\..\include\flatapi.h" />
-    <ClInclude Include="..\..\include\ftplib.h" />
-    <ClInclude Include="..\..\include\ftplibftpt.h" />
-    <ClInclude Include="..\..\include\ftpparse.h" />
-    <ClInclude Include="..\..\include\gbffootnotes.h" />
-    <ClInclude Include="..\..\include\gbfheadings.h" />
-    <ClInclude Include="..\..\include\gbfhtml.h" />
-    <ClInclude Include="..\..\include\gbfhtmlhref.h" />
-    <ClInclude Include="..\..\include\gbfmorph.h" />
-    <ClInclude Include="..\..\include\gbfosis.h" />
-    <ClInclude Include="..\..\include\gbfplain.h" />
-    <ClInclude Include="..\..\include\gbfredletterwords.h" />
-    <ClInclude Include="..\..\include\gbfrtf.h" />
-    <ClInclude Include="..\..\include\gbfstrongs.h" />
-    <ClInclude Include="..\..\include\gbfthml.h" />
-    <ClInclude Include="..\..\include\gbfwebif.h" />
-    <ClInclude Include="..\..\include\gbfwordjs.h" />
-    <ClInclude Include="..\..\include\gbfxhtml.h" />
-    <ClInclude Include="..\..\include\greeklexattribs.h" />
-    <ClInclude Include="..\..\include\hrefcom.h" />
-    <ClInclude Include="..\..\include\installmgr.h" />
-    <ClInclude Include="..\..\include\latin1utf16.h" />
-    <ClInclude Include="..\..\include\latin1utf8.h" />
-    <ClInclude Include="..\..\include\listkey.h" />
-    <ClInclude Include="..\..\include\localemgr.h" />
-    <ClInclude Include="..\..\include\lzsscomprs.h" />
-    <ClInclude Include="..\..\include\markupfiltmgr.h" />
-    <ClInclude Include="..\..\include\multimapwdef.h" />
-    <ClInclude Include="..\..\include\osisenum.h" />
-    <ClInclude Include="..\..\include\osisfootnotes.h" />
-    <ClInclude Include="..\..\include\osisglosses.h" />
-    <ClInclude Include="..\..\include\osisheadings.h" />
-    <ClInclude Include="..\..\include\osishtmlhref.h" />
-    <ClInclude Include="..\..\include\osislemma.h" />
-    <ClInclude Include="..\..\include\osismorph.h" />
-    <ClInclude Include="..\..\include\osismorphsegmentation.h" />
-    <ClInclude Include="..\..\include\osisosis.h" />
-    <ClInclude Include="..\..\include\osisplain.h" />
-    <ClInclude Include="..\..\include\osisredletterwords.h" />
-    <ClInclude Include="..\..\include\osisrtf.h" />
-    <ClInclude Include="..\..\include\osisscripref.h" />
-    <ClInclude Include="..\..\include\osisstrongs.h" />
-    <ClInclude Include="..\..\include\osisvariants.h" />
-    <ClInclude Include="..\..\include\osiswebif.h" />
-    <ClInclude Include="..\..\include\osiswordjs.h" />
-    <ClInclude Include="..\..\include\osisxhtml.h" />
-    <ClInclude Include="..\..\include\osisxlit.h" />
-    <ClInclude Include="..\..\include\osisreferencelinks.h" />
-    <ClInclude Include="..\..\include\papyriplain.h" />
-    <ClInclude Include="..\..\include\rawcom.h" />
-    <ClInclude Include="..\..\include\rawcom4.h" />
-    <ClInclude Include="..\..\include\rawfiles.h" />
-    <ClInclude Include="..\..\include\rawgenbook.h" />
-    <ClInclude Include="..\..\include\rawld.h" />
-    <ClInclude Include="..\..\include\rawld4.h" />
-    <ClInclude Include="..\..\include\rawstr.h" />
-    <ClInclude Include="..\..\include\rawstr4.h" />
-    <ClInclude Include="..\..\include\rawtext.h" />
-    <ClInclude Include="..\..\include\rawtext4.h" />
-    <ClInclude Include="..\..\include\rawverse.h" />
-    <ClInclude Include="..\..\include\rawverse4.h" />
-    <ClInclude Include="..\..\include\remotetrans.h" />
-    <ClInclude Include="..\..\include\roman.h" />
-    <ClInclude Include="..\..\include\rtfhtml.h" />
-    <ClInclude Include="..\..\include\sapphire.h" />
-    <ClInclude Include="..\..\include\scsuutf8.h" />
-    <ClInclude Include="..\..\include\stringmgr.h" />
-    <ClInclude Include="..\..\include\strkey.h" />
-    <ClInclude Include="..\..\include\swbasicfilter.h" />
-    <ClInclude Include="..\..\include\swbuf.h" />
-    <ClInclude Include="..\..\include\swcacher.h" />
-    <ClInclude Include="..\..\include\swcipher.h" />
-    <ClInclude Include="..\..\include\swcom.h" />
-    <ClInclude Include="..\..\include\swcomprs.h" />
-    <ClInclude Include="..\..\include\swconfig.h" />
-    <ClInclude Include="..\..\include\swdisp.h" />
-    <ClInclude Include="..\..\include\swfilter.h" />
-    <ClInclude Include="..\..\include\swfiltermgr.h" />
-    <ClInclude Include="..\..\include\swgenbook.h" />
-    <ClInclude Include="..\..\include\swkey.h" />
-    <ClInclude Include="..\..\include\swld.h" />
-    <ClInclude Include="..\..\include\swlocale.h" />
-    <ClInclude Include="..\..\include\swlog.h" />
-    <ClInclude Include="..\..\include\swmacs.h" />
-    <ClInclude Include="..\..\include\swmgr.h" />
-    <ClInclude Include="..\..\include\swmodule.h" />
-    <ClInclude Include="..\..\include\swobject.h" />
-    <ClInclude Include="..\..\include\swoptfilter.h" />
-    <ClInclude Include="..\..\include\swsearchable.h" />
-    <ClInclude Include="..\..\include\swtext.h" />
-    <ClInclude Include="..\..\include\swversion.h" />
-    <ClInclude Include="..\..\include\sysdata.h" />
-    <ClInclude Include="..\..\include\teixhtml.h" />
-    <ClInclude Include="..\..\include\teihtmlhref.h" />
-    <ClInclude Include="..\..\include\teiplain.h" />
-    <ClInclude Include="..\..\include\teirtf.h" />
-    <ClInclude Include="..\..\include\thmlfootnotes.h" />
-    <ClInclude Include="..\..\include\thmlgbf.h" />
-    <ClInclude Include="..\..\include\thmlheadings.h" />
-    <ClInclude Include="..\..\include\thmlhtml.h" />
-    <ClInclude Include="..\..\include\thmlhtmlhref.h" />
-    <ClInclude Include="..\..\include\thmllemma.h" />
-    <ClInclude Include="..\..\include\thmlmorph.h" />
-    <ClInclude Include="..\..\include\thmlosis.h" />
-    <ClInclude Include="..\..\include\thmlplain.h" />
-    <ClInclude Include="..\..\include\thmlrtf.h" />
-    <ClInclude Include="..\..\include\thmlscripref.h" />
-    <ClInclude Include="..\..\include\thmlstrongs.h" />
-    <ClInclude Include="..\..\include\thmlvariants.h" />
-    <ClInclude Include="..\..\include\thmlwebif.h" />
-    <ClInclude Include="..\..\include\thmlwordjs.h" />
-    <ClInclude Include="..\..\include\thmlxhtml.h" />
-    <ClInclude Include="..\..\include\treekey.h" />
-    <ClInclude Include="..\..\include\treekeyidx.h" />
-    <ClInclude Include="..\..\include\unicodertf.h" />
-    <ClInclude Include="..\..\include\untgz.h" />
-    <ClInclude Include="..\..\include\url.h" />
-    <ClInclude Include="..\..\include\utf16utf8.h" />
-    <ClInclude Include="..\..\include\utf8arabicpoints.h" />
-    <ClInclude Include="..\..\include\utf8arshaping.h" />
-    <ClInclude Include="..\..\include\utf8bidireorder.h" />
-    <ClInclude Include="..\..\include\utf8cantillation.h" />
-    <ClInclude Include="..\..\include\utf8greekaccents.h" />
-    <ClInclude Include="..\..\include\utf8hebrewpoints.h" />
-    <ClInclude Include="..\..\include\utf8html.h" />
-    <ClInclude Include="..\..\include\utf8latin1.h" />
-    <ClInclude Include="..\..\include\utf8nfc.h" />
-    <ClInclude Include="..\..\include\utf8nfkd.h" />
-    <ClInclude Include="..\..\include\utf8transliterator.h" />
-    <ClInclude Include="..\..\include\utf8utf16.h" />
-    <ClInclude Include="..\..\include\utilstr.h" />
-    <ClInclude Include="..\..\include\utilxml.h" />
-    <ClInclude Include="..\..\include\versekey.h" />
-    <ClInclude Include="..\..\include\versetreekey.h" />
-    <ClInclude Include="..\..\include\versificationmgr.h" />
-    <ClInclude Include="..\..\include\zcom.h" />
-    <ClInclude Include="..\..\include\zconf.h" />
-    <ClInclude Include="..\..\include\zipcomprs.h" />
-    <ClInclude Include="..\..\include\bz2comprs.h" />
-    <ClInclude Include="..\..\include\xzcomprs.h" />
-    <ClInclude Include="..\..\include\zld.h" />
-    <ClInclude Include="..\..\include\zlib.h" />
-    <ClInclude Include="..\..\include\zstr.h" />
-    <ClInclude Include="..\..\include\ztext.h" />
-    <ClInclude Include="..\..\include\zverse.h" />
-    <ClInclude Include="..\..\src\utilfuns\zlib\crc32.h" />
-    <ClInclude Include="..\..\src\utilfuns\zlib\deflate.h" />
-    <ClInclude Include="..\..\src\utilfuns\zlib\gzguts.h" />
-    <ClInclude Include="..\..\src\utilfuns\zlib\inffast.h" />
-    <ClInclude Include="..\..\src\utilfuns\zlib\inffixed.h" />
-    <ClInclude Include="..\..\src\utilfuns\zlib\inflate.h" />
-    <ClInclude Include="..\..\src\utilfuns\zlib\inftrees.h" />
-    <ClInclude Include="..\..\src\utilfuns\zlib\trees.h" />
-    <ClInclude Include="..\..\src\utilfuns\zlib\zconf.h" />
-    <ClInclude Include="..\..\src\utilfuns\zlib\zlib.h" />
-    <ClInclude Include="..\..\src\utilfuns\zlib\zutil.h" />
-  </ItemGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{97449E5E-F880-4D22-933A-0D2FC32034D4}</ProjectGuid>
+    <RootNamespace>libsword</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v110</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v110</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</IntDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</IntDir>
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LinkIncremental>
+    </LinkIncremental>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <LinkIncremental>true</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <AdditionalOptions>/D _CRT_SECURE_NO_DEPRECATE %(AdditionalOptions)</AdditionalOptions>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>../../include;../../include/internal/regex;../../../icu-sword/include;../../src/utilfuns/win32;../../../curl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_DEBUG;_ICU_;_ICUSWORD_;WIN32;_LIB;REGEX_MALLOC;SWMAKINGDLL;CURLAVAILABLE;CURL_STATICLIB;USBINARY;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <PrecompiledHeaderOutputFile>.\Debug/libsword.pch</PrecompiledHeaderOutputFile>
+      <AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
+      <ObjectFileName>.\Debug/</ObjectFileName>
+      <ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+      <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <WarningLevel>Level1</WarningLevel>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0409</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalDependencies>libcurl_a_debug.lib;ws2_32.lib;winmm.lib;wldap32.lib;icuuc.lib;icuin.lib;icudt.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>../../../curl/builds/libcurl-vc10-x86-debug-static-ipv6-sspi-spnego-winssl/lib;../../../icu-sword/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImageHasSafeExceptionHandlers>
+      </ImageHasSafeExceptionHandlers>
+      <EnableCOMDATFolding>false</EnableCOMDATFolding>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <AdditionalIncludeDirectories>../../include;../../include/internal/regex;../../../icu-sword/include;../../src/utilfuns/win32;../../../curl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>NDEBUG;_ICU_;_ICUSWORD_;WIN32;_LIB;REGEX_MALLOC;SWMAKINGDLL;CURLAVAILABLE;CURL_STATICLIB;USBINARY;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>
+      </StringPooling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <PrecompiledHeaderOutputFile>.\Release/libsword.pch</PrecompiledHeaderOutputFile>
+      <AssemblerListingLocation>.\Release/</AssemblerListingLocation>
+      <ObjectFileName>.\Release/</ObjectFileName>
+      <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <CompileAs>Default</CompileAs>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <WarningLevel>Level1</WarningLevel>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0409</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalDependencies>libcurl_a.lib;ws2_32.lib;winmm.lib;wldap32.lib;icuuc.lib;icuin.lib;icudt.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>../../../curl/builds/libcurl-vc10-x86-release-static-ipv6-sspi-spnego-winssl/lib;../../../icu-sword/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\mgr\remotetrans.cpp" />
+    <ClCompile Include="..\..\src\mgr\versificationmgr.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\cipherfil.cpp" />
+    <ClCompile Include="..\..\src\mgr\curlftpt.cpp" />
+    <ClCompile Include="..\..\src\mgr\curlhttpt.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\gbflatex.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\osisenum.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\osisglosses.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\osislatex.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\osisxlit.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\osisreferencelinks.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\scsuutf8.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\thmllatex.cpp" />
+    <ClCompile Include="..\..\src\utilfuns\win32\dirent.cpp" />
+    <ClCompile Include="..\..\src\mgr\encfiltmgr.cpp" />
+    <ClCompile Include="..\..\src\modules\common\entriesblk.cpp" />
+    <ClCompile Include="..\..\src\mgr\filemgr.cpp" />
+    <ClCompile Include="..\..\src\utilfuns\ftpparse.c" />
+    <ClCompile Include="..\..\src\modules\filters\gbffootnotes.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\gbfheadings.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\gbfhtml.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\gbfhtmlhref.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\gbfmorph.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\gbfosis.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\gbfplain.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\gbfredletterwords.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\gbfrtf.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\gbfstrongs.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\gbfthml.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\gbfwebif.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\gbfwordjs.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\gbfxhtml.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\greeklexattribs.cpp" />
+    <ClCompile Include="..\..\src\modules\comments\hrefcom\hrefcom.cpp" />
+    <ClCompile Include="..\..\src\mgr\installmgr.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\latin1utf16.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\latin1utf8.cpp" />
+    <ClCompile Include="..\..\src\keys\listkey.cpp" />
+    <ClCompile Include="..\..\src\mgr\localemgr.cpp" />
+    <ClCompile Include="..\..\src\modules\common\lzsscomprs.cpp" />
+    <ClCompile Include="..\..\src\mgr\markupfiltmgr.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\osisfootnotes.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\osisheadings.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\osishtmlhref.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\osislemma.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\osismorph.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\osismorphsegmentation.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\osisosis.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\osisplain.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\osisredletterwords.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\osisrtf.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\osisscripref.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\osisstrongs.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\osisvariants.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\osiswebif.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\osiswordjs.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\osisxhtml.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\papyriplain.cpp" />
+    <ClCompile Include="..\..\src\modules\comments\rawcom\rawcom.cpp" />
+    <ClCompile Include="..\..\src\modules\comments\rawcom4\rawcom4.cpp" />
+    <ClCompile Include="..\..\src\modules\comments\rawfiles\rawfiles.cpp" />
+    <ClCompile Include="..\..\src\modules\genbook\rawgenbook\rawgenbook.cpp" />
+    <ClCompile Include="..\..\src\modules\lexdict\rawld\rawld.cpp" />
+    <ClCompile Include="..\..\src\modules\lexdict\rawld4\rawld4.cpp" />
+    <ClCompile Include="..\..\src\modules\common\rawstr.cpp" />
+    <ClCompile Include="..\..\src\modules\common\rawstr4.cpp" />
+    <ClCompile Include="..\..\src\modules\texts\rawtext\rawtext.cpp" />
+    <ClCompile Include="..\..\src\modules\texts\rawtext4\rawtext4.cpp" />
+    <ClCompile Include="..\..\src\modules\common\rawverse.cpp" />
+    <ClCompile Include="..\..\src\modules\common\rawverse4.cpp" />
+    <ClCompile Include="..\..\src\utilfuns\regex.c" />
+    <ClCompile Include="..\..\src\utilfuns\roman.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\rtfhtml.cpp" />
+    <ClCompile Include="..\..\src\modules\common\sapphire.cpp" />
+    <ClCompile Include="..\..\src\mgr\stringmgr.cpp" />
+    <ClCompile Include="..\..\src\keys\strkey.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\swbasicfilter.cpp" />
+    <ClCompile Include="..\..\src\utilfuns\swbuf.cpp" />
+    <ClCompile Include="..\..\src\mgr\swcacher.cpp" />
+    <ClCompile Include="..\..\src\modules\common\swcipher.cpp" />
+    <ClCompile Include="..\..\src\modules\comments\swcom.cpp" />
+    <ClCompile Include="..\..\src\modules\common\swcomprs.cpp" />
+    <ClCompile Include="..\..\src\mgr\swconfig.cpp" />
+    <ClCompile Include="..\..\src\frontend\swdisp.cpp" />
+    <ClCompile Include="..\..\src\mgr\swfiltermgr.cpp" />
+    <ClCompile Include="..\..\src\modules\genbook\swgenbook.cpp" />
+    <ClCompile Include="..\..\src\keys\swkey.cpp" />
+    <ClCompile Include="..\..\src\modules\lexdict\swld.cpp" />
+    <ClCompile Include="..\..\src\mgr\swlocale.cpp" />
+    <ClCompile Include="..\..\src\frontend\swlog.cpp" />
+    <ClCompile Include="..\..\src\mgr\swmgr.cpp" />
+    <ClCompile Include="..\..\src\modules\swmodule.cpp" />
+    <ClCompile Include="..\..\src\utilfuns\swobject.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\swoptfilter.cpp" />
+    <ClCompile Include="..\..\src\mgr\swsearchable.cpp" />
+    <ClCompile Include="..\..\src\modules\texts\swtext.cpp" />
+    <ClCompile Include="..\..\src\utilfuns\swversion.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\teixhtml.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\teihtmlhref.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\teiplain.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\teirtf.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\thmlfootnotes.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\thmlgbf.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\thmlheadings.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\thmlhtml.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\thmlhtmlhref.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\thmllemma.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\thmlmorph.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\thmlosis.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\thmlplain.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\thmlrtf.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\thmlscripref.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\thmlstrongs.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\thmlvariants.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\thmlwebif.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\thmlwordjs.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\thmlxhtml.cpp" />
+    <ClCompile Include="..\..\src\keys\treekey.cpp" />
+    <ClCompile Include="..\..\src\keys\treekeyidx.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\unicodertf.cpp" />
+    <ClCompile Include="..\..\src\utilfuns\zlib\adler32.c" />
+    <ClCompile Include="..\..\src\utilfuns\zlib\compress.c" />
+    <ClCompile Include="..\..\src\utilfuns\zlib\crc32.c" />
+    <ClCompile Include="..\..\src\utilfuns\zlib\deflate.c" />
+    <ClCompile Include="..\..\src\utilfuns\zlib\gzclose.c" />
+    <ClCompile Include="..\..\src\utilfuns\zlib\gzlib.c" />
+    <ClCompile Include="..\..\src\utilfuns\zlib\gzread.c" />
+    <ClCompile Include="..\..\src\utilfuns\zlib\gzwrite.c" />
+    <ClCompile Include="..\..\src\utilfuns\zlib\infback.c" />
+    <ClCompile Include="..\..\src\utilfuns\zlib\inffast.c" />
+    <ClCompile Include="..\..\src\utilfuns\zlib\inflate.c" />
+    <ClCompile Include="..\..\src\utilfuns\zlib\inftrees.c" />
+    <ClCompile Include="..\..\src\utilfuns\zlib\trees.c" />
+    <ClCompile Include="..\..\src\utilfuns\zlib\uncompr.c" />
+    <ClCompile Include="..\..\src\utilfuns\zlib\untgz.c" />
+    <ClCompile Include="..\..\src\utilfuns\url.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\utf16utf8.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\utf8arabicpoints.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\utf8arshaping.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\utf8bidireorder.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\utf8cantillation.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\utf8greekaccents.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\utf8hebrewpoints.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\utf8html.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\utf8latin1.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\utf8nfc.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\utf8nfkd.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\utf8transliterator.cpp" />
+    <ClCompile Include="..\..\src\modules\filters\utf8utf16.cpp" />
+    <ClCompile Include="..\..\src\utilfuns\utilstr.cpp" />
+    <ClCompile Include="..\..\src\utilfuns\utilxml.cpp" />
+    <ClCompile Include="..\..\src\keys\versekey.cpp" />
+    <ClCompile Include="..\..\src\keys\versetreekey.cpp" />
+    <ClCompile Include="..\..\src\modules\comments\zcom\zcom.cpp" />
+    <ClCompile Include="..\..\src\modules\common\zipcomprs.cpp" />
+    <ClCompile Include="..\..\src\modules\common\bz2comprs.cpp" />
+    <ClCompile Include="..\..\src\modules\common\xzcomprs.cpp" />
+    <ClCompile Include="..\..\src\modules\lexdict\zld\zld.cpp" />
+    <ClCompile Include="..\..\src\modules\common\zstr.cpp" />
+    <ClCompile Include="..\..\src\modules\texts\ztext\ztext.cpp" />
+    <ClCompile Include="..\..\src\modules\common\zverse.cpp" />
+    <ClCompile Include="..\..\src\utilfuns\zlib\zutil.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\include\canon.h" />
+    <ClInclude Include="..\..\include\canon_abbrevs.h" />
+    <ClInclude Include="..\..\include\canon_catholic.h" />
+    <ClInclude Include="..\..\include\canon_catholic2.h" />
+    <ClInclude Include="..\..\include\canon_german.h" />
+    <ClInclude Include="..\..\include\canon_kjva.h" />
+    <ClInclude Include="..\..\include\canon_leningrad.h" />
+    <ClInclude Include="..\..\include\canon_luther.h" />
+    <ClInclude Include="..\..\include\canon_lxx.h" />
+    <ClInclude Include="..\..\include\canon_mt.h" />
+    <ClInclude Include="..\..\include\canon_nrsv.h" />
+    <ClInclude Include="..\..\include\canon_nrsva.h" />
+    <ClInclude Include="..\..\include\canon_null.h" />
+    <ClInclude Include="..\..\include\canon_orthodox.h" />
+    <ClInclude Include="..\..\include\canon_synodal.h" />
+    <ClInclude Include="..\..\include\canon_synodalprot.h" />
+    <ClInclude Include="..\..\include\canon_vulg.h" />
+    <ClInclude Include="..\..\include\cipherfil.h" />
+    <ClInclude Include="..\..\include\curlftpt.h" />
+    <ClInclude Include="..\..\include\curlhttpt.h" />
+    <ClInclude Include="..\..\include\defs.h" />
+    <ClInclude Include="..\..\include\encfiltmgr.h" />
+    <ClInclude Include="..\..\include\entriesblk.h" />
+    <ClInclude Include="..\..\include\filemgr.h" />
+    <ClInclude Include="..\..\include\flatapi.h" />
+    <ClInclude Include="..\..\include\ftplib.h" />
+    <ClInclude Include="..\..\include\ftplibftpt.h" />
+    <ClInclude Include="..\..\include\ftpparse.h" />
+    <ClInclude Include="..\..\include\gbffootnotes.h" />
+    <ClInclude Include="..\..\include\gbfheadings.h" />
+    <ClInclude Include="..\..\include\gbfhtml.h" />
+    <ClInclude Include="..\..\include\gbfhtmlhref.h" />
+    <ClInclude Include="..\..\include\gbflatex.h" />
+    <ClInclude Include="..\..\include\gbfmorph.h" />
+    <ClInclude Include="..\..\include\gbfosis.h" />
+    <ClInclude Include="..\..\include\gbfplain.h" />
+    <ClInclude Include="..\..\include\gbfredletterwords.h" />
+    <ClInclude Include="..\..\include\gbfrtf.h" />
+    <ClInclude Include="..\..\include\gbfstrongs.h" />
+    <ClInclude Include="..\..\include\gbfthml.h" />
+    <ClInclude Include="..\..\include\gbfwebif.h" />
+    <ClInclude Include="..\..\include\gbfwordjs.h" />
+    <ClInclude Include="..\..\include\gbfxhtml.h" />
+    <ClInclude Include="..\..\include\greeklexattribs.h" />
+    <ClInclude Include="..\..\include\hrefcom.h" />
+    <ClInclude Include="..\..\include\installmgr.h" />
+    <ClInclude Include="..\..\include\latin1utf16.h" />
+    <ClInclude Include="..\..\include\latin1utf8.h" />
+    <ClInclude Include="..\..\include\listkey.h" />
+    <ClInclude Include="..\..\include\localemgr.h" />
+    <ClInclude Include="..\..\include\lzsscomprs.h" />
+    <ClInclude Include="..\..\include\markupfiltmgr.h" />
+    <ClInclude Include="..\..\include\multimapwdef.h" />
+    <ClInclude Include="..\..\include\osisenum.h" />
+    <ClInclude Include="..\..\include\osisfootnotes.h" />
+    <ClInclude Include="..\..\include\osisglosses.h" />
+    <ClInclude Include="..\..\include\osisheadings.h" />
+    <ClInclude Include="..\..\include\osishtmlhref.h" />
+    <ClInclude Include="..\..\include\osislatex.h" />
+    <ClInclude Include="..\..\include\osislemma.h" />
+    <ClInclude Include="..\..\include\osismorph.h" />
+    <ClInclude Include="..\..\include\osismorphsegmentation.h" />
+    <ClInclude Include="..\..\include\osisosis.h" />
+    <ClInclude Include="..\..\include\osisplain.h" />
+    <ClInclude Include="..\..\include\osisredletterwords.h" />
+    <ClInclude Include="..\..\include\osisrtf.h" />
+    <ClInclude Include="..\..\include\osisscripref.h" />
+    <ClInclude Include="..\..\include\osisstrongs.h" />
+    <ClInclude Include="..\..\include\osisvariants.h" />
+    <ClInclude Include="..\..\include\osiswebif.h" />
+    <ClInclude Include="..\..\include\osiswordjs.h" />
+    <ClInclude Include="..\..\include\osisxhtml.h" />
+    <ClInclude Include="..\..\include\osisxlit.h" />
+    <ClInclude Include="..\..\include\osisreferencelinks.h" />
+    <ClInclude Include="..\..\include\papyriplain.h" />
+    <ClInclude Include="..\..\include\rawcom.h" />
+    <ClInclude Include="..\..\include\rawcom4.h" />
+    <ClInclude Include="..\..\include\rawfiles.h" />
+    <ClInclude Include="..\..\include\rawgenbook.h" />
+    <ClInclude Include="..\..\include\rawld.h" />
+    <ClInclude Include="..\..\include\rawld4.h" />
+    <ClInclude Include="..\..\include\rawstr.h" />
+    <ClInclude Include="..\..\include\rawstr4.h" />
+    <ClInclude Include="..\..\include\rawtext.h" />
+    <ClInclude Include="..\..\include\rawtext4.h" />
+    <ClInclude Include="..\..\include\rawverse.h" />
+    <ClInclude Include="..\..\include\rawverse4.h" />
+    <ClInclude Include="..\..\include\remotetrans.h" />
+    <ClInclude Include="..\..\include\roman.h" />
+    <ClInclude Include="..\..\include\rtfhtml.h" />
+    <ClInclude Include="..\..\include\sapphire.h" />
+    <ClInclude Include="..\..\include\scsuutf8.h" />
+    <ClInclude Include="..\..\include\stringmgr.h" />
+    <ClInclude Include="..\..\include\strkey.h" />
+    <ClInclude Include="..\..\include\swbasicfilter.h" />
+    <ClInclude Include="..\..\include\swbuf.h" />
+    <ClInclude Include="..\..\include\swcacher.h" />
+    <ClInclude Include="..\..\include\swcipher.h" />
+    <ClInclude Include="..\..\include\swcom.h" />
+    <ClInclude Include="..\..\include\swcomprs.h" />
+    <ClInclude Include="..\..\include\swconfig.h" />
+    <ClInclude Include="..\..\include\swdisp.h" />
+    <ClInclude Include="..\..\include\swfilter.h" />
+    <ClInclude Include="..\..\include\swfiltermgr.h" />
+    <ClInclude Include="..\..\include\swgenbook.h" />
+    <ClInclude Include="..\..\include\swkey.h" />
+    <ClInclude Include="..\..\include\swld.h" />
+    <ClInclude Include="..\..\include\swlocale.h" />
+    <ClInclude Include="..\..\include\swlog.h" />
+    <ClInclude Include="..\..\include\swmacs.h" />
+    <ClInclude Include="..\..\include\swmgr.h" />
+    <ClInclude Include="..\..\include\swmodule.h" />
+    <ClInclude Include="..\..\include\swobject.h" />
+    <ClInclude Include="..\..\include\swoptfilter.h" />
+    <ClInclude Include="..\..\include\swsearchable.h" />
+    <ClInclude Include="..\..\include\swtext.h" />
+    <ClInclude Include="..\..\include\swversion.h" />
+    <ClInclude Include="..\..\include\sysdata.h" />
+    <ClInclude Include="..\..\include\teixhtml.h" />
+    <ClInclude Include="..\..\include\teihtmlhref.h" />
+    <ClInclude Include="..\..\include\teiplain.h" />
+    <ClInclude Include="..\..\include\teirtf.h" />
+    <ClInclude Include="..\..\include\thmlfootnotes.h" />
+    <ClInclude Include="..\..\include\thmlgbf.h" />
+    <ClInclude Include="..\..\include\thmlheadings.h" />
+    <ClInclude Include="..\..\include\thmlhtml.h" />
+    <ClInclude Include="..\..\include\thmlhtmlhref.h" />
+    <ClInclude Include="..\..\include\thmllatex.h" />
+    <ClInclude Include="..\..\include\thmllemma.h" />
+    <ClInclude Include="..\..\include\thmlmorph.h" />
+    <ClInclude Include="..\..\include\thmlosis.h" />
+    <ClInclude Include="..\..\include\thmlplain.h" />
+    <ClInclude Include="..\..\include\thmlrtf.h" />
+    <ClInclude Include="..\..\include\thmlscripref.h" />
+    <ClInclude Include="..\..\include\thmlstrongs.h" />
+    <ClInclude Include="..\..\include\thmlvariants.h" />
+    <ClInclude Include="..\..\include\thmlwebif.h" />
+    <ClInclude Include="..\..\include\thmlwordjs.h" />
+    <ClInclude Include="..\..\include\thmlxhtml.h" />
+    <ClInclude Include="..\..\include\treekey.h" />
+    <ClInclude Include="..\..\include\treekeyidx.h" />
+    <ClInclude Include="..\..\include\unicodertf.h" />
+    <ClInclude Include="..\..\include\untgz.h" />
+    <ClInclude Include="..\..\include\url.h" />
+    <ClInclude Include="..\..\include\utf16utf8.h" />
+    <ClInclude Include="..\..\include\utf8arabicpoints.h" />
+    <ClInclude Include="..\..\include\utf8arshaping.h" />
+    <ClInclude Include="..\..\include\utf8bidireorder.h" />
+    <ClInclude Include="..\..\include\utf8cantillation.h" />
+    <ClInclude Include="..\..\include\utf8greekaccents.h" />
+    <ClInclude Include="..\..\include\utf8hebrewpoints.h" />
+    <ClInclude Include="..\..\include\utf8html.h" />
+    <ClInclude Include="..\..\include\utf8latin1.h" />
+    <ClInclude Include="..\..\include\utf8nfc.h" />
+    <ClInclude Include="..\..\include\utf8nfkd.h" />
+    <ClInclude Include="..\..\include\utf8transliterator.h" />
+    <ClInclude Include="..\..\include\utf8utf16.h" />
+    <ClInclude Include="..\..\include\utilstr.h" />
+    <ClInclude Include="..\..\include\utilxml.h" />
+    <ClInclude Include="..\..\include\versekey.h" />
+    <ClInclude Include="..\..\include\versetreekey.h" />
+    <ClInclude Include="..\..\include\versificationmgr.h" />
+    <ClInclude Include="..\..\include\zcom.h" />
+    <ClInclude Include="..\..\include\zconf.h" />
+    <ClInclude Include="..\..\include\zipcomprs.h" />
+    <ClInclude Include="..\..\include\bz2comprs.h" />
+    <ClInclude Include="..\..\include\xzcomprs.h" />
+    <ClInclude Include="..\..\include\zld.h" />
+    <ClInclude Include="..\..\include\zlib.h" />
+    <ClInclude Include="..\..\include\zstr.h" />
+    <ClInclude Include="..\..\include\ztext.h" />
+    <ClInclude Include="..\..\include\zverse.h" />
+    <ClInclude Include="..\..\src\utilfuns\zlib\crc32.h" />
+    <ClInclude Include="..\..\src\utilfuns\zlib\deflate.h" />
+    <ClInclude Include="..\..\src\utilfuns\zlib\gzguts.h" />
+    <ClInclude Include="..\..\src\utilfuns\zlib\inffast.h" />
+    <ClInclude Include="..\..\src\utilfuns\zlib\inffixed.h" />
+    <ClInclude Include="..\..\src\utilfuns\zlib\inflate.h" />
+    <ClInclude Include="..\..\src\utilfuns\zlib\inftrees.h" />
+    <ClInclude Include="..\..\src\utilfuns\zlib\trees.h" />
+    <ClInclude Include="..\..\src\utilfuns\zlib\zconf.h" />
+    <ClInclude Include="..\..\src\utilfuns\zlib\zlib.h" />
+    <ClInclude Include="..\..\src\utilfuns\zlib\zutil.h" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file


Property changes on: trunk/lib/vcppmake/libsword.vcxproj
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/src/mgr/markupfiltmgr.cpp
===================================================================
--- trunk/src/mgr/markupfiltmgr.cpp	2013-12-30 09:35:50 UTC (rev 2997)
+++ trunk/src/mgr/markupfiltmgr.cpp	2013-12-30 13:10:35 UTC (rev 2998)
@@ -38,6 +38,7 @@
 #include <gbfosis.h>
 #include <thmlosis.h>
 #include <osisrtf.h>
+#include <osislatex.h>
 #include <teirtf.h>
 #include <osisosis.h>
 #include <osishtmlhref.h>
@@ -49,7 +50,9 @@
 #include <gbfxhtml.h>
 #include <osisxhtml.h>
 #include <teixhtml.h>
-
+#include <gbflatex.h>
+#include <thmllatex.h>
+ 
 #include <markupfiltmgr.h>
 
 #include <swmgr.h>
@@ -279,6 +282,14 @@
 		fromtei   = new TEIRTF();
 		break;
 
+	case FMT_LATEX:
+		fromplain = NULL;
+		fromthml  = new ThMLLaTeX();
+		fromgbf   = new GBFLaTeX();
+		fromosis  = new OSISLaTeX();
+		fromtei   = NULL;
+		break;
+
 	case FMT_OSIS:
 		fromplain = NULL;
 		fromthml  = new ThMLOSIS();

Modified: trunk/src/modules/filters/Makefile.am
===================================================================
--- trunk/src/modules/filters/Makefile.am	2013-12-30 09:35:50 UTC (rev 2997)
+++ trunk/src/modules/filters/Makefile.am	2013-12-30 13:10:35 UTC (rev 2998)
@@ -15,6 +15,7 @@
 GBFFIL += $(filtersdir)/gbfredletterwords.cpp
 GBFFIL += $(filtersdir)/gbfmorph.cpp
 GBFFIL += $(filtersdir)/gbfwordjs.cpp
+GBFFIL += $(filtersdir)/gbflatex.cpp
 
 THMLFIL = $(filtersdir)/thmlstrongs.cpp
 THMLFIL += $(filtersdir)/thmlfootnotes.cpp
@@ -30,6 +31,7 @@
 THMLFIL += $(filtersdir)/thmlxhtml.cpp
 THMLFIL += $(filtersdir)/thmlwebif.cpp
 THMLFIL += $(filtersdir)/thmlwordjs.cpp
+THMLFIL += $(filtersdir)/thmllatex.cpp
 
 TEIFIL = $(filtersdir)/teiplain.cpp
 TEIFIL += $(filtersdir)/teirtf.cpp
@@ -61,6 +63,7 @@
 OSISFIL += $(filtersdir)/osisenum.cpp
 OSISFIL += $(filtersdir)/osisxlit.cpp
 OSISFIL += $(filtersdir)/osisreferencelinks.cpp
+OSISFIL += $(filtersdir)/osislatex.cpp
 
 libsword_la_SOURCES += $(filtersdir)/latin1utf8.cpp
 libsword_la_SOURCES += $(filtersdir)/latin1utf16.cpp

Added: trunk/src/modules/filters/gbflatex.cpp
===================================================================
--- trunk/src/modules/filters/gbflatex.cpp	                        (rev 0)
+++ trunk/src/modules/filters/gbflatex.cpp	2013-12-30 13:10:35 UTC (rev 2998)
@@ -0,0 +1,115 @@
+/******************************************************************************
+ *
+ *  gbflatex.cpp -	SWFilter descendant to create LaTeX mark up
+ *
+ * $Id$
+ *
+ * Copyright 2013 CrossWire Bible Society (http://www.crosswire.org)
+ *	CrossWire Bible Society
+ *	P. O. Box 2528
+ *	Tempe, AZ  85280-2528
+ *
+ * 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 version 2.
+ *
+ * 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.
+ *
+ */
+
+#include <stdlib.h>
+#include <gbflatex.h>
+#include <swbuf.h>
+
+
+SWORD_NAMESPACE_START
+
+
+GBFLaTeX::GBFLaTeX() {
+}
+
+
+char GBFLaTeX::processText (SWBuf &text, const SWKey *key, const SWModule *module)
+{
+	char token[2048];
+	int tokpos = 0;
+	bool intoken = false;
+	SWBuf orig = text;
+	const char* from = orig.c_str();
+	
+	for (text = ""; *from; ++from) {
+		if (*from == '<') {
+			intoken = true;
+			tokpos = 0;
+			token[0] = 0;
+			token[1] = 0;
+			token[2] = 0;
+			continue;
+		}
+		if (*from == '>') {
+			intoken = false;
+						// process desired tokens
+			switch (*token) {
+			case 'W':	// Strongs
+				switch(token[1]) {
+				case 'G':               // Greek
+				case 'H':               // Hebrew
+				case 'T':               // Tense
+					text.append(" <");
+					//for (char *tok = token + 2; *tok; tok++)
+					//	text += *tok;
+					text.append(token+2);
+					text.append("> ");
+					continue;
+				}
+				break;
+			case 'R':
+				switch(token[1]) {
+				case 'F':               // footnote begin
+					text += " \\footnote{";
+					continue;
+				case 'f':               // footnote end
+					text.append("} ");
+					continue;
+				}
+				break;
+			case 'C':
+				switch(token[1]) {
+				case 'A':               // ASCII value
+					text.append((char)atoi(&token[2]));
+					continue;
+				case 'G':
+					text.append('>');
+					continue;
+/*								Bug in WEB
+				case 'L':
+					*to++ = '<';
+					continue;
+*/
+				case 'L':	//        Bug in WEB.  Use above entry when fixed
+				case 'N':               // new line
+					text.append('\n');
+					continue;
+				case 'M':               // new paragraph
+					text += "\\paragraph";
+					continue;
+				}
+				break;
+			}
+			continue;
+		}
+		if (intoken) {
+			if (tokpos < 2045)
+				token[tokpos++] = *from;
+				token[tokpos+2] = 0;
+		}
+		else	text.append(*from);
+	}
+	return 0;
+}
+
+
+SWORD_NAMESPACE_END


Property changes on: trunk/src/modules/filters/gbflatex.cpp
___________________________________________________________________
Added: svn:keywords
   + Author Date Id
Added: svn:eol-style
   + native

Added: trunk/src/modules/filters/osislatex.cpp
===================================================================
--- trunk/src/modules/filters/osislatex.cpp	                        (rev 0)
+++ trunk/src/modules/filters/osislatex.cpp	2013-12-30 13:10:35 UTC (rev 2998)
@@ -0,0 +1,261 @@
+/******************************************************************************
+ *
+ *  osislatex.cpp -	An SWFilter that provides conversion of OSIS to LaTeX
+ *
+ * $Id$
+ *
+ * Copyright 2013 CrossWire Bible Society (http://www.crosswire.org)
+ *	CrossWire Bible Society
+ *	P. O. Box 2528
+ *	Tempe, AZ  85280-2528
+ *
+ * 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 version 2.
+ *
+ * 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.
+ *
+ */
+
+#include <stdlib.h>
+#include <osislatex.h>
+#include <ctype.h>
+#include <versekey.h>
+#include <stringmgr.h>
+
+SWORD_NAMESPACE_START
+
+
+namespace {
+
+	class MyUserData : public BasicFilterUserData {
+	public:
+		SWBuf w;
+		XMLTag tag;
+		VerseKey *vk;
+		char testament;
+		SWBuf hiType;
+		MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) {}
+	};
+}
+
+
+OSISLaTeX::OSISLaTeX() {
+	setTokenStart("<");
+	setTokenEnd(">");
+
+	setEscapeStart("&");
+	setEscapeEnd(";");
+
+	setEscapeStringCaseSensitive(true);
+
+	addEscapeStringSubstitute("amp", "&");
+	addEscapeStringSubstitute("apos", "'");
+	addEscapeStringSubstitute("lt", "<");
+	addEscapeStringSubstitute("gt", ">");
+	addEscapeStringSubstitute("quot", "\"");
+
+	   setTokenCaseSensitive(true);
+	   addTokenSubstitute("title", "\n");
+	   addTokenSubstitute("/title", "\n");
+	   addTokenSubstitute("/l", "\n");
+	   addTokenSubstitute("lg", "\n");
+	   addTokenSubstitute("/lg", "\n");
+}
+
+BasicFilterUserData *OSISLaTeX::createUserData(const SWModule *module, const SWKey *key) {
+	MyUserData *u = new MyUserData(module, key);
+	u->vk = SWDYNAMIC_CAST(VerseKey, u->key);
+	u->testament = (u->vk) ? u->vk->getTestament() : 2;	// default to NT
+	return u;
+}
+
+
+bool OSISLaTeX::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData) {
+	   // manually process if it wasn't a simple substitution
+	if (!substituteToken(buf, token)) {
+		MyUserData *u = (MyUserData *)userData;
+		if (((*token == 'w') && (token[1] == ' ')) ||
+		    ((*token == '/') && (token[1] == 'w') && (!token[2]))) {
+				 u->tag = token;
+			
+			bool start = false;
+			if (*token == 'w') {
+				if (token[strlen(token)-1] != '/') {
+					u->w = token;
+					return true;
+				}
+				start = true;
+			}
+			u->tag = (start) ? token : u->w.c_str();
+			bool show = true;	// to handle unplaced article in kjv2003-- temporary till combined
+
+			SWBuf lastText = (start) ? "stuff" : u->lastTextNode.c_str();
+
+			const char *attrib;
+			const char *val;
+			if ((attrib = u->tag.getAttribute("xlit"))) {
+				val = strchr(attrib, ':');
+				val = (val) ? (val + 1) : attrib;
+				buf.append(" <");
+				buf.append(val);
+				buf.append('>');
+			}
+			if ((attrib = u->tag.getAttribute("gloss"))) {
+				val = strchr(attrib, ':');
+				val = (val) ? (val + 1) : attrib;
+				buf.append(" <");
+				buf.append(val);
+				buf.append('>');
+			}
+			if ((attrib = u->tag.getAttribute("lemma"))) {
+				int count = u->tag.getAttributePartCount("lemma", ' ');
+				int i = (count > 1) ? 0 : -1;		// -1 for whole value cuz it's faster, but does the same thing as 0
+				do {
+					char gh;
+					attrib = u->tag.getAttribute("lemma", i, ' ');
+					if (i < 0) i = 0;	// to handle our -1 condition
+					val = strchr(attrib, ':');
+					val = (val) ? (val + 1) : attrib;
+					if ((strchr("GH", *val)) && (isdigit(val[1]))) {
+						gh = *val;
+						val++;
+					}
+					else {
+						gh = (u->testament>1) ? 'G' : 'H';
+					}
+					if ((!strcmp(val, "3588")) && (lastText.length() < 1))
+						show = false;
+					else	{
+						buf.append(" <");
+						buf.append(gh);
+						buf.append(val);
+						buf.append(">");
+					}
+				} while (++i < count);
+			}
+			if ((attrib = u->tag.getAttribute("morph")) && (show)) {
+				int count = u->tag.getAttributePartCount("morph", ' ');
+				int i = (count > 1) ? 0 : -1;		// -1 for whole value cuz it's faster, but does the same thing as 0
+				do {
+					attrib = u->tag.getAttribute("morph", i, ' ');
+					if (i < 0) i = 0;	// to handle our -1 condition
+					val = strchr(attrib, ':');
+					val = (val) ? (val + 1) : attrib;
+					if ((*val == 'T') && (strchr("GH", val[1])) && (isdigit(val[2])))
+						val+=2;
+					buf.append(" (");
+					buf.append(val);
+					buf.append(')');
+				} while (++i < count);
+			}
+			if ((attrib = u->tag.getAttribute("POS"))) {
+				val = strchr(attrib, ':');
+				val = (val) ? (val + 1) : attrib;
+				
+				buf.append(" <");
+				buf.append(val);
+				buf.append('>');
+			}
+		}
+
+		// <note> tag
+		else if (!strncmp(token, "note", 4)) {
+				if (!strstr(token, "strongsMarkup")) {	// leave strong's markup notes out, in the future we'll probably have different option filters to turn different note types on or off
+					buf.append(" \\footnote{");
+				}
+				else	u->suspendTextPassThru = true;
+			}
+		else if (!strncmp(token, "/note", 5)) {
+			if (!u->suspendTextPassThru)
+				buf.append("} ");
+			else	u->suspendTextPassThru = false;
+		}
+
+		// <p> paragraph tag
+		else if (((*token == 'p') && ((token[1] == ' ') || (!token[1]))) ||
+			((*token == '/') && (token[1] == 'p') && (!token[2]))) {
+				userData->supressAdjacentWhitespace = true;
+				buf.append('\n');
+		}
+
+		// Milestoned paragraph, created by osis2mod
+		// <div type="paragraph"  sID... />
+		// <div type="paragraph"  eID... />
+		else if (!strcmp(u->tag.getName(), "div") && u->tag.getAttribute("type") && !strcmp(u->tag.getAttribute("type"), "paragraph") &&
+			(u->tag.isEmpty() && (u->tag.getAttribute("sID") || u->tag.getAttribute("eID")))) {
+				userData->supressAdjacentWhitespace = true;
+				buf.append('\n');
+		}
+
+                // <lb .../>
+                else if (!strncmp(token, "lb", 2)) {
+			userData->supressAdjacentWhitespace = true;
+			buf.append('\n');
+		}
+		else if (!strncmp(token, "l", 1) && strstr(token, "eID")) {
+			userData->supressAdjacentWhitespace = true;
+			buf.append('\n');
+		}
+		else if (!strncmp(token, "/divineName", 11)) {
+			// Get the end portion of the string, and upper case it
+			char* end = buf.getRawData();
+			end += buf.size() - u->lastTextNode.size();
+			toupperstr(end);
+		}
+		else if (!strncmp(token, "hi", 2)) {
+
+				// handle both OSIS 'type' and TEI 'rend' attributes
+				// there is no officially supported OSIS overline attribute,
+				// thus either TEI overline or OSIS x-overline would be best,
+				// but we have used "ol" in the past, as well.  Once a valid
+				// OSIS overline attribute is made available, these should all
+				// eventually be deprecated and never documented that they are supported.
+				if (strstr(token, "rend=\"ol\"") || strstr(token, "rend=\"x-overline\"") || strstr(token, "rend=\"overline\"")
+				   || strstr(token, "type=\"ol\"") || strstr(token, "type=\"x-overline\"") || strstr(token, "type=\"overline\"")) {
+					u->hiType = "overline";
+				}
+				else u->hiType = "";
+				u->suspendTextPassThru = true;
+			}
+		else if (!strncmp(token, "/hi", 3)) {
+			if (u->hiType == "overline") {
+				const unsigned char *b = (const unsigned char *)u->lastTextNode.c_str();
+				while (*b) {
+					const unsigned char *o = b;
+					if (getUniCharFromUTF8(&b)) {
+						while (o != b) buf.append(*(o++));
+						buf.append((unsigned char)0xCC);
+						buf.append((unsigned char)0x85);
+					}
+				}
+			}
+			else {
+				buf.append("*");
+				buf.append(u->lastTextNode);
+				buf.append("*");
+			}
+			u->suspendTextPassThru = false;
+		}
+
+                // <milestone type="line"/>
+                else if (!strncmp(token, "milestone", 9)) {
+			const char* type = strstr(token+10, "type=\"");
+			if (type && strncmp(type+6, "line", 4)) { //we check for type != line
+				userData->supressAdjacentWhitespace = true;
+        			buf.append('\n');
+			}
+                }
+
+		else {
+			return false;  // we still didn't handle token
+		}
+	}
+	return true;
+}
+
+
+SWORD_NAMESPACE_END


Property changes on: trunk/src/modules/filters/osislatex.cpp
___________________________________________________________________
Added: svn:keywords
   + Author Date Id
Added: svn:eol-style
   + native

Added: trunk/src/modules/filters/thmllatex.cpp
===================================================================
--- trunk/src/modules/filters/thmllatex.cpp	                        (rev 0)
+++ trunk/src/modules/filters/thmllatex.cpp	2013-12-30 13:10:35 UTC (rev 2998)
@@ -0,0 +1,248 @@
+/******************************************************************************
+ *
+ *  thmllatex.cpp -	SWFilter descendant to create LaTeX formatted text
+ *			from ThML tags 
+ *
+ * $Id$
+ *
+ * Copyright 2013 CrossWire Bible Society (http://www.crosswire.org)
+ *	CrossWire Bible Society
+ *	P. O. Box 2528
+ *	Tempe, AZ  85280-2528
+ *
+ * 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 version 2.
+ *
+ * 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.
+ *
+ */
+
+#include <stdlib.h>
+#include <thmllatex.h>
+#include <swbuf.h>
+
+SWORD_NAMESPACE_START
+
+ThMLLaTeX::ThMLLaTeX() {
+}
+
+char ThMLLaTeX::processText(SWBuf &text, const SWKey *key, const SWModule *module)
+{
+	char token[2048];
+	int tokpos = 0;
+	bool intoken = false;
+	bool ampersand = false;
+
+	const char *from;
+	SWBuf orig = text;
+	from = orig.c_str();
+	for (text = ""; *from; from++)
+	{
+		if (*from == 10 || *from == 13)
+			from++;
+		if (*from == '<') {
+			intoken = true;
+			tokpos = 0;
+			token[0] = 0;
+			token[1] = 0;
+			token[2] = 0;
+			ampersand = false;
+			continue;
+		}
+		else if (*from == '&') {
+			intoken = true;
+			tokpos = 0;
+			token[0] = 0;
+			token[1] = 0;
+			token[2] = 0;
+			ampersand = true;
+			continue;
+		}
+		if (*from == ';' && ampersand) {
+			intoken = false;
+			ampersand = false;
+
+			if (!strncmp("nbsp", token, 4)) text += ' ';
+			else if (!strncmp("quot", token, 4)) text += '"';
+			else if (!strncmp("amp", token, 3)) text += '&';
+			else if (!strncmp("lt", token, 2)) text += '<';
+			else if (!strncmp("gt", token, 2)) text += '>';
+			else if (!strncmp("brvbar", token, 6)) text += "¦";
+			else if (!strncmp("sect", token, 4)) text += "§";
+			else if (!strncmp("copy", token, 4)) text += "©";
+			else if (!strncmp("laquo", token, 5)) text += "«";
+			else if (!strncmp("reg", token, 3)) text += "®";
+			else if (!strncmp("acute", token, 5)) text += "´";
+			else if (!strncmp("para", token, 4)) text += "¶";
+			else if (!strncmp("raquo", token, 5)) text += "»";
+
+			else if (!strncmp("Aacute", token, 6)) text += "Á";
+			else if (!strncmp("Agrave", token, 6)) text += "À";
+			else if (!strncmp("Acirc", token, 5)) text += "Â";
+			else if (!strncmp("Auml", token, 4)) text += "Ä";
+			else if (!strncmp("Atilde", token, 6)) text += "Ã";
+			else if (!strncmp("Aring", token, 5)) text += "Å";
+			else if (!strncmp("aacute", token, 6)) text += "á";
+			else if (!strncmp("agrave", token, 6)) text += "à";
+			else if (!strncmp("acirc", token, 5)) text += "â";
+			else if (!strncmp("auml", token, 4)) text += "ä";
+			else if (!strncmp("atilde", token, 6)) text += "ã";
+			else if (!strncmp("aring", token, 5)) text += "å";
+			else if (!strncmp("Eacute", token, 6)) text += "É";
+			else if (!strncmp("Egrave", token, 6)) text += "È";
+			else if (!strncmp("Ecirc", token, 5)) text += "Ê";
+			else if (!strncmp("Euml", token, 4)) text += "Ë";
+			else if (!strncmp("eacute", token, 6)) text += "é";
+			else if (!strncmp("egrave", token, 6)) text += "è";
+			else if (!strncmp("ecirc", token, 5)) text += "ê";
+			else if (!strncmp("euml", token, 4)) text += "ë";
+			else if (!strncmp("Iacute", token, 6)) text += "Í";
+			else if (!strncmp("Igrave", token, 6)) text += "Ì";
+			else if (!strncmp("Icirc", token, 5)) text += "Î";
+			else if (!strncmp("Iuml", token, 4)) text += "Ï";
+			else if (!strncmp("iacute", token, 6)) text += "í";
+			else if (!strncmp("igrave", token, 6)) text += "ì";
+			else if (!strncmp("icirc", token, 5)) text += "î";
+			else if (!strncmp("iuml", token, 4)) text += "ï";
+			else if (!strncmp("Oacute", token, 6)) text += "Ó";
+			else if (!strncmp("Ograve", token, 6)) text += "Ò";
+			else if (!strncmp("Ocirc", token, 5)) text += "Ô";
+			else if (!strncmp("Ouml", token, 4)) text += "Ö";
+			else if (!strncmp("Otilde", token, 6)) text += "Õ";
+			else if (!strncmp("oacute", token, 6)) text += "ó";
+			else if (!strncmp("ograve", token, 6)) text += "ò";
+			else if (!strncmp("ocirc", token, 5)) text += "ô";
+			else if (!strncmp("ouml", token, 4)) text += "ö";
+			else if (!strncmp("otilde", token, 6)) text += "õ";
+			else if (!strncmp("Uacute", token, 6)) text += "Ú";
+			else if (!strncmp("Ugrave", token, 6)) text += "Ù";
+			else if (!strncmp("Ucirc", token, 5)) text += "Û";
+			else if (!strncmp("Uuml", token, 4)) text += "Ü";
+			else if (!strncmp("uacute", token, 6)) text += "ú";
+			else if (!strncmp("ugrave", token, 6)) text += "ù";
+			else if (!strncmp("ucirc", token, 5)) text += "û";
+			else if (!strncmp("uuml", token, 4)) text += "ü";
+			else if (!strncmp("Yacute", token, 6)) text += "Ý";
+			else if (!strncmp("yacute", token, 6)) text += "ý";
+			else if (!strncmp("yuml", token, 4)) text += "ÿ";
+
+			else if (!strncmp("deg", token, 3)) text += "°";
+			else if (!strncmp("plusmn", token, 6)) text += "±";
+			else if (!strncmp("sup2", token, 4)) text += "²";
+			else if (!strncmp("sup3", token, 4)) text += "³";
+			else if (!strncmp("sup1", token, 4)) text += "¹";
+			else if (!strncmp("nbsp", token, 4)) text += "º";
+			else if (!strncmp("pound", token, 5)) text += "£";
+			else if (!strncmp("cent", token, 4)) text += "¢";
+			else if (!strncmp("frac14", token, 6)) text += "¼";
+			else if (!strncmp("frac12", token, 6)) text += "½";
+			else if (!strncmp("frac34", token, 6)) text += "¾";
+			else if (!strncmp("iquest", token, 6)) text += "¿";
+			else if (!strncmp("iexcl", token, 5)) text += "¡";
+			else if (!strncmp("ETH", token, 3)) text += "Ð";
+			else if (!strncmp("eth", token, 3)) text += "ð";
+			else if (!strncmp("THORN", token, 5)) text += "Þ";
+			else if (!strncmp("thorn", token, 5)) text += "þ";
+			else if (!strncmp("AElig", token, 5)) text += "Æ";
+			else if (!strncmp("aelig", token, 5)) text += "æ";
+			else if (!strncmp("Oslash", token, 6)) text += "Ø";
+			else if (!strncmp("curren", token, 6)) text += "¤";
+			else if (!strncmp("Ccedil", token, 6)) text += "Ç";
+			else if (!strncmp("ccedil", token, 6)) text += "ç";
+			else if (!strncmp("szlig", token, 5)) text += "ß";
+			else if (!strncmp("Ntilde", token, 6)) text += "Ñ";
+			else if (!strncmp("ntilde", token, 6)) text += "ñ";
+			else if (!strncmp("yen", token, 3)) text += "¥";
+			else if (!strncmp("not", token, 3)) text += "¬";
+			else if (!strncmp("ordf", token, 4)) text += "ª";
+			else if (!strncmp("uml", token, 3)) text += "¨";
+			else if (!strncmp("shy", token, 3)) text += "­";
+			else if (!strncmp("macr", token, 4)) text += "¯";
+			else if (!strncmp("micro", token, 5)) text += "µ";
+			else if (!strncmp("middot", token, 6)) text += "·";
+			else if (!strncmp("cedil", token, 5)) text += "¸";
+			else if (!strncmp("ordm", token, 4)) text += "º";
+			else if (!strncmp("times", token, 5)) text += "×";
+			else if (!strncmp("divide", token, 6)) text += "÷";
+			else if (!strncmp("oslash", token, 6)) text += "ø";
+			continue;
+
+		}
+		else if (*from == '>' && !ampersand) {
+			intoken = false;
+			// process desired tokens
+			if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
+				text += ' ';
+				text += '<';
+				for (unsigned int i = 27; token[i] != '\"'; i++)
+					text += token[i];
+				text += '>';
+				continue;
+			}
+			if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
+				text += ' ';
+				text += '(';
+				for (unsigned int i = 25; token[i] != '\"'; i++)
+					text += token[i];
+				text += ')';
+				continue;
+			}
+			if (!strncmp("note", token, 4)) {
+				text += " \\footnote{";
+			}
+			if (!strncmp("title", token, 5)) {
+				text += " \\section*{";
+			}
+			if (!strncmp("scripRef", token, 8)) {
+				text += " \\footnoteB{";
+			}
+			else if (!strncmp("br", token, 2))
+				text += "\\\\";
+			else if (!strncmp("/p", token, 2))
+				text += "\\paragraph ";
+			else if (!strncmp("/note", token, 5)) {
+				text += '}';
+				text += ' ';
+			}
+			else if (!strncmp("/scripRef", token, 9)) {
+				text += '}';
+				text += ' ';
+			}
+			else if (!strncmp("/title", token, 6)) {
+				text += '}';
+				text += ' ';
+			}
+			continue;
+		}
+		if (intoken) {
+			if (tokpos < 2045)
+				token[tokpos++] = *from;
+				token[tokpos+2] = 0;
+		}
+		else	text += *from;
+	}
+
+	orig = text;
+	from = orig.c_str();
+	for (text = ""; *from; from++) {  //loop to remove extra spaces
+                if ((strchr(" \t\n\r", *from))) {
+                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
+                                from++;
+                        }
+                        text += " ";
+                }
+                else {
+                        text += *from;
+                }
+        }
+        text += (char)0;
+
+	return 0;
+}
+
+
+SWORD_NAMESPACE_END


Property changes on: trunk/src/modules/filters/thmllatex.cpp
___________________________________________________________________
Added: svn:keywords
   + Author Date Id
Added: svn:eol-style
   + native

Modified: trunk/utilities/diatheke/corediatheke.cpp
===================================================================
--- trunk/utilities/diatheke/corediatheke.cpp	2013-12-30 09:35:50 UTC (rev 2997)
+++ trunk/utilities/diatheke/corediatheke.cpp	2013-12-30 13:10:35 UTC (rev 2998)
@@ -316,8 +316,28 @@
 		else if (outputformat == FMT_HTML || outputformat == FMT_HTMLHREF || outputformat == FMT_XHTML) {
 			*output << "<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">";
 		}
+		else if (outputformat == FMT_LATEX) {
+			*output << "\\documentclass[12pt]{article}\n";
+			*output << "\\usepackage{fontspec}\n";
+			*output << "\\usepackage{geometry}\n";
+			*output << "\\usepackage{setspace}\n";
+			*output << "\\usepackage{polyglossia}\n";
+			if (font) {
+				*output << "\\setmainfont{";
+				*output << font;
+				*output << "}";
+			} 
+			
+			*output << "\\begin{document}\n";
+			*output << "\\setlength{\\parskip}{3pt} \% 1ex plus 0.5ex minus 0.2ex}\n";
+		}
 
+
 		if (text.length()) {
+			if (outputformat == FMT_LATEX) {
+				*output << "\\paragraph\n";
+			}
+			
 			*output << (char*)target->getKeyText();
 			if (font && (outputformat == FMT_HTML || outputformat == FMT_HTMLHREF || outputformat == FMT_XHTML || outputformat == FMT_THML || outputformat == FMT_CGI)) {
 				*output << ": <font face=\"";
@@ -346,6 +366,9 @@
 		if (outputformat == FMT_RTF) {
 			*output << "}";
 		}
+		else if (outputformat == FMT_LATEX) {
+			*output << "\\end{document}";
+		}
 
 	}
 
@@ -370,6 +393,20 @@
 				*output << "Times New Roman";
 			*output << ";}{\\f7\\froman\\fcharset2\\fprq2 Symbol;}}";
 		}
+		else if (outputformat == FMT_LATEX) {
+			*output << "\\documentclass[12pt]{article}\n";
+			*output << "\\usepackage{fontspec}\n";
+			*output << "\\usepackage{geometry}\n";
+			*output << "\\usepackage{setspace}\n";
+			*output << "\\usepackage{polyglossia}\n";
+			if (font) {
+				*output << "\\setmainfont{";
+				*output << font;
+				*output << "}";
+			} 
+			*output << "\\begin{document}\n";
+			*output << "\\setlength{\\parskip}{3pt} \% 1ex plus 0.5ex minus 0.2ex}\n";
+		}
 		else if (outputformat == FMT_HTML || outputformat == FMT_HTMLHREF || outputformat == FMT_XHTML) {
 			*output << "<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">";
 		}
@@ -460,7 +497,9 @@
 		if (outputformat == FMT_RTF) {
 			*output << "}";
 		}
-
+		else if (outputformat == FMT_LATEX) {
+			*output << "\\end{document}\n";
+		}
 	}
 	delete parser;
 }

Modified: trunk/utilities/diatheke/diafiltmgr.cpp
===================================================================
--- trunk/utilities/diatheke/diafiltmgr.cpp	2013-12-30 09:35:50 UTC (rev 2997)
+++ trunk/utilities/diatheke/diafiltmgr.cpp	2013-12-30 13:10:35 UTC (rev 2998)
@@ -32,6 +32,9 @@
 #include <gbfrtf.h>
 #include <osisrtf.h>
 #include <osishtmlhref.h>
+#include <osislatex.h>
+#include <gbflatex.h>
+#include <thmllatex.h>
 #include <swmodule.h>
 #include <osisplain.h>
 #include <thmlosis.h>
@@ -177,12 +180,12 @@
 void DiathekeFilterMgr::CreateFilters(char markup) {
 
                 switch (markup) {
-		case FMT_CGI:
-			fromplain = NULL;
-			fromthml = new ThMLCGI();
-			fromgbf = new GBFCGI();
-			fromosis = new OSISCGI();
-			break;
+				case FMT_CGI:
+						fromplain = NULL;
+						fromthml = new ThMLCGI();
+						fromgbf = new GBFCGI();
+						fromosis = new OSISCGI();
+						break;
                 case FMT_PLAIN:
                         fromplain = NULL;
                         fromthml = new ThMLPlain();
@@ -213,6 +216,12 @@
                         fromgbf = new GBFHTMLHREF();
                         fromosis = new OSISHTMLHREF();
                         break;
+                case FMT_LATEX:
+                        fromplain = NULL;
+                        fromthml = new ThMLLaTeX();
+                        fromgbf = new GBFLaTeX();
+                        fromosis = new OSISLaTeX();
+                        break;
                 case FMT_RTF:
                         fromplain = NULL;
                         fromthml = new ThMLRTF();

Modified: trunk/utilities/diatheke/diatheke.cpp
===================================================================
--- trunk/utilities/diatheke/diatheke.cpp	2013-12-30 09:35:50 UTC (rev 2997)
+++ trunk/utilities/diatheke/diatheke.cpp	2013-12-30 13:10:35 UTC (rev 2998)
@@ -59,8 +59,8 @@
 	fprintf (stderr, "  x (Encoded Transliterations), t (Algorithmic Transliterations via ICU)\n");
 
 	fprintf (stderr, "Maximum verses may be any integer value\n");
-	fprintf (stderr, "Valid output_format values are: GBF, ThML, RTF, HTML, HTMLHREF, XHTML, OSIS,\n");
-	fprintf (stderr, "  CGI, and plain (def)\n");
+	fprintf (stderr, "Valid output_format values are: CGI, GBF, HTML, HTMLHREF, LaTeX, OSIS, RTF,\n");
+ 	fprintf (stderr, "  ThML, XHTML, and plain (def)\n");
 	fprintf (stderr, "Valid output_encoding values are: Latin1, UTF8 (def), UTF16, HTML, and RTF\n");
 	fprintf (stderr, "Valid locale values depend on installed locales. en is default.\n");
 	fprintf (stderr, "The query_key must be the last argument because all following\n");
@@ -200,6 +200,10 @@
 					outputformat = FMT_OSIS;
 					i++;
 				}
+				else if (!::stricmp("latex", argv[i+1])) {
+					outputformat = FMT_LATEX;
+					i++;
+				}
 				else i++;
 			}
 		}




More information about the sword-cvs mailing list