0

How to align the names and numbers inside the command \autor?

 \title{MWE align author}
  \documentclass[
      12pt,
      openright,ímpar (insere página vazia caso preciso)
      twoside,
      a4paper,
      english,
      french,   
      spanish,
      brazil,   
      ]{abntex2}


  \usepackage{lmodern}
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{indentfirst}  
  \usepackage{color}            
  \usepackage{graphicx}     
  \usepackage{microtype}        
  \usepackage{multicol}
  \usepackage{multirow}
  \usepackage{lipsum}   
  \usepackage[brazilian,hyperpageref]{backref}   
  \usepackage[alf]{abntex2cite} 
  \usepackage{titling} 
  \usepackage{graphicx}
  \usepackage{lipsum}
  \usepackage{array}


  \renewcommand{\backrefpagesname}{Citado na(s) página(s):~}
  \renewcommand{\backref}{}
  \renewcommand*{\backrefalt}[4]{
      \ifcase #1 %
          Nenhuma citação no texto.%
      \or
          Citado na página #2.%
      \else
          Citado #1 vezes nas páginas #2.%
      \fi}%
  \titulo{Modelo Canônico de\\ Relatório Técnico e/ou Científico com \abnTeX}

  \autor{Name One \qquad number1 \\
          Other Name \qquad number2}

  \local{São Carlos}
  \data{2017}
  \tipotrabalho{Relatório técnico}
  \preambulo{Modelo canônico de Relatório Técnico e/ou Científico em conformidade
  com as normas ABNT apresentado à comunidade de usuários \LaTeX.}

  \definecolor{blue}{RGB}{41,5,195}

  \makeatletter
  \hypersetup{
          pdftitle={\@title}, 
          pdfauthor={\@author},
          pdfsubject={\imprimirpreambulo},
          pdfcreator={LaTeX with abnTeX2},
          pdfkeywords={abnt}{latex}{abntex}{abntex2}{relatório técnico}, 
          colorlinks=true,  
          linkcolor=blue,   
          citecolor=blue,   
          filecolor=magenta,        urlcolor=blue,
          bookmarksdepth=4
  }
  \makeatother
  \setlength{\parindent}{1.3cm}

  \setlength{\parskip}{0.2cm}
  \makeindex
  \begin{document}

  \selectlanguage{brazil}

  \frenchspacing 

  \imprimircapa
  \end{document}

EDIT: I wanna make this enter image description here

look like this

enter image description here

2
  • 1
    What other need for vertical alignment do you have (the numbers should be just fine)? Do you maybe mean the horizontal alignment? Maybe you could add a picture of what you're trying to change.
    – TeXnician
    Sep 24 '17 at 14:40
  • Edited the question, now it should be clear
    – BadWolf
    Sep 24 '17 at 14:54
1

Here is a way with the eqparbox package:

\documentclass[12pt, openright, ímpar (insere página vazia caso preciso) twoside, a4paper, english, french, spanish, brazil]{abntex2}
\usepackage{lmodern}
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{indentfirst}
  \usepackage{color}
  \usepackage{graphicx}
  \usepackage{microtype}
  \usepackage{multicol}
  \usepackage{multirow}
  \usepackage{lipsum}
  \usepackage[brazilian,hyperpageref]{backref}
  \usepackage[alf]{abntex2cite}
  \usepackage{titling}
  \usepackage{graphicx}
  \usepackage{lipsum}
  \usepackage{array}
\usepackage{eqparbox}

  \renewcommand{\backrefpagesname}{Citado na(s) página(s):~}
  \renewcommand{\backref}{}
  \renewcommand*{\backrefalt}[4]{
      \ifcase #1 %
          Nenhuma citação no texto.%
      \or
          Citado na página #2.%
      \else
          Citado #1 vezes nas páginas #2.%
      \fi}%
  \titulo{Modelo Canônico de\\ Relatório Técnico e/ou Científico com \abnTeX}

  \autor{\eqmakebox[Name][r]{Name One} \qquad \eqmakebox[number][l]{number1} \\
          \eqmakebox[Name][r]{Another Name} \qquad \eqmakebox[number][l]{number2}}

  \local{São Carlos}
  \data{2017}
  \tipotrabalho{Relatório técnico}
  \preambulo{Modelo canônico de Relatório Técnico e/ou Científico em conformidade
  com as normas ABNT apresentado à comunidade de usuários \LaTeX.}

  \definecolor{blue}{RGB}{41,5,195}

  \makeatletter
  \hypersetup{
          pdftitle={\@title},
          pdfauthor={\@author},
          pdfsubject={\imprimirpreambulo},
          pdfcreator={LaTeX with abnTeX2},
          pdfkeywords={abnt}{latex}{abntex}{abntex2}{relatório técnico},
          colorlinks=true,
          linkcolor=blue,
          citecolor=blue,
          filecolor=magenta, urlcolor=blue,
          bookmarksdepth=4
  }
  \makeatother
  \setlength{\parindent}{1.3cm}

  \setlength{\parskip}{0.2cm}
  \makeindex

  \begin{document}

  \selectlanguage{brazil}

  \frenchspacing

  \imprimircapa

  \end{document} 

enter image description here

2
  • (no line number): Runaway argument? {\begin {tabular{r@{\qquad }l} Name One & number1 \\ Other Name & num\ETC. ! File ended while scanning use of \autor. <inserted text> \par <*> main.tex
    – BadWolf
    Sep 24 '17 at 19:29
  • 1
    @BadWolf: I didn't know your document class, but I've posted another (tested) solution. Please see if it's OK for you.
    – Bernard
    Sep 24 '17 at 20:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.