Skip to content

Commit

Permalink
#2 obey spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Sep 7, 2021
1 parent a95fea4 commit 3d5c623
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.0
0.2.1
9 changes: 7 additions & 2 deletions ffcode.sty
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,21 @@
rulecolor=gray,frame=leftline,escapeinside=||,mathescape}
\fi

\makeatletter
\newcommand\ffprint{\begingroup\obeyspaces\@ffprint}
\newcommand{\@ffprint}[1]{\texttt{#1}\endgroup}
\makeatother

\newcommand\ffcoderule{\vrule height 6pt depth 1pt width 0pt}
\ifnoframes
\newcommand{\ff}[1]{\ffcoderule\texttt{#1}}
\newcommand{\ff}[1]{\ffcoderule\ffprint{#1}}
\else
\RequirePackage{tcolorbox}
\newtcbox{\ffcodebox}{nobeforeafter,colframe=gray!80!white,
colback=gray!5!white,boxrule=0.1pt,arc=1pt,
boxsep=1.2pt,left=0.5pt,right=0.5pt,top=0.2pt,bottom=0.2pt,
tcbox raise base}
\newcommand{\ff}[1]{\ffcodebox{\ffcoderule\texttt{#1}}}
\newcommand{\ff}[1]{\ffcodebox{\ffcoderule\ffprint{#1}}}
\fi

\endinput

0 comments on commit 3d5c623

Please sign in to comment.