-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTexEquation.h
45 lines (34 loc) · 1.25 KB
/
TexEquation.h
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//
// TexEquation.h
// EquaTeX
//
// Created by Thierry Coppey on 25.05.11.
// Copyright 2011 TCKnetwork. All rights reserved.
//
#import <Cocoa/Cocoa.h>
typedef enum { TexModeDisplay, TexModeInline, TexModeArray, TexModeAlign, TexModeAlgo, TexModeText } TexMode;
@interface TexEquation : NSObject {
@private
NSString* _eq; // equation
NSData* _data; // PDF data
NSRect _size; // PDF size
BOOL _xetex;
NSString* _la; // LaTeX path
NSString* _xe; // XeTeX path
NSString* _gs; // GhostScript path
NSColor* _col; // default color
}
@property (retain)IBOutlet NSColor* color;
- (void)setProcessor:(BOOL)xetex latex:(NSString*)laPath xetex:(NSString*)xePath gs:(NSString*)gsPath;
- (BOOL)hasProcessor;
// Multiple processing can be run on the same TexEquation
// and the data is kept coherent during block(pdf data, error strings array)
- (void)generate:(NSString*)equation mode:(TexMode)mode size:(double)size;
- (void)generate:(NSString*)equation mode:(TexMode)mode size:(double)size block:(void (^)(NSData*,NSArray*))block;
- (double)baseline;
- (void)copy:(double)baseline;
- (NSString*)paste; // nil if there is no equation data (from either PDF or Pages pasteboard)
- (NSImage*)image;
- (NSString*)load:(NSString*)file;
- (void)saveAs:(NSString*)file;
@end