diff options
author | Alex Merry <alex.merry@cs.ox.ac.uk> | 2013-08-07 16:56:23 +0100 |
---|---|---|
committer | Alex Merry <alex.merry@cs.ox.ac.uk> | 2013-08-07 17:04:48 +0100 |
commit | ac7b53be102860d76f318ab0575cfb546635d04e (patch) | |
tree | 5e869a1390c224b9b601d55a4e267160af7ab585 /tikzit/src/osx/PreambleController.m | |
parent | 5a94458d9ee3ee8afd978477c755200df432a9b0 (diff) |
Allow preambles to omit the tikzit-specific preview stuff
The editable preambles include a bunch of things that *have* to be there
for previews to work, which makes figuring out what you can edit hard.
We now add a \documentclass automagically if it is missing, and if
\begin{document} is missing, we assume the preview-specific stuff should
be added.
OSX changes are untested.
Diffstat (limited to 'tikzit/src/osx/PreambleController.m')
-rw-r--r-- | tikzit/src/osx/PreambleController.m | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tikzit/src/osx/PreambleController.m b/tikzit/src/osx/PreambleController.m index e424e7b..af9a778 100644 --- a/tikzit/src/osx/PreambleController.m +++ b/tikzit/src/osx/PreambleController.m @@ -108,6 +108,11 @@ return [preambles currentPostamble]; } +- (NSString*)buildDocumentForTikz:(NSString*)tikz { + [self flushText]; + return [preambles buildDocumentForTikz:tikz]; +} + - (void)setSelectionIndexes:(NSIndexSet *)idx { [self willChangeValueForKey:@"selectionIndexes"]; selectionIndexes = idx; |