I am using scholarly-metadata.lua and author-info-blocks.lua as per the example below in R Markdown:

title: "My title"
  - Mario Modesto-Mata:
      email: [email protected]
      institute: [astro, med]
      correspondence: true
  - name: Christopher
    institute: astro
  - name: Seaghán Mhartain
    institute: med
  - name: Rita Yuri Ynoue
    institute: astro
  - name: Test test
    institute: astro
  - astro: Instituto de Astronomía, Geofísica e Ciências Atmosféricas, Universidade de São Paulo
  - med: Faculdade de Medicina, Universidade de São Paulo
date: "1 October 2018"
    number_sections: yes
    toc: no
    toc_depth: 4
      - '--lua-filter=scholarly-metadata.lua'
      - '--lua-filter=author-info-blocks.lua'
    toc: yes
      - '--lua-filter=scholarly-metadata.lua'
      - '--lua-filter=author-info-blocks.lua'

We have 5 authors, and right now one drops to the 2nd line. I think the space between authors could be reduced. Does anyone know if there is a command that can be inserted via header-includes to do this?

Edit: please see below code within .tex file:

% Options for packages loaded elsewhere
  \usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{microtype.sty}{% use microtype if available
  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
\@ifundefined{KOMAClassName}{% if non-KOMA class
  }{% else
    \setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
  pdftitle={My title},
  pdfauthor={Mario Modesto-Mata1,2,; Christopher1; Seaghán Mhartain2; Rita Yuri Ynoue1; Test test1},
  pdfcreator={LaTeX via pandoc}}
\urlstyle{same} % disable monospaced font for URLs
% Add ',fontsize=\small' for more characters per line
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
% Set default figure placement to htbp
\setlength{\emergencystretch}{3em} % prevent overfull lines
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
  \usepackage{selnolig}  % disable illegal ligatures

\title{My title}
\author{Mario Modesto-Mata\textsuperscript{1,2,*} \and Christopher\textsuperscript{1} \and Seaghán
Mhartain\textsuperscript{2} \and Rita Yuri
Ynoue\textsuperscript{1} \and Test test\textsuperscript{1}}
\date{1 October 2018}


\textsuperscript{1} Instituto de Astronomía, Geofísica e Ciências
Atmosféricas, Universidade de São Paulo\\
\textsuperscript{2} Faculdade de Medicina, Universidade de São Paulo

\textsuperscript{*} Correspondence:
\href{mailto:[email protected]}{Mario Modesto-Mata
\textless{}\href{mailto:[email protected]}{\nolinkurl{[email protected]}}\textgreater{}}

\subsection{R Markdown}\label{r-markdown}}

This is an R Markdown document. Markdown is a simple formatting syntax
for authoring HTML, PDF, and MS Word documents. For more details on
using R Markdown see \url{http://rmarkdown.rstudio.com}.

When you click the \textbf{Knit} button a document will be generated
that includes both content as well as the output of any embedded R code
chunks within the document. You can embed an R code chunk like this:


##      speed           dist       
##  Min.   : 4.0   Min.   :  2.00  
##  1st Qu.:12.0   1st Qu.: 26.00  
##  Median :15.0   Median : 36.00  
##  Mean   :15.4   Mean   : 42.98  
##  3rd Qu.:19.0   3rd Qu.: 56.00  
##  Max.   :25.0   Max.   :120.00

\subsection{Including Plots}\label{including-plots}}

You can also embed plots, for example:


Note that the \texttt{echo\ =\ FALSE} parameter was added to the code
chunk to prevent printing of the R code that generated the plot.

  • 1
    Welcome to TeX.SE! Can you please show us your resulting TeX code in your question?
    – Mensch
    Nov 8, 2021 at 15:52
  • Sorry, I have tried to export the LaTeX code that R Markdown generates. I've edited my question to include this.
    – Daniela
    Nov 8, 2021 at 16:00

1 Answer 1


In document class article, input

\author{<author 1> \and <author 2> \and ...}

will be typeset, in \maketitle, as

\begin{tabular}[t]{c} <author 1> \end{tabular}%
\hskip 1em \@plus.17fil%
\begin{tabular}[t]{c} <author 2> \end{tabular}%
\hskip 1em \@plus.17fil%

with \and defined by

\DeclareRobustCommand\and{%   % \begin{tabular}
  \hskip 1em \@plus.17fil%
  \begin{tabular}[t]{c}}%     % \end{tabular}

Hence the separation between authors come from a) that \hskip in \and and b) the column sep (\tabcolsep) added before and after each tabular column.

Therefore you can

  • either redefine \and to use a smaller (even negative) \hskip
  • or locally redefine \tabcolsep to a smaller value.

I find following values work for your example:

% either (can be added anywhere before \maketitle)
% change: \hskip 1em -> \hskip -.5em
\DeclareRobustCommand\and{% % \begin{tabular}
  \hskip -.5em \@plus.17fil%
  \begin{tabular}[t]{c}}%   % \end{tabular}

% or
% change: 6pt (initial value) -> -3pt

What remains is to translate the required change into what R markdown or pandoc accepts, which is out of my ability.

  • Thanks @muzimuzhi for your input on this. Unfortunately I also don't know how to translate this required change to R Markdown.
    – Daniela
    Nov 19, 2021 at 15:27
  • 1
    The answer on how to translate this information to R Markdown can be found here: github.com/pandoc/lua-filters/issues/198
    – Daniela
    Nov 19, 2021 at 20:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .