I am using the 'rticle' package in R which allows building R markdown documents based on pre-specified templates for the journal submission. The template is in .tex format and as shown in the figure, I am using PLOS template. However, I am not able to remove the space from the superscript. red circle

The code responsible for this is the following (I believe)

    % Template for PLoS
% Version 3.4 January 2017

% amsmath and amssymb packages, useful for mathematical formulas and symbols

% Use adjustwidth environment to exceed column width (see example table in text)

% Use Unicode characters when possible

% textcomp package and marvosym package for additional characters

% cite package, to clean up citations in the main text. Do not remove.
% \usepackage{cite}

% Use nameref to cite supporting information files (see Supporting Information section for more info)

% line numbers

% ligatures disabled
\DisableLigatures[f]{encoding = *, family = * }

% color can be used to apply background shading to table cells only

% array package and thick rules for tables

% create "+" rule type for thick vertical lines
\newcolumntype{+}{!{\vrule width 2pt}}

% create \thickcline for thick horizontal lines of variable length
  \noalign{\global\savedwidth\arrayrulewidth\global\arrayrulewidth 2pt}%

% \thickhline command for thick horizontal lines that span the table
\newcommand\thickhline{\noalign{\global\savedwidth\arrayrulewidth\global\arrayrulewidth 2pt}%

% Remove comment for double spacing

% Text layout
\textwidth 5.25in
\textheight 8.75in

% Bold the 'Figure #' in the caption and separate it from the title/caption with a period
% Captions will be left justified

% Use the PLoS provided BiBTeX style
% \bibliographystyle{plos2015}

% Remove brackets from numbering in List of References

% Leave date blank

% Header and Footer with logo
\renewcommand{\footrule}{\hrule height 2pt \vspace{2mm}}
\lfoot{\sf PLOS}

%% Include all macros below
\newcommand{\lorem}{{\bf LOREM}}
\newcommand{\ipsum}{{\bf IPSUM}}









% Title must be 250 characters or less.
\textbf\newline{$title$} % Please use "sentence case" for title and headings (capitalize only the first word in a title (or heading), the first word in a subtitle (or subheading), and any proper nouns).
$author.name$\textsuperscript{$for(author.affiliation)$\getAff{$author.affiliation$}$sep$, $endfor$}$if(author.corresponding)$\textsuperscript{*}$endif$$sep$,
* Corresponding author: $author.email$\\
% Please keep the abstract below 300 words

% Please keep the Author Summary between 150 and 200 words
% Use first person. PLOS ONE authors please skip this step.
% Author Summary not valid for PLOS ONE submissions.
\section*{Author summary}


% Use "Eq" instead of "Equation" for equation citations.




Thank you in advance.


  • 5
    Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Stefan Pinnow Jan 22 at 5:31

Since there is no MWE to try out, I can only guess, that you are introducing unwanted whitespace in the definition of \getAff and \getIndex. You can get rid of it by adding a % at the line endings:

\newcommand{\getAff}[1]{% <-- HERE
\getIndex{#1}{$for(address)$$address.code$$sep$,$endfor$}% <-- HERE

\newcommand{\getIndex}[2]{% <-- HERE
  \ForEach{,}{\IfEq{#1}{\thislevelitem}{\number\thislevelcount\ExitForEach}{}}{#2}% <-- HERE

To understand what is going on, have a look here: What is the use of percent signs (%) at the end of lines?

  • Thank you for the comment. It works to remove the space in the left by placing % in \getAff}[1]{% and \getIndex}[2]{%, but I am not able to get rid of space in right. Please check the new figure. – DavidS Jan 22 at 14:16
  • 1
    thank you. Your answer solved my problem. You made my day. Thanks again. – DavidS Jan 23 at 0:23

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.