Skip to content

Commit

Permalink
#15 enable in math mode
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Nov 15, 2022
1 parent c1bdd97 commit 3da060a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ffcode.dtx
Expand Up @@ -152,7 +152,7 @@
% \pagestyle{empty}
% \begin{document}
% \begin{equation*}
% x = \int_{|home|}^N f(x).
% x = \int_|home|^N f(x).
% \end{equation*}
% \end{document}
% \end{docshot}
Expand Down Expand Up @@ -315,6 +315,7 @@
\ff@box{\ff@rule\ff@print{#1}}%
\fi%
\fi%
\egroup%
}
\makeatother
% \end{macrocode}
Expand All @@ -324,18 +325,20 @@
% Then, we define |\ff| macro:
% \begin{macrocode}
\makeatletter
\def\ff{\ff@x}
\def\ff{\bgroup\ff@x}
\makeatother
% \end{macrocode}
% \end{macro}

% \begin{macro}{novert}
% Finally, we let vertical bars work similar to |\ff|, as suggested
% \href{https://tex.stackexchange.com/a/665105/1449}{here} (unless |novert| package option is used):
% \href{https://tex.stackexchange.com/a/665105/1449}{here}
% and \href{https://tex.stackexchange.com/a/665303/1449}{here}
% (unless |novert| package option is used):
% \begin{macrocode}
\makeatletter\ifdefined\ff@novert\else
\catcode`\|\active
\AtBeginDocument{\catcode`\|\active\def|{\ff@x|}}
\AtBeginDocument{\catcode`\|\active\def|{\bgroup\ff@x|}}
\catcode`\| 12 %
\fi\makeatother
% \end{macrocode}
Expand Down

0 comments on commit 3da060a

Please sign in to comment.