-
Notifications
You must be signed in to change notification settings - Fork 629
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3239 from techee/latex
Tex: parse some more latex macros
- Loading branch information
Showing
6 changed files
with
195 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
\\bar input.tex /^\\providecommand{\\bar}{\\section{#1}}$/;" C | ||
\\baz input.tex /^\\def\\baz{\\section{#1}}$/;" C | ||
\\foo input.tex /^\\renewcommand{\\foo}{\\section{#1}}$/;" C | ||
\\mysection0 input.tex /^\\newcommand{\\mysection0}{\\section{#1}}$/;" C | ||
\\mysection1 input.tex /^\\newcommand{\\mysection1}[1]{\\section{#1}}$/;" C | ||
\\mysection2 input.tex /^\\newcommand{\\mysection2}[1][1]{\\section{#1}}$/;" C | ||
\\mysection3 input.tex /^\\newcommand\\mysection3[1][1]{\\section{#1}}$/;" C | ||
\\op input.tex /^\\DeclareMathOperator{\\op}{foo}$/;" o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
boxed input.tex /^\\newenvironment{boxed}$/;" e | ||
boxedA input.tex /^\\renewenvironment{boxedA}$/;" e | ||
theorem input.tex /^\\newtheorem{theorem}{Theorem}$/;" t | ||
theoremA input.tex /^\\newtheorem{theoremA}{Theorem A}$/;" t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
\documentclass{article} | ||
\newtheorem{theoremA}{Theorem A} | ||
\newenvironment{boxed} | ||
{\begin{center} | ||
\begin{tabular}{|p{0.9\textwidth}|} | ||
\hline\\ | ||
} | ||
{ | ||
\\\\\hline | ||
\end{tabular} | ||
\end{center} | ||
} | ||
\renewenvironment{boxedA} | ||
{\begin{center} | ||
\begin{tabular}{|p{0.9\textwidth}|} | ||
\hline\\ | ||
} | ||
{ | ||
\\\\\hline | ||
\end{tabular} | ||
\end{center} | ||
} | ||
\newtheorem{theorem}{Theorem} | ||
\begin{document} | ||
\begin{boxed} | ||
foo | ||
\end{boxed} | ||
\begin{boxedA} | ||
foo | ||
\end{boxedA} | ||
\begin{theorem} | ||
bar | ||
\end{theorem} | ||
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters