├── Images
├── Math.png
└── iosMath+YYLabel.png
├── SwiftMath
├── Assets.xcassets
│ ├── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── WebView
│ ├── katex
│ │ ├── fonts
│ │ │ ├── KaTeX_Main-Bold.eot
│ │ │ ├── KaTeX_Main-Bold.ttf
│ │ │ ├── KaTeX_AMS-Regular.eot
│ │ │ ├── KaTeX_AMS-Regular.ttf
│ │ │ ├── KaTeX_Main-Bold.woff
│ │ │ ├── KaTeX_Main-Italic.eot
│ │ │ ├── KaTeX_Main-Italic.ttf
│ │ │ ├── KaTeX_Math-Italic.eot
│ │ │ ├── KaTeX_Math-Italic.ttf
│ │ │ ├── KaTeX_AMS-Regular.woff
│ │ │ ├── KaTeX_Main-Italic.woff
│ │ │ ├── KaTeX_Main-Regular.eot
│ │ │ ├── KaTeX_Main-Regular.ttf
│ │ │ ├── KaTeX_Main-Regular.woff
│ │ │ ├── KaTeX_Math-Italic.woff
│ │ │ ├── KaTeX_Math-Regular.eot
│ │ │ ├── KaTeX_Math-Regular.ttf
│ │ │ ├── KaTeX_Math-Regular.woff
│ │ │ ├── KaTeX_Size1-Regular.eot
│ │ │ ├── KaTeX_Size1-Regular.ttf
│ │ │ ├── KaTeX_Size1-Regular.woff
│ │ │ ├── KaTeX_Size2-Regular.eot
│ │ │ ├── KaTeX_Size2-Regular.ttf
│ │ │ ├── KaTeX_Size2-Regular.woff
│ │ │ ├── KaTeX_Size3-Regular.eot
│ │ │ ├── KaTeX_Size3-Regular.ttf
│ │ │ ├── KaTeX_Size3-Regular.woff
│ │ │ ├── KaTeX_Size4-Regular.eot
│ │ │ ├── KaTeX_Size4-Regular.ttf
│ │ │ ├── KaTeX_Size4-Regular.woff
│ │ │ ├── KaTeX_Math-BoldItalic.eot
│ │ │ ├── KaTeX_Math-BoldItalic.ttf
│ │ │ └── KaTeX_Math-BoldItalic.woff
│ │ ├── LatexWebView.h
│ │ ├── index.html
│ │ ├── README.md
│ │ ├── LatexWebView.m
│ │ └── katex.min.css
│ ├── WebViewModeController.swift
│ └── WebViewModeCell.swift
├── ViewController.swift
├── iosMath+YYLabel
│ ├── iosMathModeController.swift
│ └── iosMathModeCell.swift
├── AppDelegate.swift
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── Common
│ └── MathText.swift
├── Info.plist
└── SceneDelegate.swift
├── SwiftMath.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── xcuserdata
│ └── fuyoufang.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
└── project.pbxproj
├── SwiftMath.xcworkspace
├── contents.xcworkspacedata
└── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── Podfile.lock
├── Podfile
├── SwiftMathTests
├── Info.plist
└── SwiftMathTests.swift
├── SwiftMathUITests
├── Info.plist
└── SwiftMathUITests.swift
├── README.md
└── .gitignore
/Images/Math.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/Images/Math.png
--------------------------------------------------------------------------------
/Images/iosMath+YYLabel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/Images/iosMath+YYLabel.png
--------------------------------------------------------------------------------
/SwiftMath/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Main-Bold.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Main-Bold.eot
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Main-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Main-Bold.ttf
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_AMS-Regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_AMS-Regular.eot
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_AMS-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_AMS-Regular.ttf
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Main-Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Main-Bold.woff
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Main-Italic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Main-Italic.eot
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Main-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Main-Italic.ttf
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Math-Italic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Math-Italic.eot
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Math-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Math-Italic.ttf
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_AMS-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_AMS-Regular.woff
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Main-Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Main-Italic.woff
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Main-Regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Main-Regular.eot
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Main-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Main-Regular.ttf
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Main-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Main-Regular.woff
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Math-Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Math-Italic.woff
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Math-Regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Math-Regular.eot
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Math-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Math-Regular.ttf
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Math-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Math-Regular.woff
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Size1-Regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Size1-Regular.eot
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Size1-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Size1-Regular.ttf
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Size1-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Size1-Regular.woff
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Size2-Regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Size2-Regular.eot
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Size2-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Size2-Regular.ttf
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Size2-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Size2-Regular.woff
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Size3-Regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Size3-Regular.eot
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Size3-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Size3-Regular.ttf
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Size3-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Size3-Regular.woff
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Size4-Regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Size4-Regular.eot
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Size4-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Size4-Regular.ttf
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Size4-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Size4-Regular.woff
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Math-BoldItalic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Math-BoldItalic.eot
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Math-BoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Math-BoldItalic.ttf
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/fonts/KaTeX_Math-BoldItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuyoufang/SwiftMath/HEAD/SwiftMath/WebView/katex/fonts/KaTeX_Math-BoldItalic.woff
--------------------------------------------------------------------------------
/SwiftMath.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/SwiftMath.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/SwiftMath.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/SwiftMath.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/SwiftMath/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // SwiftMath
4 | //
5 | // Created by 付有芳 on 2019/12/23.
6 | // Copyright © 2019 付有芳. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UITableViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view.
16 | }
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/SwiftMath.xcodeproj/xcuserdata/fuyoufang.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | SwiftMath.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 7
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/LatexWebView.h:
--------------------------------------------------------------------------------
1 | //
2 | // LatexWebView.h
3 | // LATEX
4 | //
5 | // Created by Netban on 2019/2/1.
6 | // Copyright © 2019年 scn. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 |
14 | typedef void (^LatexWebViewHeight)(CGFloat webViewHeight);
15 | @interface LatexWebView : UIWebView
16 | -(instancetype)initWithFrame:(CGRect)frame HTMLString:(NSString *)html;
17 | @property(nonatomic, copy) LatexWebViewHeight laetxWebViewHeight;
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - iosMath (0.9.4)
3 | - SnapKit (5.0.1)
4 | - YYText (1.0.7)
5 |
6 | DEPENDENCIES:
7 | - iosMath
8 | - SnapKit
9 | - YYText
10 |
11 | SPEC REPOS:
12 | https://github.com/CocoaPods/Specs.git:
13 | - iosMath
14 | - SnapKit
15 | - YYText
16 |
17 | SPEC CHECKSUMS:
18 | iosMath: f7a6cbadf9d836d2149c2a84c435b1effc244cba
19 | SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb
20 | YYText: 5c461d709e24d55a182d1441c41dc639a18a4849
21 |
22 | PODFILE CHECKSUM: 47295547341588eb50c223ea90c7fcb4b922dafe
23 |
24 | COCOAPODS: 1.8.4
25 |
--------------------------------------------------------------------------------
/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment the next line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | inhibit_all_warnings!
5 |
6 | source 'https://github.com/CocoaPods/Specs.git'
7 |
8 |
9 | target 'SwiftMath' do
10 | # Comment the next line if you don't want to use dynamic frameworks
11 | use_frameworks!
12 |
13 | # Pods for SwiftMath
14 | pod 'iosMath'
15 | pod 'YYText'
16 | pod 'SnapKit'
17 |
18 | target 'SwiftMathTests' do
19 | inherit! :search_paths
20 | # Pods for testing
21 | end
22 |
23 | target 'SwiftMathUITests' do
24 | # Pods for testing
25 | end
26 |
27 | end
28 |
--------------------------------------------------------------------------------
/SwiftMathTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/SwiftMathUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/SwiftMathTests/SwiftMathTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SwiftMathTests.swift
3 | // SwiftMathTests
4 | //
5 | // Created by 付有芳 on 2019/12/23.
6 | // Copyright © 2019 付有芳. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | @testable import SwiftMath
11 |
12 | class SwiftMathTests: XCTestCase {
13 |
14 | override func setUp() {
15 | // Put setup code here. This method is called before the invocation of each test method in the class.
16 | }
17 |
18 | override func tearDown() {
19 | // Put teardown code here. This method is called after the invocation of each test method in the class.
20 | }
21 |
22 | func testExample() {
23 | // This is an example of a functional test case.
24 | // Use XCTAssert and related functions to verify your tests produce the correct results.
25 | }
26 |
27 | func testPerformanceExample() {
28 | // This is an example of a performance test case.
29 | self.measure {
30 | // Put the code you want to measure the time of here.
31 | }
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/SwiftMath/iosMath+YYLabel/iosMathModeController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // iosMathModeController.swift
3 | // SwiftMath
4 | //
5 | // Created by 付有芳 on 2019/12/23.
6 | // Copyright © 2019 付有芳. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import YYText
11 |
12 | class iosMathModeController: UITableViewController {
13 |
14 | static let cellReuseIdentifier = "iosMathModeCell"
15 |
16 | override func viewDidLoad() {
17 | super.viewDidLoad()
18 | tableView.register(iosMathModeCell.self, forCellReuseIdentifier: iosMathModeController.cellReuseIdentifier)
19 | }
20 |
21 | override func numberOfSections(in tableView: UITableView) -> Int {
22 | return 1
23 | }
24 |
25 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
26 | return MathTexts.count
27 | }
28 |
29 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
30 | let cell = tableView.dequeueReusableCell(withIdentifier: iosMathModeController.cellReuseIdentifier) as! iosMathModeCell
31 | cell.mathText = MathTexts[indexPath.row]
32 | return cell
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
11 |
22 |
23 |
24 |
25 | $LATEX$
26 |
27 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SwiftMath
2 |
3 | 在开发的工程中,有需要显示数学公式的需求,例如下面的
4 |
5 | 
6 |
7 | 
8 |
9 | 实现上面的显示方式,可以使用三种方式:
10 | ### 使用图片
11 | 将数学公式在服务器端生成图片,前端使用图片来展示数学公式。
12 |
13 | > 使用这种方式前端难以排版,难以控制图片的缩放比例,灵活性低。
14 |
15 | ### WebView 加载数学公式引擎 —— KaTeX
16 |
17 | 现在已经有一个非常成熟的排版系统 [LaTeX](https://www.latex-project.org/),它支持使用文本来表达复杂的数学公式、表格等。如果单纯的显示数学公式的话,可以使用 LaTeX 的子集 [KaTeX](https://katex.org/), 它是一个支持 HTML 的轻量级的数学公式引擎。
18 |
19 | 我们可以在需要显示数学公式时创建一个 WebView,引入 KaTeX 来渲染数学公式。
20 |
21 | > 使用这种方式存在几种问题:
22 | > 1. WebView 加载数学公式的速度非常慢。
23 | > 2. 如果需要在 TableView 的 Cell 中加载数学公式,则可能出现一个页面中需要多个 WebView 的情况,会进一步见面页面刷新的速度。其次 TableView 不能自动推断出 WebView 的高度,从而难以控制 Cell 的高度。
24 |
25 | ### iosMath + YYText 的组合
26 | [iosMath](https://github.com/kostub/iosMath) 是一个专门用于显示数学公式的框架,但是它不支持将其他文字和数学公式一起显示。所以我们只能从一段文字当中提取表达数学公式的部分,将其丢给 iosMath 显示,其他的内容还需要其他控件来展示。
27 |
28 | 所以我们还需要使用 [YYText](https://github.com/ibireme/YYText) ,将 iosMath 框架中的用于显示数学公式的 MTMathUILabel 作为一段 AttachmentString,使其和其他文字进行拼接。
29 |
30 | 另外还需要考虑在数学公式过长,一个页面显示不全时,需要左右滚动方便用户查看数学公式。所以用于展示信息的 YYLabel 还需要放在一个 UIScrollView 中。
31 |
32 | 具体的实现方式可以查看本项目。
33 |
34 | | 项目截图1 | 项目截图2 |
35 | | :--: | :--: |
36 | | ![][1] | ![][2] |
37 |
38 | [1]:./Images/Math.png
39 | [2]:./Images/iosMath+YYLabel.png
40 |
41 | ### 参考
42 | [廖雪峰--使用 KaTeX 渲染数学公式](https://www.liaoxuefeng.com/article/1280024328011810)
43 |
44 |
--------------------------------------------------------------------------------
/SwiftMath/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // SwiftMath
4 | //
5 | // Created by 付有芳 on 2019/12/23.
6 | // Copyright © 2019 付有芳. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 |
15 |
16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
17 | // Override point for customization after application launch.
18 | return true
19 | }
20 |
21 | // MARK: UISceneSession Lifecycle
22 |
23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
24 | // Called when a new scene session is being created.
25 | // Use this method to select a configuration to create the new scene with.
26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
27 | }
28 |
29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) {
30 | // Called when the user discards a scene session.
31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
33 | }
34 |
35 |
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/SwiftMathUITests/SwiftMathUITests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SwiftMathUITests.swift
3 | // SwiftMathUITests
4 | //
5 | // Created by 付有芳 on 2019/12/23.
6 | // Copyright © 2019 付有芳. All rights reserved.
7 | //
8 |
9 | import XCTest
10 |
11 | class SwiftMathUITests: XCTestCase {
12 |
13 | override func setUp() {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 |
16 | // In UI tests it is usually best to stop immediately when a failure occurs.
17 | continueAfterFailure = false
18 |
19 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
20 | }
21 |
22 | override func tearDown() {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | }
25 |
26 | func testExample() {
27 | // UI tests must launch the application that they test.
28 | let app = XCUIApplication()
29 | app.launch()
30 |
31 | // Use recording to get started writing UI tests.
32 | // Use XCTAssert and related functions to verify your tests produce the correct results.
33 | }
34 |
35 | func testLaunchPerformance() {
36 | if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) {
37 | // This measures how long it takes to launch your application.
38 | measure(metrics: [XCTOSSignpostMetric.applicationLaunch]) {
39 | XCUIApplication().launch()
40 | }
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/SwiftMath/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/SwiftMath/WebView/WebViewModeController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // WebViewModeController.swift
3 | // SwiftMath
4 | //
5 | // Created by 付有芳 on 2019/12/23.
6 | // Copyright © 2019 付有芳. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import UIKit
11 |
12 | class WebViewModeController: UIViewController {
13 | static let cellReuseIdentifier = "WebViewModeCell"
14 |
15 | private lazy var tableView: UITableView = {
16 | let tableView = UITableView()
17 | tableView.dataSource = self
18 | tableView.delegate = self
19 | tableView.register(WebViewModeCell.self, forCellReuseIdentifier: WebViewModeController.cellReuseIdentifier)
20 | tableView.separatorStyle = .none
21 | return tableView
22 | }()
23 |
24 | override func viewDidLoad() {
25 | super.viewDidLoad()
26 | view.addSubview(tableView)
27 |
28 | tableView.snp.makeConstraints {
29 | $0.edges.equalToSuperview()
30 | }
31 | }
32 | }
33 | extension WebViewModeController: UITableViewDelegate, UITableViewDataSource {
34 | func numberOfSections(in tableView: UITableView) -> Int {
35 | return 1
36 | }
37 |
38 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
39 | return MathTexts.count
40 | }
41 |
42 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
43 | let cell = tableView.dequeueReusableCell(withIdentifier: WebViewModeController.cellReuseIdentifier) as! WebViewModeCell
44 | cell.mathText = MathTexts[indexPath.row]
45 | cell.questionContentLoadFinish = { [weak self] in
46 | self?.tableView.beginUpdates()
47 | self?.tableView.endUpdates()
48 | }
49 | return cell
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/README.md:
--------------------------------------------------------------------------------
1 | # [
](http://khan.github.io/KaTeX/) [](https://travis-ci.org/Khan/KaTeX)
2 |
3 | KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web.
4 |
5 | * **Fast:** KaTeX renders its math synchronously and doesn't need to reflow the page. See how it compares to a competitor in [this speed test](http://jsperf.com/katex-vs-mathjax/).
6 | * **Print quality:** KaTeX’s layout is based on Donald Knuth’s TeX, the gold standard for math typesetting.
7 | * **Self contained:** KaTeX has no dependencies and can easily be bundled with your website resources.
8 | * **Server side rendering:** KaTeX produces the same output regardless of browser or environment, so you can pre-render expressions using Node.js and send them as plain HTML.
9 |
10 | KaTeX supports all major browsers, including Chrome, Safari, Firefox, Opera, and IE 8 - IE 11.
11 |
12 | ## Usage
13 |
14 | Download the built files from [the releases page](https://github.com/khan/katex/releases). Include the `katex.min.js` and `katex.min.css` files on your page:
15 |
16 | ```html
17 |
18 |
19 | ```
20 |
21 | Call `katex.render` with a TeX expression and a DOM element to render into:
22 |
23 | ```js
24 | katex.render("c = \\pm\\sqrt{a^2 + b^2}", element);
25 | ```
26 |
27 | To generate HTML on the server, you can use `katex.renderToString`:
28 |
29 | ```js
30 | var html = katex.renderToString("c = \\pm\\sqrt{a^2 + b^2}");
31 | // '...'
32 | ```
33 |
34 | Make sure to include the CSS and font files, but there is no need to include the JavaScript.
35 |
36 | ## Contributing
37 |
38 | See [CONTRIBUTING.md](CONTRIBUTING.md)
39 |
40 | ## License
41 |
42 | KaTeX is licenced under the [MIT License](http://opensource.org/licenses/MIT).
43 |
--------------------------------------------------------------------------------
/SwiftMath/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "size" : "1024x1024",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
--------------------------------------------------------------------------------
/SwiftMath/Common/MathText.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MathText.swift
3 | // SwiftMath
4 | //
5 | // Created by 付有芳 on 2019/12/23.
6 | // Copyright © 2019 付有芳. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | // 数学公式的分割符号
12 | let DEFAULT_DELIMITER = "`"
13 |
14 | let MathText0 =
15 | """
16 | 数学公式1:`f^{(n)}(z_0) = frac{n!}{2pi i}oint_gammafrac{f(z)}{(z-z_0)^{n+1}}dz`
17 | """
18 |
19 | let MathText1 =
20 | """
21 | 数学公式2:`x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}`
22 | """
23 |
24 | let MathText2 =
25 | """
26 | 数学公式3:`\\frak Q(\\lambda,\\hat{\\lambda}) = -\\frac{1}{2} \\mathbb P(O \\mid \\lambda ) \\sum_s \\sum_m \\sum_t \\gamma_m^{(s)} (t) +\\\\ \\quad \\left( \\log(2 \\pi ) + \\log \\left| \\cal C_m^{(s)} \\right| + \\left( o_t - \\hat{\\mu}_m^{(s)} \\right) ^T \\cal C_m^{(s)-1} \\right)`
27 | """
28 |
29 | let MathText3 =
30 | """
31 | 数学公式4:`i\\hbar\\frac{\\partial}{\\partial t}\\mathbf\\Psi(\\mathbf{x},t) = -\\frac{\\hbar}{2m}\\nabla^2\\mathbf\\Psi(\\mathbf{x},t) + V(\\mathbf{x})\\mathbf\\Psi(\\mathbf{x},t) -\\frac{\\hbar}{2m}\\nabla^2\\mathbf\\Psi(\\mathbf{x},t) + V(\\mathbf{x})\\mathbf\\Psi(\\mathbf{x},t)`
32 | """
33 |
34 | let MathText4 =
35 | """
36 | 数学公式5:第一段公式 `i\\hbar\\frac{\\partial}{\\partial t}\\mathbf\\Psi(\\mathbf{x},t)`,第二段公式 `-\\frac{\\hbar}{2m}\\nabla^2\\mathbf\\Psi(\\mathbf{x},t) + V(\\mathbf{x})\\mathbf\\Psi(\\mathbf{x},t)`,第三段公式 `-\\frac{\\hbar}{2m}\\nabla^2\\mathbf\\Psi(\\mathbf{x},t) + V(\\mathbf{x})\\mathbf\\Psi(\\mathbf{x},t)`,结束。
37 | """
38 |
39 | let MathText5 =
40 | """
41 | 数学公式6:
42 | 第一段公式 `i\\hbar\\frac{\\partial}{\\partial t}\\mathbf\\Psi(\\mathbf{x},t)`,
43 | 第二段公式 `-\\frac{\\hbar}{2m}\\nabla^2\\mathbf\\Psi(\\mathbf{x},t) + V(\\mathbf{x})\\mathbf\\Psi(\\mathbf{x},t)`,
44 | 第三段公式 `-\\frac{\\hbar}{2m}\\nabla^2\\mathbf\\Psi(\\mathbf{x},t) + V(\\mathbf{x})\\mathbf\\Psi(\\mathbf{x},t)`,
45 | 结束。
46 | """
47 |
48 | let MathTexts = [MathText0, MathText1, MathText2, MathText3, MathText4, MathText5]
49 |
50 |
51 | let screenWidth = Int(UIScreen.main.bounds.size.width)
52 | let mathTextContentLeft = 14
53 | let mathTextContentRight = 14
54 | let mathTextContentFontSize = 17
55 | let mathTextContentFont = UIFont.systemFont(ofSize: 17)
56 | let mathTextContentColor = UIColor.darkText
57 |
--------------------------------------------------------------------------------
/SwiftMath/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UIApplicationSceneManifest
24 |
25 | UIApplicationSupportsMultipleScenes
26 |
27 | UISceneConfigurations
28 |
29 | UIWindowSceneSessionRoleApplication
30 |
31 |
32 | UISceneConfigurationName
33 | Default Configuration
34 | UISceneDelegateClassName
35 | $(PRODUCT_MODULE_NAME).SceneDelegate
36 | UISceneStoryboardFile
37 | Main
38 |
39 |
40 |
41 |
42 | UILaunchStoryboardName
43 | LaunchScreen
44 | UIMainStoryboardFile
45 | Main
46 | UIRequiredDeviceCapabilities
47 |
48 | armv7
49 |
50 | UISupportedInterfaceOrientations
51 |
52 | UIInterfaceOrientationPortrait
53 | UIInterfaceOrientationLandscapeLeft
54 | UIInterfaceOrientationLandscapeRight
55 |
56 | UISupportedInterfaceOrientations~ipad
57 |
58 | UIInterfaceOrientationPortrait
59 | UIInterfaceOrientationPortraitUpsideDown
60 | UIInterfaceOrientationLandscapeLeft
61 | UIInterfaceOrientationLandscapeRight
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/LatexWebView.m:
--------------------------------------------------------------------------------
1 | //
2 | // LatexWebView.m
3 | // LATEX
4 | //
5 | // Created by Netban on 2019/2/1.
6 | // Copyright © 2019年 scn. All rights reserved.
7 | //
8 |
9 | #import "LatexWebView.h"
10 | #define DEFAULT_DELIMITER @"$"
11 |
12 | @interface LatexWebView()
13 | @property(nonatomic, strong) NSString *originHTML;
14 | @end
15 |
16 | @implementation LatexWebView
17 |
18 | -(instancetype) initWithFrame:(CGRect)frame HTMLString:(NSString *)html{
19 | if (self = [super initWithFrame:frame]) {
20 | self.originHTML = html;
21 | // self.scalesPageToFit = YES;
22 | [self dealWithHTMLString:html];
23 | }
24 | return self;
25 | }
26 | -(void)dealWithHTMLString:(NSString *)html{
27 | NSString* htmlPath = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"];
28 | NSString* appHtml = [NSString stringWithContentsOfFile:htmlPath encoding:NSUTF8StringEncoding error:nil];
29 | if([html rangeOfString:@"$"].location != NSNotFound) { // Expression inside text.
30 | NSRange r;
31 | BOOL intex = NO;
32 | while ((r = [html rangeOfString:DEFAULT_DELIMITER]).location != NSNotFound) {
33 | html = [html stringByReplacingCharactersInRange:r withString:(intex ? @"" : @"")];
34 | intex = !intex;
35 | }
36 | if (intex) NSLog(@"没有闭合");
37 | }
38 | appHtml = [appHtml stringByReplacingOccurrencesOfString:@"$LATEX$"
39 | withString:html];
40 | NSURL *baseURL = [NSURL fileURLWithPath:htmlPath];
41 | [self setDelegate:self];
42 | [self loadHTMLString:appHtml baseURL:baseURL];;
43 | }
44 |
45 | // 加载完成 这里主要用来计算高度
46 | -(void)webViewDidFinishLoad:(UIWebView *)webView{
47 | NSLog(@"获取到高度");
48 | CGRect frames = webView.frame;
49 | frames.size.height = 1;
50 | // webView.frame = frames;
51 | // CGSize fittingSize = [webView sizeThatFits:CGSizeZero];
52 | // frames.size = fittingSize;
53 | // frames.origin = CGPointMake(self.frame.origin.x, frames.origin.y);
54 | //
55 | // NSLog(@"webHeight = %.2f",frames.size.height);
56 | // if (self.laetxWebViewHeight) {
57 | // self.laetxWebViewHeight(frames.size.height);
58 | // }
59 | }
60 |
61 | @end
62 |
--------------------------------------------------------------------------------
/SwiftMath/SceneDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SceneDelegate.swift
3 | // SwiftMath
4 | //
5 | // Created by 付有芳 on 2019/12/23.
6 | // Copyright © 2019 付有芳. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class SceneDelegate: UIResponder, UIWindowSceneDelegate {
12 |
13 | var window: UIWindow?
14 |
15 |
16 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
17 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
18 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
19 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
20 | guard let _ = (scene as? UIWindowScene) else { return }
21 | }
22 |
23 | func sceneDidDisconnect(_ scene: UIScene) {
24 | // Called as the scene is being released by the system.
25 | // This occurs shortly after the scene enters the background, or when its session is discarded.
26 | // Release any resources associated with this scene that can be re-created the next time the scene connects.
27 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead).
28 | }
29 |
30 | func sceneDidBecomeActive(_ scene: UIScene) {
31 | // Called when the scene has moved from an inactive state to an active state.
32 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
33 | }
34 |
35 | func sceneWillResignActive(_ scene: UIScene) {
36 | // Called when the scene will move from an active state to an inactive state.
37 | // This may occur due to temporary interruptions (ex. an incoming phone call).
38 | }
39 |
40 | func sceneWillEnterForeground(_ scene: UIScene) {
41 | // Called as the scene transitions from the background to the foreground.
42 | // Use this method to undo the changes made on entering the background.
43 | }
44 |
45 | func sceneDidEnterBackground(_ scene: UIScene) {
46 | // Called as the scene transitions from the foreground to the background.
47 | // Use this method to save data, release shared resources, and store enough scene-specific state information
48 | // to restore the scene back to its current state.
49 | }
50 |
51 |
52 | }
53 |
54 |
--------------------------------------------------------------------------------
/SwiftMath/WebView/WebViewModeCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // WebViewModeCell.swift
3 | // SwiftMath
4 | //
5 | // Created by 付有芳 on 2019/12/23.
6 | // Copyright © 2019 付有芳. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import WebKit
11 | import SnapKit
12 |
13 | class WebViewModeCell: UITableViewCell {
14 | var questionContentLoadFinish: (() -> Void)?
15 |
16 |
17 | var mathText: String? {
18 | didSet {
19 | if mathText == oldValue {
20 | return
21 | }
22 |
23 | refreshedTableView = false
24 | let htmlPath = Bundle.main.path(forResource: "katex/index", ofType: "html")
25 | let baseURL = NSURL.fileURL(withPath: htmlPath!)
26 |
27 | if mathText == nil {
28 | webView.loadHTMLString("", baseURL: baseURL)
29 | } else {
30 | var html: NSString = mathText! as NSString
31 | do {
32 | var appHtml = try NSString(contentsOfFile: htmlPath!, encoding: String.Encoding.utf8.rawValue)
33 | var r: NSRange = html.range(of: DEFAULT_DELIMITER)
34 | if r.location != NSNotFound {
35 | var index = false
36 | while r.location != NSNotFound {
37 | html = html.replacingCharacters(in: r, with: (index ? "" : "")) as NSString
38 | index = !index
39 | r = html.range(of: DEFAULT_DELIMITER)
40 | }
41 | if index {
42 | debugPrint("没有闭合")
43 | }
44 | appHtml = appHtml.replacingOccurrences(of: "$LATEX$", with: html as String) as NSString
45 |
46 | webView.loadHTMLString((appHtml as String), baseURL: baseURL)
47 |
48 | }
49 | } catch {
50 | }
51 | }
52 | }
53 | }
54 |
55 | var refreshedTableView: Bool = false
56 |
57 | private lazy var webView: WKWebView = {
58 | var webView = WKWebView()
59 | webView.navigationDelegate = self
60 | return webView
61 | }()
62 |
63 | override func awakeFromNib() {
64 | super.awakeFromNib()
65 | // Initialization code
66 | }
67 |
68 | override func setSelected(_ selected: Bool, animated: Bool) {
69 | super.setSelected(selected, animated: animated)
70 |
71 | // Configure the view for the selected state
72 | }
73 |
74 | override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
75 | super.init(style: style, reuseIdentifier: reuseIdentifier)
76 | selectionStyle = .none
77 | setupSubViews()
78 | }
79 |
80 | required init?(coder aDecoder: NSCoder) {
81 | fatalError("init(coder:) has not been implemented")
82 | }
83 |
84 | private func setupSubViews() {
85 | contentView.addSubview(webView)
86 |
87 | webView.snp.makeConstraints { (maker) in
88 | maker.edges.equalTo(UIEdgeInsets(top: 10, left: CGFloat(mathTextContentLeft), bottom: 10, right: CGFloat(mathTextContentRight)))
89 | maker.height.equalTo(20)
90 | }
91 | }
92 |
93 | var webViewScrollHeight: CGFloat = 20
94 |
95 | var cellHeight: CGFloat {
96 | return webViewScrollHeight + 20
97 | }
98 | }
99 |
100 | extension WebViewModeCell: WKNavigationDelegate {
101 | func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
102 |
103 | guard questionContentLoadFinish != nil else { return }
104 |
105 | guard !refreshedTableView else { return }
106 | // 当webview加载完成,计算并刷新高度
107 | webView.evaluateJavaScript("document.body.scrollHeight") { [weak self] (any, error) in
108 | // height就是加载完毕的webView的高度
109 | let height = any as! Int
110 |
111 | self?.webViewScrollHeight = CGFloat(height)
112 | // 调整webView高度
113 | self?.webView.snp.updateConstraints({ (maker) in
114 | maker.height.equalTo(height)
115 | })
116 | self?.questionContentLoadFinish?()
117 | self?.refreshedTableView = true
118 | }
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/SwiftMath/iosMath+YYLabel/iosMathModeCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // swift
3 | // SwiftMath
4 | //
5 | // Created by 付有芳 on 2019/12/23.
6 | // Copyright © 2019 付有芳. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import iosMath
11 | import YYText
12 | import SnapKit
13 |
14 | class iosMathModeCell: UITableViewCell {
15 |
16 | private static let regex = "\(DEFAULT_DELIMITER).*?\(DEFAULT_DELIMITER)"
17 | var mathText: String? {
18 | didSet {
19 |
20 | if mathText == nil {
21 | mathTextLabel.attributedText = nil
22 | } else {
23 | let result = RegularExpression(regex: iosMathModeCell.regex, validateString: mathText!)
24 |
25 | let text = NSMutableAttributedString()
26 | text.append(NSAttributedString(string: mathText!, attributes: [NSAttributedString.Key.font : mathTextContentFont]))
27 | if result.count > 0 {
28 | for item in result {
29 | let range: NSRange = (text.string as NSString).range(of: item)
30 | if range.location != NSNotFound {
31 | let label = createMathUILabel(latex: item.replacingOccurrences(of: DEFAULT_DELIMITER, with: ""))
32 | let attachment = NSMutableAttributedString.yy_attachmentString(withContent: label, contentMode: .center, attachmentSize: label.frame.size, alignTo: mathTextContentFont, alignment: .center)
33 | text.replaceCharacters(in: range, with: attachment)
34 | }
35 | }
36 | }
37 | mathTextLabel.attributedText = text
38 | }
39 | }
40 | }
41 |
42 | private func createMathUILabel(latex: String) -> MTMathUILabel {
43 | let label = MTMathUILabel()
44 | label.labelMode = .text
45 | label.textAlignment = .left
46 | label.fontSize = CGFloat(mathTextContentFontSize)
47 | label.textColor = mathTextContentColor
48 | label.latex = latex
49 | label.sizeToFit()
50 | return label
51 | }
52 |
53 |
54 | private lazy var contentScrollView: UIScrollView = {
55 | var scrollView = UIScrollView()
56 | return scrollView
57 | }()
58 |
59 | private lazy var mathTextLabel: YYLabel = {
60 | var label = YYLabel()
61 | label.numberOfLines = 0
62 | // 多行时,需要设置此属性才可以自动换行
63 | label.preferredMaxLayoutWidth = CGFloat(screenWidth - mathTextContentLeft - mathTextContentRight)
64 | label.textColor = mathTextContentColor
65 | label.font = mathTextContentFont
66 | return label
67 | }()
68 |
69 | override func awakeFromNib() {
70 | super.awakeFromNib()
71 | // Initialization code
72 | }
73 |
74 | override func setSelected(_ selected: Bool, animated: Bool) {
75 | super.setSelected(selected, animated: animated)
76 |
77 | // Configure the view for the selected state
78 | }
79 |
80 | override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
81 | super.init(style: style, reuseIdentifier: reuseIdentifier)
82 | selectionStyle = .none
83 | setupSubViews()
84 | }
85 |
86 | required init?(coder aDecoder: NSCoder) {
87 | fatalError("init(coder:) has not been implemented")
88 | }
89 |
90 | private func setupSubViews() {
91 | // 在 mathTextLabel 外层需要包一层 scrollView:
92 | // 因为当数学公式过长,一行显示不全的时候,lable 无法滚动显示,
93 | // 所以将 label 放入 scrollView 中,使其可以滚动显示
94 | contentView.addSubview(contentScrollView)
95 | contentScrollView.addSubview(mathTextLabel)
96 |
97 | contentScrollView.snp.makeConstraints { (maker) in
98 | maker.edges.equalTo(UIEdgeInsets(top: 10, left: CGFloat(mathTextContentLeft), bottom: 10, right: CGFloat(mathTextContentRight)))
99 | }
100 |
101 | mathTextLabel.snp.makeConstraints { (maker) in
102 | maker.left.right.top.bottom.height.equalToSuperview()
103 | }
104 | }
105 | }
106 |
107 | /// 正则匹配
108 | ///
109 | /// - Parameters:
110 | /// - regex: 匹配规则
111 | /// - validateString: 匹配对test象
112 | /// - Returns: 返回结果
113 | func RegularExpression(regex: String, validateString: String) -> [String] {
114 | do {
115 | let regex: NSRegularExpression = try NSRegularExpression(pattern: regex, options: [])
116 | let matches = regex.matches(in: validateString, options: [], range: NSMakeRange(0, validateString.count))
117 |
118 | var data = [String]()
119 | for item in matches {
120 | let string = (validateString as NSString).substring(with: item.range)
121 | data.append(string)
122 | }
123 |
124 | return data
125 | }
126 | catch {
127 | return []
128 | }
129 | }
130 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # Created by https://www.gitignore.io/api/swift,xcode,macos,appcode,cocoapods,objective-c
3 | # Edit at https://www.gitignore.io/?templates=swift,xcode,macos,appcode,cocoapods,objective-c
4 |
5 | ### AppCode ###
6 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
7 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
8 |
9 | # User-specific stuff
10 | .idea/**/workspace.xml
11 | .idea/**/tasks.xml
12 | .idea/**/usage.statistics.xml
13 | .idea/**/dictionaries
14 | .idea/**/shelf
15 |
16 | # Generated files
17 | .idea/**/contentModel.xml
18 |
19 | # Sensitive or high-churn files
20 | .idea/**/dataSources/
21 | .idea/**/dataSources.ids
22 | .idea/**/dataSources.local.xml
23 | .idea/**/sqlDataSources.xml
24 | .idea/**/dynamic.xml
25 | .idea/**/uiDesigner.xml
26 | .idea/**/dbnavigator.xml
27 |
28 | # Gradle
29 | .idea/**/gradle.xml
30 | .idea/**/libraries
31 |
32 | # Gradle and Maven with auto-import
33 | # When using Gradle or Maven with auto-import, you should exclude module files,
34 | # since they will be recreated, and may cause churn. Uncomment if using
35 | # auto-import.
36 | # .idea/modules.xml
37 | # .idea/*.iml
38 | # .idea/modules
39 | # *.iml
40 | # *.ipr
41 |
42 | # CMake
43 | cmake-build-*/
44 |
45 | # Mongo Explorer plugin
46 | .idea/**/mongoSettings.xml
47 |
48 | # File-based project format
49 | *.iws
50 |
51 | # IntelliJ
52 | out/
53 |
54 | # mpeltonen/sbt-idea plugin
55 | .idea_modules/
56 |
57 | # JIRA plugin
58 | atlassian-ide-plugin.xml
59 |
60 | # Cursive Clojure plugin
61 | .idea/replstate.xml
62 |
63 | # Crashlytics plugin (for Android Studio and IntelliJ)
64 | com_crashlytics_export_strings.xml
65 | crashlytics.properties
66 | crashlytics-build.properties
67 | fabric.properties
68 |
69 | # Editor-based Rest Client
70 | .idea/httpRequests
71 |
72 | # Android studio 3.1+ serialized cache file
73 | .idea/caches/build_file_checksums.ser
74 |
75 | ### AppCode Patch ###
76 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
77 |
78 | # *.iml
79 | # modules.xml
80 | # .idea/misc.xml
81 | # *.ipr
82 |
83 | # Sonarlint plugin
84 | .idea/**/sonarlint/
85 |
86 | # SonarQube Plugin
87 | .idea/**/sonarIssues.xml
88 |
89 | # Markdown Navigator plugin
90 | .idea/**/markdown-navigator.xml
91 | .idea/**/markdown-navigator/
92 |
93 | ### CocoaPods ###
94 | ## CocoaPods GitIgnore Template
95 |
96 | # CocoaPods - Only use to conserve bandwidth / Save time on Pushing
97 | # - Also handy if you have a large number of dependant pods
98 | # - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGNORE THE LOCK FILE
99 | Pods/
100 |
101 | ### macOS ###
102 | # General
103 | .DS_Store
104 | .AppleDouble
105 | .LSOverride
106 |
107 | # Icon must end with two \r
108 | Icon
109 |
110 | # Thumbnails
111 | ._*
112 |
113 | # Files that might appear in the root of a volume
114 | .DocumentRevisions-V100
115 | .fseventsd
116 | .Spotlight-V100
117 | .TemporaryItems
118 | .Trashes
119 | .VolumeIcon.icns
120 | .com.apple.timemachine.donotpresent
121 |
122 | # Directories potentially created on remote AFP share
123 | .AppleDB
124 | .AppleDesktop
125 | Network Trash Folder
126 | Temporary Items
127 | .apdisk
128 |
129 | ### Objective-C ###
130 | # Xcode
131 | #
132 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
133 |
134 | ## Build generated
135 | build/
136 | DerivedData/
137 |
138 | ## Various settings
139 | *.pbxuser
140 | !default.pbxuser
141 | *.mode1v3
142 | !default.mode1v3
143 | *.mode2v3
144 | !default.mode2v3
145 | *.perspectivev3
146 | !default.perspectivev3
147 | xcuserdata/
148 |
149 | ## Other
150 | *.moved-aside
151 | *.xccheckout
152 | *.xcscmblueprint
153 |
154 | ## Obj-C/Swift specific
155 | *.hmap
156 | *.ipa
157 | *.dSYM.zip
158 | *.dSYM
159 |
160 | # CocoaPods
161 | # We recommend against adding the Pods directory to your .gitignore. However
162 | # you should judge for yourself, the pros and cons are mentioned at:
163 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
164 | # Pods/
165 | # Add this line if you want to avoid checking in source code from the Xcode workspace
166 | # *.xcworkspace
167 |
168 | # Carthage
169 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
170 | # Carthage/Checkouts
171 |
172 | Carthage/Build
173 |
174 | # fastlane
175 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
176 | # screenshots whenever they are needed.
177 | # For more information about the recommended setup visit:
178 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
179 |
180 | fastlane/report.xml
181 | fastlane/Preview.html
182 | fastlane/screenshots/**/*.png
183 | fastlane/test_output
184 |
185 | # Code Injection
186 | # After new code Injection tools there's a generated folder /iOSInjectionProject
187 | # https://github.com/johnno1962/injectionforxcode
188 |
189 | iOSInjectionProject/
190 |
191 | ### Objective-C Patch ###
192 |
193 | ### Swift ###
194 | # Xcode
195 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
196 |
197 |
198 |
199 |
200 |
201 | ## Playgrounds
202 | timeline.xctimeline
203 | playground.xcworkspace
204 |
205 | # Swift Package Manager
206 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
207 | # Packages/
208 | # Package.pins
209 | # Package.resolved
210 | .build/
211 | # Add this line if you want to avoid checking in Xcode SPM integration.
212 | # .swiftpm/xcode
213 |
214 | # CocoaPods
215 | # We recommend against adding the Pods directory to your .gitignore. However
216 | # you should judge for yourself, the pros and cons are mentioned at:
217 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
218 | # Pods/
219 | # Add this line if you want to avoid checking in source code from the Xcode workspace
220 | # *.xcworkspace
221 |
222 | # Carthage
223 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
224 | # Carthage/Checkouts
225 |
226 |
227 | # Accio dependency management
228 | Dependencies/
229 | .accio/
230 |
231 | # fastlane
232 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
233 | # screenshots whenever they are needed.
234 | # For more information about the recommended setup visit:
235 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
236 |
237 |
238 | # Code Injection
239 | # After new code Injection tools there's a generated folder /iOSInjectionProject
240 | # https://github.com/johnno1962/injectionforxcode
241 |
242 |
243 | ### Xcode ###
244 | # Xcode
245 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
246 |
247 | ## User settings
248 |
249 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
250 |
251 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
252 |
253 | ## Xcode Patch
254 | *.xcodeproj/*
255 | !*.xcodeproj/project.pbxproj
256 | !*.xcodeproj/xcshareddata/
257 | !*.xcworkspace/contents.xcworkspacedata
258 | /*.gcno
259 |
260 | ### Xcode Patch ###
261 | **/xcshareddata/WorkspaceSettings.xcsettings
262 |
263 | # End of https://www.gitignore.io/api/swift,xcode,macos,appcode,cocoapods,objective-c
264 |
--------------------------------------------------------------------------------
/SwiftMath/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
--------------------------------------------------------------------------------
/SwiftMath/WebView/katex/katex.min.css:
--------------------------------------------------------------------------------
1 | .katex{font:400 1.21em KaTeX_Main;line-height:1.2;white-space:nowrap}.katex .base,.katex .katex-inner,.katex .strut{display:inline-block}.katex .mathit{font-family:KaTeX_Math;font-style:italic}.katex .amsrm{font-family:KaTeX_AMS}.katex .textstyle>.mord+.mop{margin-left:.16667em}.katex .textstyle>.mord+.mbin{margin-left:.22222em}.katex .textstyle>.mord+.mrel{margin-left:.27778em}.katex .textstyle>.mop+.mop,.katex .textstyle>.mop+.mord,.katex .textstyle>.mord+.minner{margin-left:.16667em}.katex .textstyle>.mop+.mrel{margin-left:.27778em}.katex .textstyle>.mop+.minner{margin-left:.16667em}.katex .textstyle>.mbin+.minner,.katex .textstyle>.mbin+.mop,.katex .textstyle>.mbin+.mopen,.katex .textstyle>.mbin+.mord{margin-left:.22222em}.katex .textstyle>.mrel+.minner,.katex .textstyle>.mrel+.mop,.katex .textstyle>.mrel+.mopen,.katex .textstyle>.mrel+.mord{margin-left:.27778em}.katex .textstyle>.mclose+.mop{margin-left:.16667em}.katex .textstyle>.mclose+.mbin{margin-left:.22222em}.katex .textstyle>.mclose+.mrel{margin-left:.27778em}.katex .textstyle>.mclose+.minner,.katex .textstyle>.minner+.mop,.katex .textstyle>.minner+.mord,.katex .textstyle>.mpunct+.mclose,.katex .textstyle>.mpunct+.minner,.katex .textstyle>.mpunct+.mop,.katex .textstyle>.mpunct+.mopen,.katex .textstyle>.mpunct+.mord,.katex .textstyle>.mpunct+.mpunct,.katex .textstyle>.mpunct+.mrel{margin-left:.16667em}.katex .textstyle>.minner+.mbin{margin-left:.22222em}.katex .textstyle>.minner+.mrel{margin-left:.27778em}.katex .mclose+.mop,.katex .minner+.mop,.katex .mop+.mop,.katex .mop+.mord,.katex .mord+.mop,.katex .textstyle>.minner+.minner,.katex .textstyle>.minner+.mopen,.katex .textstyle>.minner+.mpunct{margin-left:.16667em}.katex .reset-textstyle.textstyle{font-size:1em}.katex .reset-textstyle.scriptstyle{font-size:.7em}.katex .reset-textstyle.scriptscriptstyle{font-size:.5em}.katex .reset-scriptstyle.textstyle{font-size:1.42857em}.katex .reset-scriptstyle.scriptstyle{font-size:1em}.katex .reset-scriptstyle.scriptscriptstyle{font-size:.71429em}.katex .reset-scriptscriptstyle.textstyle{font-size:2em}.katex .reset-scriptscriptstyle.scriptstyle{font-size:1.4em}.katex .reset-scriptscriptstyle.scriptscriptstyle{font-size:1em}.katex .style-wrap{position:relative}.katex .vlist{display:inline-block}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist .baseline-fix{display:inline-table;table-layout:fixed}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{width:100%}.katex .mfrac .frac-line:before{border-bottom-style:solid;border-bottom-width:1px;content:"";display:block}.katex .mfrac .frac-line:after{border-bottom-style:solid;border-bottom-width:.04em;content:"";display:block;margin-top:-1px}.katex .mspace{display:inline-block}.katex .mspace.negativethinspace{margin-left:-.16667em}.katex .mspace.thinspace{width:.16667em}.katex .mspace.mediumspace{width:.22222em}.katex .mspace.thickspace{width:.27778em}.katex .mspace.enspace{width:.5em}.katex .mspace.quad{width:1em}.katex .mspace.qquad{width:2em}.katex .llap,.katex .rlap{width:0;position:relative}.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .rlap>.inner{left:0}.katex .katex-logo .a{font-size:.75em;margin-left:-.32em;position:relative;top:-.2em}.katex .katex-logo .t{margin-left:-.23em}.katex .katex-logo .e{margin-left:-.1667em;position:relative;top:.2155em}.katex .katex-logo .x{margin-left:-.125em}.katex .rule{display:inline-block;border-style:solid}.katex .overline .overline-line{width:100%}.katex .overline .overline-line:before{border-bottom-style:solid;border-bottom-width:1px;content:"";display:block}.katex .overline .overline-line:after{border-bottom-style:solid;border-bottom-width:.04em;content:"";display:block;margin-top:-1px}.katex .sqrt>.sqrt-sign{position:relative}.katex .sqrt .sqrt-line{width:100%}.katex .sqrt .sqrt-line:before{border-bottom-style:solid;border-bottom-width:1px;content:"";display:block}.katex .sqrt .sqrt-line:after{border-bottom-style:solid;border-bottom-width:.04em;content:"";display:block;margin-top:-1px}.katex .fontsize-ensurer,.katex .sizing{display:inline-block}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:2em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:3.46em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:4.14em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.98em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.7142857142857143em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.142857142857143em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.2857142857142858em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.4285714285714286em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.7142857142857144em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2.0571428571428574em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4714285714285715em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.9571428571428573em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.557142857142858em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8749999999999999em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.125em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.25em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4999999999999998em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7999999999999998em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.1624999999999996em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.5874999999999995em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:3.1125000000000003em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.5555555555555556em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.7777777777777777em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.888888888888889em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.1111111111111112em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.3333333333333333em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5999999999999999em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.922222222222222em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.3em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.766666666666667em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.7em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.8em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.9em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.2em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.44em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.73em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:2.07em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.49em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.4166666666666667em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.5833333333333334em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.6666666666666667em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.75em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.8333333333333334em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.4416666666666667em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.7249999999999999em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.075em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.3472222222222222em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.4861111111111111em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5555555555555556em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.625em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.6944444444444444em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333333334em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2013888888888888em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.4375em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.729166666666667em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.28901734104046245em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.40462427745664736em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.46242774566473993em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5202312138728324em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.5780346820809249em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6936416184971098em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8323699421965318em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.1965317919075145em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4393063583815031em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.24154589371980678em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.33816425120772947em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.38647342995169087em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.4347826086956522em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.48309178743961356em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5797101449275363em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6956521739130435em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8357487922705314em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.202898550724638em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2008032128514056em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2811244979919678em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.321285140562249em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3614457831325301em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4016064257028112em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48192771084337344em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5783132530120482em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6947791164658634em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8313253012048192em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist>span,.katex .op-limits>.vlist>span{text-align:center}.katex .accent .accent-body>span{width:0}.katex .accent .accent-body.accent-vec>span{position:relative;left:.326em}@font-face{font-family:KaTeX_AMS;src:url(fonts/KaTeX_AMS-Regular.eot);src:url(fonts/KaTeX_AMS-Regular.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_AMS-Regular.woff) format('woff'),url(fonts/KaTeX_AMS-Regular.ttf) format('truetype');font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Caligraphic;src:url(fonts/KaTeX_Caligraphic-Bold.eot);src:url(fonts/KaTeX_Caligraphic-Bold.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_Caligraphic-Bold.woff) format('woff'),url(fonts/KaTeX_Caligraphic-Bold.ttf) format('truetype');font-weight:700;font-style:normal}@font-face{font-family:KaTeX_Caligraphic;src:url(fonts/KaTeX_Caligraphic-Regular.eot);src:url(fonts/KaTeX_Caligraphic-Regular.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_Caligraphic-Regular.woff) format('woff'),url(fonts/KaTeX_Caligraphic-Regular.ttf) format('truetype');font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Fraktur;src:url(fonts/KaTeX_Fraktur-Bold.eot);src:url(fonts/KaTeX_Fraktur-Bold.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_Fraktur-Bold.woff) format('woff'),url(fonts/KaTeX_Fraktur-Bold.ttf) format('truetype');font-weight:700;font-style:normal}@font-face{font-family:KaTeX_Fraktur;src:url(fonts/KaTeX_Fraktur-Regular.eot);src:url(fonts/KaTeX_Fraktur-Regular.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_Fraktur-Regular.woff) format('woff'),url(fonts/KaTeX_Fraktur-Regular.ttf) format('truetype');font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Greek;src:url(fonts/KaTeX_Greek-Bold.eot);src:url(fonts/KaTeX_Greek-Bold.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_Greek-Bold.woff) format('woff'),url(fonts/KaTeX_Greek-Bold.ttf) format('truetype');font-weight:700;font-style:normal}@font-face{font-family:KaTeX_Greek;src:url(fonts/KaTeX_Greek-BoldItalic.eot);src:url(fonts/KaTeX_Greek-BoldItalic.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_Greek-BoldItalic.woff) format('woff'),url(fonts/KaTeX_Greek-BoldItalic.ttf) format('truetype');font-weight:700;font-style:italic}@font-face{font-family:KaTeX_Greek;src:url(fonts/KaTeX_Greek-Italic.eot);src:url(fonts/KaTeX_Greek-Italic.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_Greek-Italic.woff) format('woff'),url(fonts/KaTeX_Greek-Italic.ttf) format('truetype');font-weight:400;font-style:italic}@font-face{font-family:KaTeX_Greek;src:url(fonts/KaTeX_Greek-Regular.eot);src:url(fonts/KaTeX_Greek-Regular.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_Greek-Regular.woff) format('woff'),url(fonts/KaTeX_Greek-Regular.ttf) format('truetype');font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Bold.eot);src:url(fonts/KaTeX_Main-Bold.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_Main-Bold.woff) format('woff'),url(fonts/KaTeX_Main-Bold.ttf) format('truetype');font-weight:700;font-style:normal}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Italic.eot);src:url(fonts/KaTeX_Main-Italic.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_Main-Italic.woff) format('woff'),url(fonts/KaTeX_Main-Italic.ttf) format('truetype');font-weight:400;font-style:italic}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Regular.eot);src:url(fonts/KaTeX_Main-Regular.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_Main-Regular.woff) format('woff'),url(fonts/KaTeX_Main-Regular.ttf) format('truetype');font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Math;src:url(fonts/KaTeX_Math-BoldItalic.eot);src:url(fonts/KaTeX_Math-BoldItalic.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_Math-BoldItalic.woff) format('woff'),url(fonts/KaTeX_Math-BoldItalic.ttf) format('truetype');font-weight:700;font-style:italic}@font-face{font-family:KaTeX_Math;src:url(fonts/KaTeX_Math-Italic.eot);src:url(fonts/KaTeX_Math-Italic.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_Math-Italic.woff) format('woff'),url(fonts/KaTeX_Math-Italic.ttf) format('truetype');font-weight:400;font-style:italic}@font-face{font-family:KaTeX_Math;src:url(fonts/KaTeX_Math-Regular.eot);src:url(fonts/KaTeX_Math-Regular.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_Math-Regular.woff) format('woff'),url(fonts/KaTeX_Math-Regular.ttf) format('truetype');font-weight:400;font-style:normal}@font-face{font-family:KaTeX_SansSerif;src:url(fonts/KaTeX_SansSerif-Bold.eot);src:url(fonts/KaTeX_SansSerif-Bold.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_SansSerif-Bold.woff) format('woff'),url(fonts/KaTeX_SansSerif-Bold.ttf) format('truetype');font-weight:700;font-style:normal}@font-face{font-family:KaTeX_SansSerif;src:url(fonts/KaTeX_SansSerif-Italic.eot);src:url(fonts/KaTeX_SansSerif-Italic.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_SansSerif-Italic.woff) format('woff'),url(fonts/KaTeX_SansSerif-Italic.ttf) format('truetype');font-weight:400;font-style:italic}@font-face{font-family:KaTeX_SansSerif;src:url(fonts/KaTeX_SansSerif-Regular.eot);src:url(fonts/KaTeX_SansSerif-Regular.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_SansSerif-Regular.woff) format('woff'),url(fonts/KaTeX_SansSerif-Regular.ttf) format('truetype');font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Script;src:url(fonts/KaTeX_Script-Regular.eot);src:url(fonts/KaTeX_Script-Regular.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_Script-Regular.woff) format('woff'),url(fonts/KaTeX_Script-Regular.ttf) format('truetype');font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Size1;src:url(fonts/KaTeX_Size1-Regular.eot);src:url(fonts/KaTeX_Size1-Regular.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_Size1-Regular.woff) format('woff'),url(fonts/KaTeX_Size1-Regular.ttf) format('truetype');font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Size2;src:url(fonts/KaTeX_Size2-Regular.eot);src:url(fonts/KaTeX_Size2-Regular.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_Size2-Regular.woff) format('woff'),url(fonts/KaTeX_Size2-Regular.ttf) format('truetype');font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Size3;src:url(fonts/KaTeX_Size3-Regular.eot);src:url(fonts/KaTeX_Size3-Regular.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_Size3-Regular.woff) format('woff'),url(fonts/KaTeX_Size3-Regular.ttf) format('truetype');font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Size4;src:url(fonts/KaTeX_Size4-Regular.eot);src:url(fonts/KaTeX_Size4-Regular.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_Size4-Regular.woff) format('woff'),url(fonts/KaTeX_Size4-Regular.ttf) format('truetype');font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Typewriter;src:url(fonts/KaTeX_Typewriter-Regular.eot);src:url(fonts/KaTeX_Typewriter-Regular.eot?#iefix) format('embedded-opentype'),url(fonts/KaTeX_Typewriter-Regular.woff) format('woff'),url(fonts/KaTeX_Typewriter-Regular.ttf) format('truetype');font-weight:400;font-style:normal}
--------------------------------------------------------------------------------
/SwiftMath.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 51;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 02420A348CCBAC4042EC4C99 /* Pods_SwiftMath.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 48F00E4F1E9E542E01F4D1C8 /* Pods_SwiftMath.framework */; };
11 | 2F3E90DE6FB6240858394C29 /* Pods_SwiftMath_SwiftMathUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F6BC461BFFBAE49576E4F62 /* Pods_SwiftMath_SwiftMathUITests.framework */; };
12 | AE41EF7F55DAC2705F5ECD73 /* Pods_SwiftMathTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20BAAD1F98EC0BD3E37F4439 /* Pods_SwiftMathTests.framework */; };
13 | C5DF355023B0A07F0004D751 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5DF354F23B0A07F0004D751 /* AppDelegate.swift */; };
14 | C5DF355223B0A07F0004D751 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5DF355123B0A07F0004D751 /* SceneDelegate.swift */; };
15 | C5DF355423B0A07F0004D751 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5DF355323B0A07F0004D751 /* ViewController.swift */; };
16 | C5DF355723B0A07F0004D751 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C5DF355523B0A07F0004D751 /* Main.storyboard */; };
17 | C5DF355923B0A0810004D751 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C5DF355823B0A0810004D751 /* Assets.xcassets */; };
18 | C5DF355C23B0A0810004D751 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C5DF355A23B0A0810004D751 /* LaunchScreen.storyboard */; };
19 | C5DF356723B0A0810004D751 /* SwiftMathTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5DF356623B0A0810004D751 /* SwiftMathTests.swift */; };
20 | C5DF357223B0A0810004D751 /* SwiftMathUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5DF357123B0A0810004D751 /* SwiftMathUITests.swift */; };
21 | C5DF358223B0A1C00004D751 /* WebViewModeController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5DF358123B0A1C00004D751 /* WebViewModeController.swift */; };
22 | C5DF358423B0A1FA0004D751 /* iosMathModeController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5DF358323B0A1FA0004D751 /* iosMathModeController.swift */; };
23 | C5DF358723B0A2540004D751 /* iosMathModeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5DF358623B0A2540004D751 /* iosMathModeCell.swift */; };
24 | C5DF358923B0A2C60004D751 /* WebViewModeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5DF358823B0A2C60004D751 /* WebViewModeCell.swift */; };
25 | C5DF358B23B0A6060004D751 /* MathText.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5DF358A23B0A6060004D751 /* MathText.swift */; };
26 | C5DF358E23B0AB8F0004D751 /* katex in Resources */ = {isa = PBXBuildFile; fileRef = C5DF358D23B0AB8F0004D751 /* katex */; };
27 | /* End PBXBuildFile section */
28 |
29 | /* Begin PBXContainerItemProxy section */
30 | C5DF356323B0A0810004D751 /* PBXContainerItemProxy */ = {
31 | isa = PBXContainerItemProxy;
32 | containerPortal = C5DF354423B0A07F0004D751 /* Project object */;
33 | proxyType = 1;
34 | remoteGlobalIDString = C5DF354B23B0A07F0004D751;
35 | remoteInfo = SwiftMath;
36 | };
37 | C5DF356E23B0A0810004D751 /* PBXContainerItemProxy */ = {
38 | isa = PBXContainerItemProxy;
39 | containerPortal = C5DF354423B0A07F0004D751 /* Project object */;
40 | proxyType = 1;
41 | remoteGlobalIDString = C5DF354B23B0A07F0004D751;
42 | remoteInfo = SwiftMath;
43 | };
44 | /* End PBXContainerItemProxy section */
45 |
46 | /* Begin PBXFileReference section */
47 | 125A0A3D2C32AC9D08296582 /* Pods-SwiftMath.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftMath.debug.xcconfig"; path = "Target Support Files/Pods-SwiftMath/Pods-SwiftMath.debug.xcconfig"; sourceTree = ""; };
48 | 15D34D78A4502E5108EB90EE /* Pods-SwiftMathTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftMathTests.debug.xcconfig"; path = "Target Support Files/Pods-SwiftMathTests/Pods-SwiftMathTests.debug.xcconfig"; sourceTree = ""; };
49 | 20BAAD1F98EC0BD3E37F4439 /* Pods_SwiftMathTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftMathTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
50 | 48F00E4F1E9E542E01F4D1C8 /* Pods_SwiftMath.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftMath.framework; sourceTree = BUILT_PRODUCTS_DIR; };
51 | 7F6BC461BFFBAE49576E4F62 /* Pods_SwiftMath_SwiftMathUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftMath_SwiftMathUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
52 | A837BFE08BEE1F9A48532508 /* Pods-SwiftMath-SwiftMathUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftMath-SwiftMathUITests.release.xcconfig"; path = "Target Support Files/Pods-SwiftMath-SwiftMathUITests/Pods-SwiftMath-SwiftMathUITests.release.xcconfig"; sourceTree = ""; };
53 | B7A13CA7007C48879B2DD38C /* Pods-SwiftMath.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftMath.release.xcconfig"; path = "Target Support Files/Pods-SwiftMath/Pods-SwiftMath.release.xcconfig"; sourceTree = ""; };
54 | C18664232ED7333B693027C4 /* Pods-SwiftMath-SwiftMathUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftMath-SwiftMathUITests.debug.xcconfig"; path = "Target Support Files/Pods-SwiftMath-SwiftMathUITests/Pods-SwiftMath-SwiftMathUITests.debug.xcconfig"; sourceTree = ""; };
55 | C5DF354C23B0A07F0004D751 /* SwiftMath.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftMath.app; sourceTree = BUILT_PRODUCTS_DIR; };
56 | C5DF354F23B0A07F0004D751 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
57 | C5DF355123B0A07F0004D751 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; };
58 | C5DF355323B0A07F0004D751 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
59 | C5DF355623B0A07F0004D751 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
60 | C5DF355823B0A0810004D751 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
61 | C5DF355B23B0A0810004D751 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
62 | C5DF355D23B0A0810004D751 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
63 | C5DF356223B0A0810004D751 /* SwiftMathTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftMathTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
64 | C5DF356623B0A0810004D751 /* SwiftMathTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftMathTests.swift; sourceTree = ""; };
65 | C5DF356823B0A0810004D751 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
66 | C5DF356D23B0A0810004D751 /* SwiftMathUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftMathUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
67 | C5DF357123B0A0810004D751 /* SwiftMathUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftMathUITests.swift; sourceTree = ""; };
68 | C5DF357323B0A0810004D751 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
69 | C5DF358123B0A1C00004D751 /* WebViewModeController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViewModeController.swift; sourceTree = ""; };
70 | C5DF358323B0A1FA0004D751 /* iosMathModeController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iosMathModeController.swift; sourceTree = ""; };
71 | C5DF358623B0A2540004D751 /* iosMathModeCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iosMathModeCell.swift; sourceTree = ""; };
72 | C5DF358823B0A2C60004D751 /* WebViewModeCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViewModeCell.swift; sourceTree = ""; };
73 | C5DF358A23B0A6060004D751 /* MathText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MathText.swift; sourceTree = ""; };
74 | C5DF358D23B0AB8F0004D751 /* katex */ = {isa = PBXFileReference; lastKnownFileType = folder; path = katex; sourceTree = ""; };
75 | F47127282447D60A7C68F457 /* Pods-SwiftMathTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftMathTests.release.xcconfig"; path = "Target Support Files/Pods-SwiftMathTests/Pods-SwiftMathTests.release.xcconfig"; sourceTree = ""; };
76 | /* End PBXFileReference section */
77 |
78 | /* Begin PBXFrameworksBuildPhase section */
79 | C5DF354923B0A07F0004D751 /* Frameworks */ = {
80 | isa = PBXFrameworksBuildPhase;
81 | buildActionMask = 2147483647;
82 | files = (
83 | 02420A348CCBAC4042EC4C99 /* Pods_SwiftMath.framework in Frameworks */,
84 | );
85 | runOnlyForDeploymentPostprocessing = 0;
86 | };
87 | C5DF355F23B0A0810004D751 /* Frameworks */ = {
88 | isa = PBXFrameworksBuildPhase;
89 | buildActionMask = 2147483647;
90 | files = (
91 | AE41EF7F55DAC2705F5ECD73 /* Pods_SwiftMathTests.framework in Frameworks */,
92 | );
93 | runOnlyForDeploymentPostprocessing = 0;
94 | };
95 | C5DF356A23B0A0810004D751 /* Frameworks */ = {
96 | isa = PBXFrameworksBuildPhase;
97 | buildActionMask = 2147483647;
98 | files = (
99 | 2F3E90DE6FB6240858394C29 /* Pods_SwiftMath_SwiftMathUITests.framework in Frameworks */,
100 | );
101 | runOnlyForDeploymentPostprocessing = 0;
102 | };
103 | /* End PBXFrameworksBuildPhase section */
104 |
105 | /* Begin PBXGroup section */
106 | 32F84C764466842D41A6052A /* Pods */ = {
107 | isa = PBXGroup;
108 | children = (
109 | 125A0A3D2C32AC9D08296582 /* Pods-SwiftMath.debug.xcconfig */,
110 | B7A13CA7007C48879B2DD38C /* Pods-SwiftMath.release.xcconfig */,
111 | C18664232ED7333B693027C4 /* Pods-SwiftMath-SwiftMathUITests.debug.xcconfig */,
112 | A837BFE08BEE1F9A48532508 /* Pods-SwiftMath-SwiftMathUITests.release.xcconfig */,
113 | 15D34D78A4502E5108EB90EE /* Pods-SwiftMathTests.debug.xcconfig */,
114 | F47127282447D60A7C68F457 /* Pods-SwiftMathTests.release.xcconfig */,
115 | );
116 | path = Pods;
117 | sourceTree = "";
118 | };
119 | 9A096A1BFE2BF267C5C48066 /* Frameworks */ = {
120 | isa = PBXGroup;
121 | children = (
122 | 48F00E4F1E9E542E01F4D1C8 /* Pods_SwiftMath.framework */,
123 | 7F6BC461BFFBAE49576E4F62 /* Pods_SwiftMath_SwiftMathUITests.framework */,
124 | 20BAAD1F98EC0BD3E37F4439 /* Pods_SwiftMathTests.framework */,
125 | );
126 | name = Frameworks;
127 | sourceTree = "";
128 | };
129 | C5DF354323B0A07F0004D751 = {
130 | isa = PBXGroup;
131 | children = (
132 | C5DF354E23B0A07F0004D751 /* SwiftMath */,
133 | C5DF356523B0A0810004D751 /* SwiftMathTests */,
134 | C5DF357023B0A0810004D751 /* SwiftMathUITests */,
135 | C5DF354D23B0A07F0004D751 /* Products */,
136 | 32F84C764466842D41A6052A /* Pods */,
137 | 9A096A1BFE2BF267C5C48066 /* Frameworks */,
138 | );
139 | sourceTree = "";
140 | };
141 | C5DF354D23B0A07F0004D751 /* Products */ = {
142 | isa = PBXGroup;
143 | children = (
144 | C5DF354C23B0A07F0004D751 /* SwiftMath.app */,
145 | C5DF356223B0A0810004D751 /* SwiftMathTests.xctest */,
146 | C5DF356D23B0A0810004D751 /* SwiftMathUITests.xctest */,
147 | );
148 | name = Products;
149 | sourceTree = "";
150 | };
151 | C5DF354E23B0A07F0004D751 /* SwiftMath */ = {
152 | isa = PBXGroup;
153 | children = (
154 | C5DF358C23B0A6230004D751 /* Common */,
155 | C5DF358023B0A1530004D751 /* iosMath+YYLabel */,
156 | C5DF357F23B0A14E0004D751 /* WebView */,
157 | C5DF354F23B0A07F0004D751 /* AppDelegate.swift */,
158 | C5DF355123B0A07F0004D751 /* SceneDelegate.swift */,
159 | C5DF355323B0A07F0004D751 /* ViewController.swift */,
160 | C5DF355523B0A07F0004D751 /* Main.storyboard */,
161 | C5DF355823B0A0810004D751 /* Assets.xcassets */,
162 | C5DF355A23B0A0810004D751 /* LaunchScreen.storyboard */,
163 | C5DF355D23B0A0810004D751 /* Info.plist */,
164 | );
165 | path = SwiftMath;
166 | sourceTree = "";
167 | };
168 | C5DF356523B0A0810004D751 /* SwiftMathTests */ = {
169 | isa = PBXGroup;
170 | children = (
171 | C5DF356623B0A0810004D751 /* SwiftMathTests.swift */,
172 | C5DF356823B0A0810004D751 /* Info.plist */,
173 | );
174 | path = SwiftMathTests;
175 | sourceTree = "";
176 | };
177 | C5DF357023B0A0810004D751 /* SwiftMathUITests */ = {
178 | isa = PBXGroup;
179 | children = (
180 | C5DF357123B0A0810004D751 /* SwiftMathUITests.swift */,
181 | C5DF357323B0A0810004D751 /* Info.plist */,
182 | );
183 | path = SwiftMathUITests;
184 | sourceTree = "";
185 | };
186 | C5DF357F23B0A14E0004D751 /* WebView */ = {
187 | isa = PBXGroup;
188 | children = (
189 | C5DF358D23B0AB8F0004D751 /* katex */,
190 | C5DF358123B0A1C00004D751 /* WebViewModeController.swift */,
191 | C5DF358823B0A2C60004D751 /* WebViewModeCell.swift */,
192 | );
193 | path = WebView;
194 | sourceTree = "";
195 | };
196 | C5DF358023B0A1530004D751 /* iosMath+YYLabel */ = {
197 | isa = PBXGroup;
198 | children = (
199 | C5DF358323B0A1FA0004D751 /* iosMathModeController.swift */,
200 | C5DF358623B0A2540004D751 /* iosMathModeCell.swift */,
201 | );
202 | path = "iosMath+YYLabel";
203 | sourceTree = "";
204 | };
205 | C5DF358C23B0A6230004D751 /* Common */ = {
206 | isa = PBXGroup;
207 | children = (
208 | C5DF358A23B0A6060004D751 /* MathText.swift */,
209 | );
210 | path = Common;
211 | sourceTree = "";
212 | };
213 | /* End PBXGroup section */
214 |
215 | /* Begin PBXNativeTarget section */
216 | C5DF354B23B0A07F0004D751 /* SwiftMath */ = {
217 | isa = PBXNativeTarget;
218 | buildConfigurationList = C5DF357623B0A0810004D751 /* Build configuration list for PBXNativeTarget "SwiftMath" */;
219 | buildPhases = (
220 | FADBF0746B07BD6C04ECB2DA /* [CP] Check Pods Manifest.lock */,
221 | C5DF354823B0A07F0004D751 /* Sources */,
222 | C5DF354923B0A07F0004D751 /* Frameworks */,
223 | C5DF354A23B0A07F0004D751 /* Resources */,
224 | 0029AD9DCD46E517A267714F /* [CP] Embed Pods Frameworks */,
225 | );
226 | buildRules = (
227 | );
228 | dependencies = (
229 | );
230 | name = SwiftMath;
231 | productName = SwiftMath;
232 | productReference = C5DF354C23B0A07F0004D751 /* SwiftMath.app */;
233 | productType = "com.apple.product-type.application";
234 | };
235 | C5DF356123B0A0810004D751 /* SwiftMathTests */ = {
236 | isa = PBXNativeTarget;
237 | buildConfigurationList = C5DF357923B0A0810004D751 /* Build configuration list for PBXNativeTarget "SwiftMathTests" */;
238 | buildPhases = (
239 | DF4706B7BD7DEE3AE5BA374E /* [CP] Check Pods Manifest.lock */,
240 | C5DF355E23B0A0810004D751 /* Sources */,
241 | C5DF355F23B0A0810004D751 /* Frameworks */,
242 | C5DF356023B0A0810004D751 /* Resources */,
243 | );
244 | buildRules = (
245 | );
246 | dependencies = (
247 | C5DF356423B0A0810004D751 /* PBXTargetDependency */,
248 | );
249 | name = SwiftMathTests;
250 | productName = SwiftMathTests;
251 | productReference = C5DF356223B0A0810004D751 /* SwiftMathTests.xctest */;
252 | productType = "com.apple.product-type.bundle.unit-test";
253 | };
254 | C5DF356C23B0A0810004D751 /* SwiftMathUITests */ = {
255 | isa = PBXNativeTarget;
256 | buildConfigurationList = C5DF357C23B0A0810004D751 /* Build configuration list for PBXNativeTarget "SwiftMathUITests" */;
257 | buildPhases = (
258 | 7EC8B7A22C54DC6EE2697B3D /* [CP] Check Pods Manifest.lock */,
259 | C5DF356923B0A0810004D751 /* Sources */,
260 | C5DF356A23B0A0810004D751 /* Frameworks */,
261 | C5DF356B23B0A0810004D751 /* Resources */,
262 | 7F34BDAA3BDF683AA433136C /* [CP] Embed Pods Frameworks */,
263 | );
264 | buildRules = (
265 | );
266 | dependencies = (
267 | C5DF356F23B0A0810004D751 /* PBXTargetDependency */,
268 | );
269 | name = SwiftMathUITests;
270 | productName = SwiftMathUITests;
271 | productReference = C5DF356D23B0A0810004D751 /* SwiftMathUITests.xctest */;
272 | productType = "com.apple.product-type.bundle.ui-testing";
273 | };
274 | /* End PBXNativeTarget section */
275 |
276 | /* Begin PBXProject section */
277 | C5DF354423B0A07F0004D751 /* Project object */ = {
278 | isa = PBXProject;
279 | attributes = {
280 | LastSwiftUpdateCheck = 1130;
281 | LastUpgradeCheck = 1130;
282 | ORGANIZATIONNAME = "付有芳";
283 | TargetAttributes = {
284 | C5DF354B23B0A07F0004D751 = {
285 | CreatedOnToolsVersion = 11.3;
286 | };
287 | C5DF356123B0A0810004D751 = {
288 | CreatedOnToolsVersion = 11.3;
289 | TestTargetID = C5DF354B23B0A07F0004D751;
290 | };
291 | C5DF356C23B0A0810004D751 = {
292 | CreatedOnToolsVersion = 11.3;
293 | TestTargetID = C5DF354B23B0A07F0004D751;
294 | };
295 | };
296 | };
297 | buildConfigurationList = C5DF354723B0A07F0004D751 /* Build configuration list for PBXProject "SwiftMath" */;
298 | compatibilityVersion = "Xcode 9.3";
299 | developmentRegion = en;
300 | hasScannedForEncodings = 0;
301 | knownRegions = (
302 | en,
303 | Base,
304 | );
305 | mainGroup = C5DF354323B0A07F0004D751;
306 | productRefGroup = C5DF354D23B0A07F0004D751 /* Products */;
307 | projectDirPath = "";
308 | projectRoot = "";
309 | targets = (
310 | C5DF354B23B0A07F0004D751 /* SwiftMath */,
311 | C5DF356123B0A0810004D751 /* SwiftMathTests */,
312 | C5DF356C23B0A0810004D751 /* SwiftMathUITests */,
313 | );
314 | };
315 | /* End PBXProject section */
316 |
317 | /* Begin PBXResourcesBuildPhase section */
318 | C5DF354A23B0A07F0004D751 /* Resources */ = {
319 | isa = PBXResourcesBuildPhase;
320 | buildActionMask = 2147483647;
321 | files = (
322 | C5DF355C23B0A0810004D751 /* LaunchScreen.storyboard in Resources */,
323 | C5DF355923B0A0810004D751 /* Assets.xcassets in Resources */,
324 | C5DF358E23B0AB8F0004D751 /* katex in Resources */,
325 | C5DF355723B0A07F0004D751 /* Main.storyboard in Resources */,
326 | );
327 | runOnlyForDeploymentPostprocessing = 0;
328 | };
329 | C5DF356023B0A0810004D751 /* Resources */ = {
330 | isa = PBXResourcesBuildPhase;
331 | buildActionMask = 2147483647;
332 | files = (
333 | );
334 | runOnlyForDeploymentPostprocessing = 0;
335 | };
336 | C5DF356B23B0A0810004D751 /* Resources */ = {
337 | isa = PBXResourcesBuildPhase;
338 | buildActionMask = 2147483647;
339 | files = (
340 | );
341 | runOnlyForDeploymentPostprocessing = 0;
342 | };
343 | /* End PBXResourcesBuildPhase section */
344 |
345 | /* Begin PBXShellScriptBuildPhase section */
346 | 0029AD9DCD46E517A267714F /* [CP] Embed Pods Frameworks */ = {
347 | isa = PBXShellScriptBuildPhase;
348 | buildActionMask = 2147483647;
349 | files = (
350 | );
351 | inputFileListPaths = (
352 | "${PODS_ROOT}/Target Support Files/Pods-SwiftMath/Pods-SwiftMath-frameworks-${CONFIGURATION}-input-files.xcfilelist",
353 | );
354 | name = "[CP] Embed Pods Frameworks";
355 | outputFileListPaths = (
356 | "${PODS_ROOT}/Target Support Files/Pods-SwiftMath/Pods-SwiftMath-frameworks-${CONFIGURATION}-output-files.xcfilelist",
357 | );
358 | runOnlyForDeploymentPostprocessing = 0;
359 | shellPath = /bin/sh;
360 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwiftMath/Pods-SwiftMath-frameworks.sh\"\n";
361 | showEnvVarsInLog = 0;
362 | };
363 | 7EC8B7A22C54DC6EE2697B3D /* [CP] Check Pods Manifest.lock */ = {
364 | isa = PBXShellScriptBuildPhase;
365 | buildActionMask = 2147483647;
366 | files = (
367 | );
368 | inputFileListPaths = (
369 | );
370 | inputPaths = (
371 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
372 | "${PODS_ROOT}/Manifest.lock",
373 | );
374 | name = "[CP] Check Pods Manifest.lock";
375 | outputFileListPaths = (
376 | );
377 | outputPaths = (
378 | "$(DERIVED_FILE_DIR)/Pods-SwiftMath-SwiftMathUITests-checkManifestLockResult.txt",
379 | );
380 | runOnlyForDeploymentPostprocessing = 0;
381 | shellPath = /bin/sh;
382 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
383 | showEnvVarsInLog = 0;
384 | };
385 | 7F34BDAA3BDF683AA433136C /* [CP] Embed Pods Frameworks */ = {
386 | isa = PBXShellScriptBuildPhase;
387 | buildActionMask = 2147483647;
388 | files = (
389 | );
390 | inputFileListPaths = (
391 | "${PODS_ROOT}/Target Support Files/Pods-SwiftMath-SwiftMathUITests/Pods-SwiftMath-SwiftMathUITests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
392 | );
393 | name = "[CP] Embed Pods Frameworks";
394 | outputFileListPaths = (
395 | "${PODS_ROOT}/Target Support Files/Pods-SwiftMath-SwiftMathUITests/Pods-SwiftMath-SwiftMathUITests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
396 | );
397 | runOnlyForDeploymentPostprocessing = 0;
398 | shellPath = /bin/sh;
399 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwiftMath-SwiftMathUITests/Pods-SwiftMath-SwiftMathUITests-frameworks.sh\"\n";
400 | showEnvVarsInLog = 0;
401 | };
402 | DF4706B7BD7DEE3AE5BA374E /* [CP] Check Pods Manifest.lock */ = {
403 | isa = PBXShellScriptBuildPhase;
404 | buildActionMask = 2147483647;
405 | files = (
406 | );
407 | inputFileListPaths = (
408 | );
409 | inputPaths = (
410 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
411 | "${PODS_ROOT}/Manifest.lock",
412 | );
413 | name = "[CP] Check Pods Manifest.lock";
414 | outputFileListPaths = (
415 | );
416 | outputPaths = (
417 | "$(DERIVED_FILE_DIR)/Pods-SwiftMathTests-checkManifestLockResult.txt",
418 | );
419 | runOnlyForDeploymentPostprocessing = 0;
420 | shellPath = /bin/sh;
421 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
422 | showEnvVarsInLog = 0;
423 | };
424 | FADBF0746B07BD6C04ECB2DA /* [CP] Check Pods Manifest.lock */ = {
425 | isa = PBXShellScriptBuildPhase;
426 | buildActionMask = 2147483647;
427 | files = (
428 | );
429 | inputFileListPaths = (
430 | );
431 | inputPaths = (
432 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
433 | "${PODS_ROOT}/Manifest.lock",
434 | );
435 | name = "[CP] Check Pods Manifest.lock";
436 | outputFileListPaths = (
437 | );
438 | outputPaths = (
439 | "$(DERIVED_FILE_DIR)/Pods-SwiftMath-checkManifestLockResult.txt",
440 | );
441 | runOnlyForDeploymentPostprocessing = 0;
442 | shellPath = /bin/sh;
443 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
444 | showEnvVarsInLog = 0;
445 | };
446 | /* End PBXShellScriptBuildPhase section */
447 |
448 | /* Begin PBXSourcesBuildPhase section */
449 | C5DF354823B0A07F0004D751 /* Sources */ = {
450 | isa = PBXSourcesBuildPhase;
451 | buildActionMask = 2147483647;
452 | files = (
453 | C5DF358223B0A1C00004D751 /* WebViewModeController.swift in Sources */,
454 | C5DF358423B0A1FA0004D751 /* iosMathModeController.swift in Sources */,
455 | C5DF355423B0A07F0004D751 /* ViewController.swift in Sources */,
456 | C5DF355023B0A07F0004D751 /* AppDelegate.swift in Sources */,
457 | C5DF358723B0A2540004D751 /* iosMathModeCell.swift in Sources */,
458 | C5DF358923B0A2C60004D751 /* WebViewModeCell.swift in Sources */,
459 | C5DF355223B0A07F0004D751 /* SceneDelegate.swift in Sources */,
460 | C5DF358B23B0A6060004D751 /* MathText.swift in Sources */,
461 | );
462 | runOnlyForDeploymentPostprocessing = 0;
463 | };
464 | C5DF355E23B0A0810004D751 /* Sources */ = {
465 | isa = PBXSourcesBuildPhase;
466 | buildActionMask = 2147483647;
467 | files = (
468 | C5DF356723B0A0810004D751 /* SwiftMathTests.swift in Sources */,
469 | );
470 | runOnlyForDeploymentPostprocessing = 0;
471 | };
472 | C5DF356923B0A0810004D751 /* Sources */ = {
473 | isa = PBXSourcesBuildPhase;
474 | buildActionMask = 2147483647;
475 | files = (
476 | C5DF357223B0A0810004D751 /* SwiftMathUITests.swift in Sources */,
477 | );
478 | runOnlyForDeploymentPostprocessing = 0;
479 | };
480 | /* End PBXSourcesBuildPhase section */
481 |
482 | /* Begin PBXTargetDependency section */
483 | C5DF356423B0A0810004D751 /* PBXTargetDependency */ = {
484 | isa = PBXTargetDependency;
485 | target = C5DF354B23B0A07F0004D751 /* SwiftMath */;
486 | targetProxy = C5DF356323B0A0810004D751 /* PBXContainerItemProxy */;
487 | };
488 | C5DF356F23B0A0810004D751 /* PBXTargetDependency */ = {
489 | isa = PBXTargetDependency;
490 | target = C5DF354B23B0A07F0004D751 /* SwiftMath */;
491 | targetProxy = C5DF356E23B0A0810004D751 /* PBXContainerItemProxy */;
492 | };
493 | /* End PBXTargetDependency section */
494 |
495 | /* Begin PBXVariantGroup section */
496 | C5DF355523B0A07F0004D751 /* Main.storyboard */ = {
497 | isa = PBXVariantGroup;
498 | children = (
499 | C5DF355623B0A07F0004D751 /* Base */,
500 | );
501 | name = Main.storyboard;
502 | sourceTree = "";
503 | };
504 | C5DF355A23B0A0810004D751 /* LaunchScreen.storyboard */ = {
505 | isa = PBXVariantGroup;
506 | children = (
507 | C5DF355B23B0A0810004D751 /* Base */,
508 | );
509 | name = LaunchScreen.storyboard;
510 | sourceTree = "";
511 | };
512 | /* End PBXVariantGroup section */
513 |
514 | /* Begin XCBuildConfiguration section */
515 | C5DF357423B0A0810004D751 /* Debug */ = {
516 | isa = XCBuildConfiguration;
517 | buildSettings = {
518 | ALWAYS_SEARCH_USER_PATHS = NO;
519 | CLANG_ANALYZER_NONNULL = YES;
520 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
521 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
522 | CLANG_CXX_LIBRARY = "libc++";
523 | CLANG_ENABLE_MODULES = YES;
524 | CLANG_ENABLE_OBJC_ARC = YES;
525 | CLANG_ENABLE_OBJC_WEAK = YES;
526 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
527 | CLANG_WARN_BOOL_CONVERSION = YES;
528 | CLANG_WARN_COMMA = YES;
529 | CLANG_WARN_CONSTANT_CONVERSION = YES;
530 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
531 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
532 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
533 | CLANG_WARN_EMPTY_BODY = YES;
534 | CLANG_WARN_ENUM_CONVERSION = YES;
535 | CLANG_WARN_INFINITE_RECURSION = YES;
536 | CLANG_WARN_INT_CONVERSION = YES;
537 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
538 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
539 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
540 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
541 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
542 | CLANG_WARN_STRICT_PROTOTYPES = YES;
543 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
544 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
545 | CLANG_WARN_UNREACHABLE_CODE = YES;
546 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
547 | COPY_PHASE_STRIP = NO;
548 | DEBUG_INFORMATION_FORMAT = dwarf;
549 | ENABLE_STRICT_OBJC_MSGSEND = YES;
550 | ENABLE_TESTABILITY = YES;
551 | GCC_C_LANGUAGE_STANDARD = gnu11;
552 | GCC_DYNAMIC_NO_PIC = NO;
553 | GCC_NO_COMMON_BLOCKS = YES;
554 | GCC_OPTIMIZATION_LEVEL = 0;
555 | GCC_PREPROCESSOR_DEFINITIONS = (
556 | "DEBUG=1",
557 | "$(inherited)",
558 | );
559 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
560 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
561 | GCC_WARN_UNDECLARED_SELECTOR = YES;
562 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
563 | GCC_WARN_UNUSED_FUNCTION = YES;
564 | GCC_WARN_UNUSED_VARIABLE = YES;
565 | IPHONEOS_DEPLOYMENT_TARGET = 13.2;
566 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
567 | MTL_FAST_MATH = YES;
568 | ONLY_ACTIVE_ARCH = YES;
569 | SDKROOT = iphoneos;
570 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
571 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
572 | };
573 | name = Debug;
574 | };
575 | C5DF357523B0A0810004D751 /* Release */ = {
576 | isa = XCBuildConfiguration;
577 | buildSettings = {
578 | ALWAYS_SEARCH_USER_PATHS = NO;
579 | CLANG_ANALYZER_NONNULL = YES;
580 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
581 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
582 | CLANG_CXX_LIBRARY = "libc++";
583 | CLANG_ENABLE_MODULES = YES;
584 | CLANG_ENABLE_OBJC_ARC = YES;
585 | CLANG_ENABLE_OBJC_WEAK = YES;
586 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
587 | CLANG_WARN_BOOL_CONVERSION = YES;
588 | CLANG_WARN_COMMA = YES;
589 | CLANG_WARN_CONSTANT_CONVERSION = YES;
590 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
591 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
592 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
593 | CLANG_WARN_EMPTY_BODY = YES;
594 | CLANG_WARN_ENUM_CONVERSION = YES;
595 | CLANG_WARN_INFINITE_RECURSION = YES;
596 | CLANG_WARN_INT_CONVERSION = YES;
597 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
598 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
599 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
600 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
601 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
602 | CLANG_WARN_STRICT_PROTOTYPES = YES;
603 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
604 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
605 | CLANG_WARN_UNREACHABLE_CODE = YES;
606 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
607 | COPY_PHASE_STRIP = NO;
608 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
609 | ENABLE_NS_ASSERTIONS = NO;
610 | ENABLE_STRICT_OBJC_MSGSEND = YES;
611 | GCC_C_LANGUAGE_STANDARD = gnu11;
612 | GCC_NO_COMMON_BLOCKS = YES;
613 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
614 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
615 | GCC_WARN_UNDECLARED_SELECTOR = YES;
616 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
617 | GCC_WARN_UNUSED_FUNCTION = YES;
618 | GCC_WARN_UNUSED_VARIABLE = YES;
619 | IPHONEOS_DEPLOYMENT_TARGET = 13.2;
620 | MTL_ENABLE_DEBUG_INFO = NO;
621 | MTL_FAST_MATH = YES;
622 | SDKROOT = iphoneos;
623 | SWIFT_COMPILATION_MODE = wholemodule;
624 | SWIFT_OPTIMIZATION_LEVEL = "-O";
625 | VALIDATE_PRODUCT = YES;
626 | };
627 | name = Release;
628 | };
629 | C5DF357723B0A0810004D751 /* Debug */ = {
630 | isa = XCBuildConfiguration;
631 | baseConfigurationReference = 125A0A3D2C32AC9D08296582 /* Pods-SwiftMath.debug.xcconfig */;
632 | buildSettings = {
633 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
634 | CODE_SIGN_STYLE = Automatic;
635 | INFOPLIST_FILE = SwiftMath/Info.plist;
636 | LD_RUNPATH_SEARCH_PATHS = (
637 | "$(inherited)",
638 | "@executable_path/Frameworks",
639 | );
640 | PRODUCT_BUNDLE_IDENTIFIER = com.devfang.SwiftMath;
641 | PRODUCT_NAME = "$(TARGET_NAME)";
642 | SWIFT_VERSION = 5.0;
643 | TARGETED_DEVICE_FAMILY = "1,2";
644 | };
645 | name = Debug;
646 | };
647 | C5DF357823B0A0810004D751 /* Release */ = {
648 | isa = XCBuildConfiguration;
649 | baseConfigurationReference = B7A13CA7007C48879B2DD38C /* Pods-SwiftMath.release.xcconfig */;
650 | buildSettings = {
651 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
652 | CODE_SIGN_STYLE = Automatic;
653 | INFOPLIST_FILE = SwiftMath/Info.plist;
654 | LD_RUNPATH_SEARCH_PATHS = (
655 | "$(inherited)",
656 | "@executable_path/Frameworks",
657 | );
658 | PRODUCT_BUNDLE_IDENTIFIER = com.devfang.SwiftMath;
659 | PRODUCT_NAME = "$(TARGET_NAME)";
660 | SWIFT_VERSION = 5.0;
661 | TARGETED_DEVICE_FAMILY = "1,2";
662 | };
663 | name = Release;
664 | };
665 | C5DF357A23B0A0810004D751 /* Debug */ = {
666 | isa = XCBuildConfiguration;
667 | baseConfigurationReference = 15D34D78A4502E5108EB90EE /* Pods-SwiftMathTests.debug.xcconfig */;
668 | buildSettings = {
669 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
670 | BUNDLE_LOADER = "$(TEST_HOST)";
671 | CODE_SIGN_STYLE = Automatic;
672 | INFOPLIST_FILE = SwiftMathTests/Info.plist;
673 | IPHONEOS_DEPLOYMENT_TARGET = 13.2;
674 | LD_RUNPATH_SEARCH_PATHS = (
675 | "$(inherited)",
676 | "@executable_path/Frameworks",
677 | "@loader_path/Frameworks",
678 | );
679 | PRODUCT_BUNDLE_IDENTIFIER = com.devfang.SwiftMathTests;
680 | PRODUCT_NAME = "$(TARGET_NAME)";
681 | SWIFT_VERSION = 5.0;
682 | TARGETED_DEVICE_FAMILY = "1,2";
683 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftMath.app/SwiftMath";
684 | };
685 | name = Debug;
686 | };
687 | C5DF357B23B0A0810004D751 /* Release */ = {
688 | isa = XCBuildConfiguration;
689 | baseConfigurationReference = F47127282447D60A7C68F457 /* Pods-SwiftMathTests.release.xcconfig */;
690 | buildSettings = {
691 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
692 | BUNDLE_LOADER = "$(TEST_HOST)";
693 | CODE_SIGN_STYLE = Automatic;
694 | INFOPLIST_FILE = SwiftMathTests/Info.plist;
695 | IPHONEOS_DEPLOYMENT_TARGET = 13.2;
696 | LD_RUNPATH_SEARCH_PATHS = (
697 | "$(inherited)",
698 | "@executable_path/Frameworks",
699 | "@loader_path/Frameworks",
700 | );
701 | PRODUCT_BUNDLE_IDENTIFIER = com.devfang.SwiftMathTests;
702 | PRODUCT_NAME = "$(TARGET_NAME)";
703 | SWIFT_VERSION = 5.0;
704 | TARGETED_DEVICE_FAMILY = "1,2";
705 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftMath.app/SwiftMath";
706 | };
707 | name = Release;
708 | };
709 | C5DF357D23B0A0810004D751 /* Debug */ = {
710 | isa = XCBuildConfiguration;
711 | baseConfigurationReference = C18664232ED7333B693027C4 /* Pods-SwiftMath-SwiftMathUITests.debug.xcconfig */;
712 | buildSettings = {
713 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
714 | CODE_SIGN_STYLE = Automatic;
715 | INFOPLIST_FILE = SwiftMathUITests/Info.plist;
716 | LD_RUNPATH_SEARCH_PATHS = (
717 | "$(inherited)",
718 | "@executable_path/Frameworks",
719 | "@loader_path/Frameworks",
720 | );
721 | PRODUCT_BUNDLE_IDENTIFIER = com.devfang.SwiftMathUITests;
722 | PRODUCT_NAME = "$(TARGET_NAME)";
723 | SWIFT_VERSION = 5.0;
724 | TARGETED_DEVICE_FAMILY = "1,2";
725 | TEST_TARGET_NAME = SwiftMath;
726 | };
727 | name = Debug;
728 | };
729 | C5DF357E23B0A0810004D751 /* Release */ = {
730 | isa = XCBuildConfiguration;
731 | baseConfigurationReference = A837BFE08BEE1F9A48532508 /* Pods-SwiftMath-SwiftMathUITests.release.xcconfig */;
732 | buildSettings = {
733 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
734 | CODE_SIGN_STYLE = Automatic;
735 | INFOPLIST_FILE = SwiftMathUITests/Info.plist;
736 | LD_RUNPATH_SEARCH_PATHS = (
737 | "$(inherited)",
738 | "@executable_path/Frameworks",
739 | "@loader_path/Frameworks",
740 | );
741 | PRODUCT_BUNDLE_IDENTIFIER = com.devfang.SwiftMathUITests;
742 | PRODUCT_NAME = "$(TARGET_NAME)";
743 | SWIFT_VERSION = 5.0;
744 | TARGETED_DEVICE_FAMILY = "1,2";
745 | TEST_TARGET_NAME = SwiftMath;
746 | };
747 | name = Release;
748 | };
749 | /* End XCBuildConfiguration section */
750 |
751 | /* Begin XCConfigurationList section */
752 | C5DF354723B0A07F0004D751 /* Build configuration list for PBXProject "SwiftMath" */ = {
753 | isa = XCConfigurationList;
754 | buildConfigurations = (
755 | C5DF357423B0A0810004D751 /* Debug */,
756 | C5DF357523B0A0810004D751 /* Release */,
757 | );
758 | defaultConfigurationIsVisible = 0;
759 | defaultConfigurationName = Release;
760 | };
761 | C5DF357623B0A0810004D751 /* Build configuration list for PBXNativeTarget "SwiftMath" */ = {
762 | isa = XCConfigurationList;
763 | buildConfigurations = (
764 | C5DF357723B0A0810004D751 /* Debug */,
765 | C5DF357823B0A0810004D751 /* Release */,
766 | );
767 | defaultConfigurationIsVisible = 0;
768 | defaultConfigurationName = Release;
769 | };
770 | C5DF357923B0A0810004D751 /* Build configuration list for PBXNativeTarget "SwiftMathTests" */ = {
771 | isa = XCConfigurationList;
772 | buildConfigurations = (
773 | C5DF357A23B0A0810004D751 /* Debug */,
774 | C5DF357B23B0A0810004D751 /* Release */,
775 | );
776 | defaultConfigurationIsVisible = 0;
777 | defaultConfigurationName = Release;
778 | };
779 | C5DF357C23B0A0810004D751 /* Build configuration list for PBXNativeTarget "SwiftMathUITests" */ = {
780 | isa = XCConfigurationList;
781 | buildConfigurations = (
782 | C5DF357D23B0A0810004D751 /* Debug */,
783 | C5DF357E23B0A0810004D751 /* Release */,
784 | );
785 | defaultConfigurationIsVisible = 0;
786 | defaultConfigurationName = Release;
787 | };
788 | /* End XCConfigurationList section */
789 | };
790 | rootObject = C5DF354423B0A07F0004D751 /* Project object */;
791 | }
792 |
--------------------------------------------------------------------------------