Skip to content

Instantly share code, notes, and snippets.

@wtsnjp
Created March 21, 2018 09:47
Show Gist options
  • Select an option

  • Save wtsnjp/88a47d1eca90ef5b19622956153df75d to your computer and use it in GitHub Desktop.

Select an option

Save wtsnjp/88a47d1eca90ef5b19622956153df75d to your computer and use it in GitHub Desktop.
%#!lualatex
\documentclass{article}
\usepackage{xparse}
\usepackage[active,tightpage]{preview}
\setlength\PreviewBorder{2mm}
\ExplSyntaxOn
\NewDocumentCommand { \MakeRustAre } { m }
{
\tl_set:Nn \l_tmpa_tl { #1 }
\regex_replace_all:nnN { Rust } { TeX } \l_tmpa_tl
\tl_use:N \l_tmpa_tl
}
\ExplSyntaxOff
\begin{document}
\begin{preview}
\MakeRustAre{Rust is the most loved language.}
\end{preview}
\end{document}
% vim: ft=expl3 nospell:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment