Not signed in (Sign In)

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthortalazem
    • CommentTimeOct 4th 2009
     
    I use Ulysses primarily for LaTeX. I'd like a way of color-coding the inline styles similar to how other LaTeX editors (such as TeXshop) do; namely, that the LaTeX start tag "\" and the command immediately following it are colored, but all else is not. So, for example, if I have:

    It should be that \emph{these words}, as well as others, are meaningful

    Then I only want "\emph" to be colored, while the rest following it is not.

    Currently, what I have found to be the case is that there is no way to do so. I can set the End Tag to be a space of course, but that means that everything before a space is colored; in my example above, for example, the comma would also be colored (if you define the brackets and their contents as their own inline tags, you can give them their own color, so that isn't an issue itself).

    In short, I'd like some way to define the End Tag as "any character". Is there a way to do so?

    Many thanks.
    •  
      CommentAuthorfehnman
    • CommentTimeOct 4th 2009
     

    I can't test right now, as I'm at the iPhone, but can't you just define
    Start: \
    End: emph
    ?
    I'm a bit unsure about implications, though, like what with arbitrary \s and regular "emph"s (within a word or such), and of course you'd need to be aware of these special tags during export (you're not actually emphazising the word in brackets), but you could at least give it a try.

    But why do you write out LaTeX code anyway? Why not use simple tags?

    •  
      CommentAuthorfehnman
    • CommentTimeOct 4th 2009
     

    Just tried, and it works sort of works:
    http://www.the-soulmen.com/board/uploads/emphstyle.png

    However, once you use different \tags, you'll quickly see some mixups occur.
    We're aware of this and arelooking into it.

    •  
      CommentAuthortalazem
    • CommentTimeOct 4th 2009
     
    Thanks Fehnman. In the past, I have done exactly what you've mentioned. However, the problem with this approach is simply that there tend to be a lot of different tags. There are of course the basic ones every one uses (in LaTeX), but then -- depending on the complexity of the layout and of the content -- you can get many, many tags. The nice thing about just having it color \tag, and end at the bracket that follows, is that you don't have to keep a big catalog of all the tags: simply, color "blue" everything which begins with "\" and end the coloration if there is a space OR a punctuation mark (ex., { or [ ).

    To be honest it is not a deal breaker or anything, but I was just asking if there was a way, for it would keep the semantic coloring cleaner and more logically consistent, that's all.

    As for why I don't use simply tags, on some projects I do. But on other projects, the LaTeX code is so involved and intricate in places, that I find it easier to just write it all out by hand, including the Front and Back Matter, and just export all of the files using the plain text exporter. I could, of course, do that in TeXshop, but I wouldn't have all the wonderful organization, note-taking, and writing tools provided by Ulysses.

    I look forward to hearing if any solutions develop, though -- again -- it's not the biggest problem in the world. :-)
    •  
      CommentAuthormax
    • CommentTimeOct 4th 2009
     

    I think we have found a quite nice solution and might be bringing it on in Ulysses 2.1...

    •  
      CommentAuthorsmolk
    • CommentTimeOct 5th 2009
     
    I'd be very interested in that, too. Although I use few LaTeX-commands in my text, I do sometimes include external tables in the output via a command in the text, and it would be helpful to identify the small piece of code by coloured tags.
    •  
      CommentAuthorfehnman
    • CommentTimeOct 6th 2009
     

    Max had the neat idea of allowing the end tag to be empty. This will then act as "style ends at last alphanumeric character". It will allow \this to be colored, by simply setting up \ as start tag.
    This could also be used to create Twitter-style #hashtags, though that may interfere with paragraph styles you've already set up, dunno, we'll have to see and test. But you could always use another start character, of course, say ^this or ~that.
    It will be great. :)