Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add way to define special \[characters] #14

Open
cloutiy opened this issue Nov 17, 2014 · 3 comments
Open

Add way to define special \[characters] #14

cloutiy opened this issue Nov 17, 2014 · 3 comments

Comments

@cloutiy
Copy link
Owner

cloutiy commented Nov 17, 2014

Speaking of which, what is the escape character? I've been
assuming it's a backslash.

In a similar vein, I've been wondering about special characters,
like the copyright symbol. I'm not fond of |co| visually (personal
preference, therefore comment safely ignored), but I'm also thinking
that knowledgeable groffers will likely want to use groff notation for
special characters. What do you think of making the groff notation
standard throughout tml? [co] or [bu] for example. The parser's
going to have to pass those guys through anyway, so why have two
styles of entering special characters?

An advantage to using [...] is that when users want to wrap
formatting and text into a single entity, this is the style they'll
be using. In groff-speak

.char [TML] \f[B]\s[-1]TML\f[]\s[]

makes [TML] a valid entity, and you can see how useful that is.
Mind you, we'll have to come up with a way of creating this in tml.
Could be something as simple as

{special-character}
TML: <bold, size -1

which would get changed into .char ..., as above. Would also allow
grouping, which, given how extensively I use .char, would be a
blessing.

@cloutiy
Copy link
Owner Author

cloutiy commented Dec 29, 2015

Actually the same could be achieved by defining user string:

{strings}
@TML = <bold, size -1<TML>

Then whenever @tml is encountered in the text it will be replaced with:

<bold, size -1<TML>

which gets resolved to:

\f[B]\s[-1]TML\f[]\s[]

@tml
Copy link

tml commented Dec 30, 2015

I am SOOO confused right now! ;)

@cloutiy
Copy link
Owner Author

cloutiy commented Dec 30, 2015

haha sorry, didn't realize an @ symbol sends a message to someone. Sorry, not for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants