What it says on the tin. You type:
P\|{e}h-\={o}e-j\={i}---a method of writing Taiwanese
You get:
Pe̍h-ōe-jī—a method of writing Taiwanese
Please see the examples.
- SILE >= v0.10.5.r107-g36868e2, not compatible with v0.10.5 or lower (so, all current releases as of 2020-07-15, only works on developer builds), as we need PR№940.
- (To build
evil?.sil
) sile-strike
- All common TeX ligatures (go to function texmode and grep for
:gsub
for a list; feel free to open issues/PRs if any you like are missing) - TeX diacritic helpers (We support all on the list in Scott Pakin's Comprehensive LaTeX Symbol List, 25 June 2020 edition.)
- A comprehensive list of math symbols via Cumhur Korkut (see file
packages/texmode/unicoder.lua
), and the most important text ones (grep
the aforementioned file forFred's
). (As №1, feel free to open issues for more, preferably hundreds of symbols in Lua table format all ready to go please! 😉) - A
\notex
command, which ignores what's inside it! nosymbols=y
ornocombine=y
to disable what TeX stuff you don't like. (Come on, what did TeX ever do to you! Embrace the suck!)
Just as jQuery conditioned JavaScript developers of a certain generation to write a Hello, World! as...
$(document).ready(function(){
alert("おっす、世界!元気のか!俺、ハイ!さって〜じゃね‼‼");
});
So too do I aim to condition you.
Here's our Hello, World!
\begin{document}\script[src=packages/texmode]\texmode[_="% ]
Hello, world!
"]\end{document}
It is recommended to put it all on one line so error lineno's continue to function. The comment, % ]
, fixes vim. At least, until @alerque fixes his script, then it might not be necessary anymore. But we probably won't want his fixed script, since it'll probably interpret documents like ours as containing a long string, since that's what they are in the grammar. So remember this number: 09cecddad7
, it's the revision of vim-sile
this works on.
Everything should go inside the bottom and top line. If necessary, you can though call \texmode
more than once.
Due to the way PR№940 was fixed, (I didn't get to comment until it was merged, I was hoping they'd add Python-esque """
super-quotes, or even better, Rust style raw string literals in the form of r#"sup"#
, where, if for some absurd reason you need to write "#
, you just make it r##"sup"#"##
. Ad infinitum, et ultra!!) the TeX "
can't be used as is. You need to escape it.
\begin{document}\script[src=packages/texmode]\texmode[_="% ]
\script[src=packages/font-fallback]
\font:add-fallback[font=Noto Sans CJK JP]
% This is exactly how Japanese people talk. Anime and nichanneru, extremely reliable sources, taught me that.
おっす、世界!元気のか!俺ハイハイ!さって〜行くぞ!じゃね‼‼
The above is known as a ``quote". % won't work!
The above is known as a ``quote\". % will work!
"]\end{document}
Anyway, you know that even in TeX ``this"
is bad, right? It's unbalanced in monospace, silly! Do it ``this way''
.
Copyright 2020, Fredrick R. Brennan (@ctrlcctrlv)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.