Hi,

I found that that can be done by just putting your custom commands in a 
regular tiddler, in math mode. For e.g. my tiddler is titled "Latex 
Definitions" and has the following content:

%custom environments and fonts
$\newcommand{\beq}{\begin{equation}}$
$\newcommand{\eeq}{\end{equation}}$
$\newcommand{\bea}{\begin{eqnarray}}$
$\newcommand{\eea}{\end{eqnarray}}$
$\newcommand{\mx}{\mbox}$
$\newcommand{\mt}{\mathtt}$
$\newcommand{\mf}{\mathbf}$
$\newcommand{\mb}{\mathbb}$

%text
$\newcommand{\ie}{{\it{i.e.}~\}}$
$\newcommand{\eg}{{\it{e.g.}\}}$
$\newcommand{\hs}{\hspace{5mm}}$
$\newcommand{\vs}{\vspace{5mm}\\}$

%math
$\newcommand{\vectb}[1]{\boldsymbol{#1}}$
$\newcommand{\vecta}[1]{\overrightarrow{#1} }$
$\newcommand{\expect}[1]{\langle #1\rangle}$
$\newcommand{\innerp}[2]{\langle #1 \vert #2 \rangle}$
$\newcommand{\bra}[1]{\langle #1 \vert}$
$\newcommand{\ket}[1]{\vert #1 \rangle}$
$\newcommand{\supersc}[1]{$^{\textrm{#1}}$}$
$\newcommand{\subsc}[1]{$_{\textrm{#1}}$}$

And that works just fine. Only problem is this tiddler has to be loaded at 
startup and I still can't figure out how to do that. TW 2.x had the 
SystemTiddler tag, but I'm not sure how to do that in TW 5.x. So I have to 
manually load the tiddler and then the definitions work everywhere.

Hope that helps,

Best,

Deepak

On Sunday, 22 January 2017 13:01:47 UTC+5:30, Maaaaaaaaaaaaaaartin wrote:
>
> Dear all,
>
> I need to define my own LaTeX commands to efficiently use the KaTeX 
> plugin. Is there a way to do so? Thanks!
>
> Martin
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/96004140-0024-4044-ac05-f45edcf02d93%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to