1

I'm trying to put \psaxes command inside a caption. I have tried \verb, \lstinline and alltt package and nothing works. Whats wrong?

\documentclass[
               12pt,
               a4paper,
               openright,
               %twoside,
               oneside,               % Use twoside no lugar de oneside para impressão
               dvipsnames,
               chapter=TITLE,         % títulos de capítulos convertidos em letras maiúsculas
               section=TITLE,         % títulos de seções convertidos em letras maiúsculas
               english,
               brazil]{abntex2}

\usepackage[
                alf,
                abnt-emphasize=bf,
                bibjustif,
                recuo=0cm,
                abnt-etal-cite=4,
                abnt-etal-text=it]{abntex2cite}             % Para gerar a Bibliografia
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}

%\usepackage[showframe, pass]{geometry}                     % Habilitar para ver as margens
\usepackage{standalone}
\usepackage{verbatim}                                                       
\usepackage{alltt}                                          % Para comentários                   
\usepackage{comment}

\newcommand{\IBGEtabfontsize}{\ABNTEXfontereduzida}
\AtBeginDocument{%
  % comandos auxiliares para manipular os captions dentro do comando \IBGEtab.
  \newcommand{\configurecaptions}{\captionstyle[\raggedright]{}}
  \newcommand{\configureseparator}{\captiondelim{: }}
  % Define o comando \IBGEtab{}{}{} com caption e legenda da largura do conteúdo tabular, tabular*, etc
  % Parece funcionar com qualquer pacote
  \newsavebox{\myptabbox}
  \newlength{\myptabboxwidth}

  \newcommand{\IBGEtab}[3]{%
    \savebox{\myptabbox}{{\IBGEtabfontsize #2}}%
    \settowidth{\myptabboxwidth}{\usebox{\myptabbox}}%
    \centering%
    \parbox{\myptabboxwidth}{%
    \configurecaptions
    #1%
    \par%
    {\IBGEtabfontsize%
    #2%
    }%
    \par%
    #3}%
  }
  \let\ibgetab\IBGEtab
}

\newcommand{\mequa}[3]{\IBGEtab{#1}{#2}{#3}}

\newcommand{\Caption}[1]{ %
    \begin{Spacing}{1.5} %
        \caption{#1} %
        \end{Spacing} %
}

\newcommand{\Fonte}[2][\fontename]{ %
%   \vspace{-3pt}
    \vspace{10pt}
        \fonte[#1]{#2}
    \vspace{-5pt}
}

\begin{document}
   \begin{quadro}[h!] 
      \centering
      \Caption{\label{qua:psaxes} Test\verb|\psaxes|.}
        \mequa{}{
         \begin{tabular}{lll}
         \toprule
                  Nome & Tipo & Padrão\\
                  \midrule\midrule
                     axesstyle  & axes|frame|none  & axes \\
                  \bottomrule
         \end{tabular}
      }{
         \Fonte{Test.}
     }
  \end{quadro}
\end{document}

And i get:

enter image description here

Ulysses
  • 197
  • 2
    You can't use \verb in the argument to another command. – egreg Feb 23 '15 at 16:16
  • Thank you egreg. Any idea about how to put \psaxes inside caption? Must be possible because this table is from Herbert book. Just to be clear, i want the command \psaxes, not the print result of it. – Ulysses Feb 23 '15 at 16:32
  • I see no psaxes in a caption in the example. Please, try making a really minimal one. – egreg Feb 23 '15 at 16:34
  • Well i can see. You don't? After \begin{document} – Ulysses Feb 23 '15 at 16:40
  • 1
    I see \Caption{\label{qua:psaxes} Test\verb|\psaxes|.} which has *no* PSTricks code inside it. If you just want to print \psaxes, then use Test \texttt{\string\psaxes} – egreg Feb 23 '15 at 16:42
  • ;-) My english is very bad, sorry. PSTricks command would be the correct sentence? Got perfect result with \texttt{\normalfont\string\psaxes}. Thanks. – Ulysses Feb 23 '15 at 16:48

0 Answers0