[Question]
  [
### Background
Celebrating [the release of Dyalog APL 16.0](https://www.dyalog.com/dyalog/dyalog-versions/160.htm), where the solution to this problem is `{⊢⌺(≢⍵)⊢⍵}`[Explanation](https://codegolf.stackexchange.com/a/129585/43319)
### Task
Given a printable ASCII string **of odd length** *n*, make an *n* × *n* square with the string centered horizontally, duplicated to be centered vertically, and with acrostics of the same string in each row and column. Note that all but the centered strings will be cut off to keep the square's size *n* × *n*.
Explanation of your code will be much appreciated.
### Rules
1. You may have trailing whitespace and newlines (this includes the lower-right triangle)
2. You may return a list of strings
### Example using the string `ABXCD`:
* *n* is 5. First we draw the two centered strings, one horizontal and one vertical:
```
┌─────┐
│  A  │
│  B  │
│ABXCD│
│  C  │
│  D  │
└─────┘
```
(5 × 5 bounding box added for clarity)
* Then we place all the possible acrostics, horizontally and vertically:
```
       A
      AB
  ┌─────┐
  │  ABX│CD
  │ ABXC│D
  │ABXCD│
 A│BXCD │
AB│XCD  │
  └─────┘
   CD
   D
```
* Finally, we return only what is inside the bounding box:
```
  ABX
 ABXC
ABXCD
BXCD 
XCD  
```
### Test cases
`World`:
```
  Wor
 Worl
World
orld
rld
```
`mississippi`:
```
     missis
    mississ
   mississi
  mississip
 mississipp
mississippi
ississippi
ssissippi
sissippi
issippi
ssippi
```
`Pneumonoultramicroscopicsilicovolcanoconiosis`:
```
                      Pneumonoultramicroscopi
                     Pneumonoultramicroscopic
                    Pneumonoultramicroscopics
                   Pneumonoultramicroscopicsi
                  Pneumonoultramicroscopicsil
                 Pneumonoultramicroscopicsili
                Pneumonoultramicroscopicsilic
               Pneumonoultramicroscopicsilico
              Pneumonoultramicroscopicsilicov
             Pneumonoultramicroscopicsilicovo
            Pneumonoultramicroscopicsilicovol
           Pneumonoultramicroscopicsilicovolc
          Pneumonoultramicroscopicsilicovolca
         Pneumonoultramicroscopicsilicovolcan
        Pneumonoultramicroscopicsilicovolcano
       Pneumonoultramicroscopicsilicovolcanoc
      Pneumonoultramicroscopicsilicovolcanoco
     Pneumonoultramicroscopicsilicovolcanocon
    Pneumonoultramicroscopicsilicovolcanoconi
   Pneumonoultramicroscopicsilicovolcanoconio
  Pneumonoultramicroscopicsilicovolcanoconios
 Pneumonoultramicroscopicsilicovolcanoconiosi
Pneumonoultramicroscopicsilicovolcanoconiosis
neumonoultramicroscopicsilicovolcanoconiosis
eumonoultramicroscopicsilicovolcanoconiosis
umonoultramicroscopicsilicovolcanoconiosis
monoultramicroscopicsilicovolcanoconiosis
onoultramicroscopicsilicovolcanoconiosis
noultramicroscopicsilicovolcanoconiosis
oultramicroscopicsilicovolcanoconiosis
ultramicroscopicsilicovolcanoconiosis
ltramicroscopicsilicovolcanoconiosis
tramicroscopicsilicovolcanoconiosis
ramicroscopicsilicovolcanoconiosis
amicroscopicsilicovolcanoconiosis
microscopicsilicovolcanoconiosis
icroscopicsilicovolcanoconiosis
croscopicsilicovolcanoconiosis
roscopicsilicovolcanoconiosis
oscopicsilicovolcanoconiosis
scopicsilicovolcanoconiosis
copicsilicovolcanoconiosis
opicsilicovolcanoconiosis
picsilicovolcanoconiosis
icsilicovolcanoconiosis
```
### Acknowledgements
Thanks to [dzaima](https://codegolf.stackexchange.com/users/59183/dzaima), [Leaky Nun](https://codegolf.stackexchange.com/users/48934/leaky-nun), [Mr. Xcoder](https://codegolf.stackexchange.com/users/59487/mr-xcoder) for everything but the very idea of this challenge.
  
[Answer]
# [Python 2](https://docs.python.org/2/), 60 bytes
```
n=input();l=len(n)
for i in range(l):print(l/2*' '+n)[i:l+i]
```
[Try it online!](https://tio.run/##FcKxCoAgFAXQva@QFjWHwNHwS6KhwerB6/pQG/p6o8ORt10ZvndEgjzN2IUjJxjY4chFkSKosuNMhm2QQmiGZz9ppR3sSoEdbb2PN9X6F6HxAw "Python 2 – Try It Online")
[Answer]
# [MATL](https://github.com/lmendo/MATL), 8 bytes
```
nXyPGZ+c
```
[**Try it online!**](https://tio.run/##y00syfn/Py@iMsA9Sjv5/3/13MziYhAqKMhUBwA "MATL – Try It Online")
### Explanation
```
n    % Implicit input. Number of elements
Xy   % Identity matrix of that size
P    % Flip vertically
G    % Push input again
Z+   % 2D convolution, maintaining size
c    % Convert to char (char 0 is displayed as space). Implicitly display
```
[Answer]
# [Retina](https://github.com/m-ender/retina), ~~70~~ 59 bytes
```
.
$.'$* $_$.`$* ¶
(?=((....))+)(?<-1>.)+(.*?)(?<-2>.)+¶
$3¶
```
[Try it online!](https://tio.run/##K0otycxL/P9fj0tFT11FS0ElXkUvAUgf2salYW@roaEHBJqa2poa9ja6hnZ6mtoaelr2YJ4RiAdUpmJ8aNv//@H5RTkpAA "Retina – Try It Online") Edit: Saved 11 bytes with some help from @MartinEnder. Explanation: The first stage repeats the input once for each character, padding it appropriately on each line to get the shear. The last stage then removes 25% from each side to produce the desired result.
[Answer]
# Java 8, ~~120~~ 103 bytes
```
s->{int l=s.length(),i=l/2;for(;i-->0;s=" "+s+" ");for(;++i<l;System.out.println(s.substring(i,l+i)));}
```
-17 bytes thanks to *@OlivierGrégoire*.
**Explanation:**
[Try it here.](https://tio.run/##jZBNa8MwDIbv@xUiJ5s02djVS2Ef15VBDxuMHVzH7dQ5lrGcwij57Zmb5LhDQTJYlvy8r476pCsK1h/bn9E4zQyvGv35BgB9snGvjYXN5QpwImzBiG2K6A/AUuXqkDMHJ53QwAY8NDBytT7naXAN1876Q/oWcoWNu71Xe4pCYVWt7xQ3BRQll/mUc70s8cGp7S8n29XUpzpkUnJecM39jieuwJUrUUqphlHN8NDvXIYvGiaVXfawCP38Ai1nA742onh8@nh@KSbxAP@wlpep952ia6/s7ZD5EiHglRNv3vYdeepdirpDE4kNBTSM2Q6dyBntyZBHyh8Xy7qH8Q8)
```
s->{                      // Method with String parameter and no return-type
  int l=s.length(),       //  Length of the input-String
      i=l/2;              //  Temp index-integer (starting at halve the length floored)
  for(;i-->0;             //  Loop (1) from `l/2` to 0 (exclusive)
    s=" "+s+" "           //   Add spaces before and after the input-String
  );                      //  End of loop (1)
                          //  (If the input was "World", it is now "  World  ")
  for(;++i<l;             //  Loop (2) from 0 to `l` (exclusive)
    System.out.println(   //   Print:
      s.substring(i,      //    Substring of the modified input from `i`
                    l+i)  //    to `l+i` (exclusive)
    )                     //   End of print
  );                      //  End of loop (2)
}                         // End of method
```
[Answer]
## Haskell, ~~64~~ 62 bytes
```
f s|l<-length s=take l$take l<$>scanr(:)""(([2,4..l]>>" ")++s)
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/P02huCbHRjcnNS@9JEOh2LYkMTtVIUcFQtmo2BUnJ@YVaVhpKilpaEQb6Zjo6eXE2tkpKShpamsXa/7PTczMU7BVSMnnUlBQyE0s8I1XKCgtCS4p8slTUFFIU1AKzy/KSVHCJZubWVwMQgUFmUr/AQ "Haskell – Try It Online")
How it works:
```
l<-length s               -- let l be the length of the input string
      ([2,4..l]>>" ")     -- take l/2 spaces and
                     ++s  -- append s
    scanr(:)""            -- make a list of the inits of the above string, e.g.
                          -- "  world" -> ["  world"," world","world","orld"...]
  take l <$>              -- take the first l chars of each string
take l                    -- and the first l strings
```
[Answer]
## SWI Prolog, 234 bytes
```
h(_,0,_,_,[]).
h(T,N,S,L,[H|U]):-sub_string(T,S,L,_,H),M is N-1,A is S+1,h(T,M,A,L,U).
s(T,R):-string_length(T,L),findall('_',between(1,L,_),A),string_chars(B,A),
                   string_concat(B,T,C),string_concat(C,B,D),S is L-((L-1)/2),h(D,L,S,L,R).
```
Maybe try online here: <http://swish.swi-prolog.org/p/hEKigfEl.pl>
NB.
1. The last line is one long line, I added a linebreak and spaces here just to avoid horizontal scrollbar in this answer.
2. The question involves spaces for padding, but Swish online doesn't show them cleanly because of HTML rendering interactions, you have to view source in browser dev tools to check they are present (they are). I've changed the padding to be `_` here, as it demonstrates it working and doesn't affect the byte count.
Examples running in Swish:
[![Test cases](https://i.stack.imgur.com/uL1k1.png)](https://i.stack.imgur.com/uL1k1.png)
Approach, basically the first thing I could make work at all, and doubtless a skilled Prolog user could shorten it a lot:
* Given a string of length L, the output will have L lines, and each line will be L characters long, so 'L' shows up a lot. Countdown from L to 0 for the number of lines, L for the substring length for each line.
* Create a padding string of L spaces (underscores) long, add it to both ends of the input string, because that's a simple length which is definitely going to be enough padding.
* Calculate a starting offset into this triple-length string and recurse, generating a substring each time, into a list of results.
Explained and commented code (might not run), read from `superacrostic()` down, then `helper()` main body, then `helper()` base case:
```
% helper function recursive base case, 
% matches when counter is 0, other input has any values, and empty list 'output'.
helper(_,0,_,_,[]). 
% helper function recursively generates substrings
% matching a padded input Text, a line Counter
% a substring starting Offset, a line Length,
% and an output list with a Head and a Tail
helper(Text, Counter, Offset, LineLength, [Head|Tail]):-
    sub_string(Text, Offset, LineLength, _, Head),    % The list Head matches
                                                      % a substring of Text starting 
                                                      % from Offset, of LineLength chars 
                                                      % and
    NextCounter is Counter-1,                         % decrement the Counter
    NextOffset is Offset+1,                           % increment the offset
    helper(Text, NextCounter, NextOffset, LineLength, Tail).  % Recurse for list Tail
% Result is a superacrostic for an input string Text, if
superacrostic(Text, Result):-
    string_length(Text, Length),                   % Length is length of input, 
                                                   % Text = 'ABXCD', Length = 5
                                                   % and
    findall('_',between(1,Length,_),PaddingList),  % PaddingList is a list of padding
                                                   % chars Length items long, 
                                                   % ['_', '_', '_', '_', '_']
                                                   % and
    string_chars(PaddingString, PaddingChars),     % PaddingString is the string from 
                                                   % joining up that list of chars
                                                   % '_____'
                                                   % and
    string_concat(PaddingString, Text, Temp),      % Temp is Text input with a
                                                   % padding prefix
                                                   % Temp = '_____ABXCD'
                                                   % and
    string_concat(Temp, PaddingString, PaddedText), % PaddedText is Temp with 
                                                    % a padded suffix
                                                    % Temp = '_____ABXCD_____'
                                                    % and
    S is Length - ((Length - 1) / 2),              % Starting offset S for the substring
                                                   % is just past the padding,
                                                   % then half the input length back
                                                   % '_____ABXCD_____'
                                                   %     |
                                                   % to start the first line,
                                                   % and
    helper(PaddedText, Length, S, Length, Result). % Result is the list generated from 
                                                   % the helper function, 
    % to recurse Length times for that many output rows, S starting offset, 
    % Length linelength, and Result 'output'.
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 11 bytes
```
g;úIvDIg£,À
```
[Try it online!](https://tio.run/##MzBNTDJM/f8/3frwLs8yF8/0Q4t1Djf8/5@bWVwMQgUFmQA "05AB1E – Try It Online")
**Explanation**
```
g;ú           # prepend len(input)/2 spaces to input
   Iv         # for each char of input do
     D        # duplicate current string
      Ig£     # take the first len(input) chars
         ,    # print
          À   # rotate the string to the left
```
[Answer]
## JavaScript (ES6), 75 bytes
```
f=(s,k=1,l=s.length)=>k>l?'':(' '.repeat(l)+s).substr(l/2+k,l)+`
`+f(s,k+1)
console.log(f("World"))
```
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), 10 chars = 22 bytes
```
{⊢⌺(≢⍵)⊢⍵}
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///P/hR24TqR12LHvXs0njUuehR71ZNEK93ay1QTkHd0SnC2UUdAA "APL (Dyalog Unicode) – Try It Online")
`{`…`}` anonymous function where the argument is represented by *⍵*
 `⊢` provide the covered area when
 `⌺(`…`)` sliding a stencil of size
  `≢` length of
  `⍵` the argument
 `⊢` on
 `⍵` the argument
The way this works is by letting each character form the middle of a string with the same length as the input, padding left or right as needed. Take e.g. `ABXCD`:
The string has five characters, so the stencil will have an "opening" that is five characters wide.
`┌──↓──┐` stencil opening with middle marker  
`│ ABX│CD` let `A` be in the middle  
`│ ABXC│D` then `B`  
`│ABXCD|` etc.  
`A|BXCD |`  
`AB|XCD  |`  
`└──↑──┘` final stencil position
[Answer]
# [PHP](https://php.net/), 98 bytes
```
for(;~($a=$argn)[$i++];)$i&1?$t.=substr($a,$i/2)."
":$t=($s.=" ").substr($a,0,-$i/2)."
$t";echo$t;
```
[Try it online!](https://tio.run/##RcxLCsIwEADQfU8hwyANrfGzNIZewb24iKHagTQTMqlLrx5FEPePl6ZUT0OaUoMuP6KFcxyXmSMvoWQ3k88snhN5oUCenxy8i@w5EgsJmHrn3JpXi85@A3VB6rqrUUjr/YBFW1luUvIH9Ejbg9LQwBGLbVG0hRUo/Qe7fvMzWMCMfmIsptY3 "PHP – Try It Online")
[Answer]
# JavaScript (ES8), ~~66~~ ~~63~~ 62 bytes
Returns an array.
```
s=>[...s].map((_,x)=>s.padStart(l*1.5).substr(x,l),l=s.length)
```
---
## Try it
```
o.innerText=(f=
s=>[...s].map((_,x)=>s.padStart(l*1.5).substr(x,l),l=s.length)
)(i.value="Pneumonoultramicroscopicsilicovolcanoconiosis").join`\n`;oninput=_=>o.innerText=f(i.value).join`\n`
```
```
<input id=i><pre id=o>
```
---
## Explanation
```
s=>
```
Anonymous function taking the string as an argument via parameter `s`.
```
[...s]
```
Split the string to an array of individual characters.
```
l=s.length
```
Get the length of the string and assign it to variable `l`.
```
.map((_,x)=>                                        )
```
Map over the array, passing each element through a function, where `x` is the index of the current element.
```
s.padStart(l*1.5)
```
For each element, return the original string with spaces prepended until it's length is 1.5 times that of it's original length.
```
.substr(x,l)
```
Get the substring of length `l` beginning from the current element's index.
[Answer]
# [V](https://github.com/DJMcMayhem/V), ~~14~~, 11 bytes
```
òlÙxHÄ$x>>ê
```
[Try it online!](https://tio.run/##K/v///CmnMMzKzwOt6hU2NkdXvX/v0dqTk4@AA "V – Try It Online")
3 bytes saved thanks to @nmjmcman!
Hexdump:
```
00000000: f26c d978 48c4 2478 3e3e ea              .l.xH.$x>>.
```
Original approach (18 bytes):
```
ø..
Duu@"ñLÙxHÄ$x>
```
Explanation:
```
ò           " Recursively:
 l          "   Move one char to the right (this will break the loop if we move too far
  Ù         "   Duplicate this line down
   x        "   Delete the first character on this line
    H       "   Move to the first line
     Ä      "   Duplicate this line up
      $     "   Move to the end of this line
       x    "   And delete a character
        >>  "   Put one space at the beginning of this line
          ê "   And move to this column on the last line
            " (implicit) ò, end the loop.
```
[Answer]
# [PowerShell Core](https://github.com/PowerShell/PowerShell), 68 bytes
```
0..($L=($a="$args").Length-1)|%{-join(' '*($L/2)+$a)[($_..($_+$L))]}
```
[Try it online!](https://tio.run/##K8gvTy0qzkjNydFNzi9K/f/fQE9PQ8XHVkMl0VZJJbEovVhJU88nNS@9JEPXULNGtVo3Kz8zT0NdQV0LqEzfSFNbJVEzWkMlHqQtXlvFR1Mztvb///9KuZnFxSBUUJCpBAA "PowerShell Core – Try It Online")
### Ungolfed explanation
```
# Input string ABXCD
# -> indexes  0,1,2,3,4  string indexing and num of output lines.
# -> Pad with half-len of spaces __ABXCD.
# -> sliding window array of chars:
# __ABXCD
# |    |       0..4
#  |    |      1..5
#   |    |     2..6
#    |    |    3..7   (selecting indexes past the end returns $nulls, no error)
#     |    |   4..8
# joining those chars into a line
$Text = "$args"                            # script args array to string.
$L    = $Text.Length - 1                   # useful number
$Offsets = 0..$L                           # range array 0,1,2,3,.. to last offset
$Offsets | ForEach-Object {                # Offsets doubles as number of output lines
    $LinePadding = ' ' * ($L / 2)          # lead padding string __
    $PaddedText  = $LinePadding + $Text    # -> __ABXCD
    $Chars = $_..($_+$L)                   # windows 0..4, then 1..5, then 2..6, etc.
    $Line  = $PaddedText[$Chars]           #_,_,A,B,X then _,A,B,X,C then A,B,X,C,D etc.
    -join $Line                            # __ABX  then _ABXC then ABXCD etc.
}
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt), ~~19~~ ~~17~~ 14 bytes
*Saved 5 bytes thanks to @ETHproductions and @Shaggy*
```
¬£iSp½*Ul¹tYUl
```
[Test it online!](https://ethproductions.github.io/japt/?v=1.4.5&code=rKNpU3C9KlVsuXRZVWw=&input=Im1pc3Npc3NpcHBpIgotUg==)
`-R` flag added to join with newlines (visibility purposes)
## Explanation
```
¬£iSp½*Ul¹tYUl
                U = Implicit input
¬               Split the input into an array of chars
 £              Map; At each char:
  i               Insert:
   S                Space " "
    p               repeated(
     ½*Ul           .5 * U.length times 
         ¹          )
          t        Substring(
           Y         Index,
            Ul       U.length) 
```
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 26 bytes
```
Ａ⁺¹÷Ｌθ²δＦδ⟦✂θι⁺ιδ⟧Ｆ∕θ²Ｃ¹±¹
```
[Try it online!](https://tio.run/##Nc09C8IwEMbx3U9x4x2kQ107iS6CSMHBQRxCEtODkJgXC3760xZdnunP7zGTLibpILKrlX3EMbwq9gqOsR14Zuvw5KJvE2ZSsKXvWBo2j1QALcFYODa8XQIbh1kBK1gBXjK6/8uflFcB9un5Xi7OzuvmsCcaRK6pBCvdLF0NHw "Charcoal – Try It Online") Link is to verbose version of code.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 11 bytes
```
LH⁶ẋ;ṫJḣ€LY
```
[Try it online!](https://tio.run/##ASQA2/9qZWxsef//TEjigbbhuos74bmrSuG4o@KCrExZ////QUJYQ0Q "Jelly – Try It Online")
## How it works
```
LH⁶ẋ;ṫJḣ€LY   "ABXCD"
L             5
 H            2.5
  ⁶ẋ          "  "
    ;         "  ABXCD"
     ṫJ       ["  ABXCD"
               " ABXCD"
               "ABXCD"
               "BXCD"
               "XCD]
        ḣ€L   ["  ABX"
               " ABXC"
               "ABXCD"
               "BXCD"
               "XCD]
           Y  "  ABX
                ABXC
               ABXCD
               BXCD
               XCD"
```
[Answer]
# [QBIC](https://drive.google.com/drive/folders/0B0R1Jgqp8Gg4cVJCZkRkdEthZDQ), 32 bytes
```
_L;|A=space$(a'\`2)+A[a|?_sA,b,a    
```
Man, it's time for me to add `space$` to QBIC...
## Explanation
```
  ;             Read a cmd line parameter as A$
_L |            And take its length as 'a'
A=space$        Set A$ to a number of spaces
(a'\`2)           equal to its own length halved
+A                prepended to itself
[a|             FOR b= 1 to the length of A$
?_sA,b,a        Print a substring of our space-padded A$, starting at the b'th character, running for a chars
```
## Sample run
```
Command line: acknowledgement
       acknowle
      acknowled
     acknowledg
    acknowledge
   acknowledgem
  acknowledgeme
 acknowledgemen
acknowledgement
cknowledgement
knowledgement
nowledgement
owledgement
wledgement
ledgement
edgement
```
[Answer]
# Mathematica, 88 bytes
```
T=Table;Column@Reverse@T[T[" ",i]<>StringDrop[s=#,-i],{i,d=-⌊StringLength@s/2⌋,-d}]&
```
[Answer]
# [Haskell](https://www.haskell.org/), ~~86~~ 70 bytes
This is (still) way too long, but thanks @bartavelle for reminding me that outputting a list of strings is acceptable too!
```
f s|m<-div(length s)2=take(2*m+1).(`drop`((*>)s" "++s))<$>[m+1..3*m+1]
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/P02huCbXRjcls0wjJzUvvSRDoVjTyLYkMTtVw0grV9tQU08jIaUovyBBQ0PLTrNYSUFJW7tYU9NGxS4aKKunZwxSFPu/uKRIwVZBKTy/KCdFiSs3MTMPyC0oLQkuKfLJU1BRKM7ILwdSQNtKiv4DAA "Haskell – Try It Online")
[Answer]
# Excel VBA, 68 Bytes
### Golfed
Anonymous VBE immediate window function that takes input from cell `[A1]` and outputs to the VBE immediate window
```
l=[Len(A1)]:For i=Int(-l/2)+2To l/2+1:?Mid(Space(l-i)&[A1],l,l):Next
```
### Ungolfed
```
Sub C(ByVal s As String)
    Let l = Len(s)
    For i = Int(-l / 2) + 2 To l / 2 + 1 Step 1
        Debug.Print Mid(Space(l - i) & s, l, l)
    Next i
End Sub
```
[Answer]
# [Python 3](https://docs.python.org/3/), 68 bytes
```
a=input()
c=len(a)
b=a.center(c*2)
for i in range(c):print(b[i:i+c])
```
[Try it online!](https://tio.run/##BcExDoAgDADAnVcwtpo46EbCS4wDNFWakEJIHXw93vXPStNjzhRF@2uAjmJlhYQux7QRq/EAWnZ0dxtevKgfSR8GwtCHqEE@JchKF85ZuNb2Aw "Python 3 – Try It Online")
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), ~~133~~ 119 bytes
```
$a="$args";$L=$a.Length;$m=($L+1)/2;$s=" "*($m-1)+$a+" "*($m-1);for($h=0;$h-lt$L;$h++){$r="";0..$L|%{$r+=$s[$_+$h]};$r}
```
[Try it online!](https://tio.run/##RcfBCsIgHAfgVwn5BVuytXUV38BD94gQsSmo/6FbHWrPbrt1@vhmettcnA2hVmjJoPNUmICS0L2yaVqcQJQNFB/b80WgSHZgpwaxG1sOzf8TT8oNnBwEXBcWqF3O2w@yZEwMfQ/1Pe7jEuWGB4e7bwJ5q7Wya7JrpERrWLKO3mQqhmZvig/e0IuC0YkMJU/FF/YD "PowerShell – Try It Online")
**Ungolfed**
```
$a="$args"
$L=$a.Length                        # the length of the input
$m=($L + 1) / 2                     # the midpoint of the input
$s=" " * ($m-1) + $a + " " * ($m-1) # create a string using the input and padded on both sides with spaces
for($h=0;$h -lt $L;$h++) {          # the height, matching the length of the input
    $r=""                           # init/reset the output string
    0..$L | % {                     # number range to represent each character in the string
        $r+=$s[$_+$h]               # append the output string with the next character
    }
    $r                              # write the output
}
```
[Answer]
# [Python 2](https://docs.python.org/2/), ~~76 74~~ 73 bytes
*-1 thanks to @FelipeNardiBatista*
Of course, not as short as the other Python answer, but it's worth trying a completely different method:
```
n=input();x=len(n)
for i in range(x):print((2*x-~i)*' '+n)[x+x/2:2*x+x/2]
```
[Try it online!](https://tio.run/##HcVBCoMwEAXQfU8R3GTGEIpZpngScaFtqgPyDSHCePoU@jYv33U/EVrDKMhXJX7peCQQ@PE9ixEjMGXBlkg55iKoROpIvfiBubfGOvCkTp8hhv7/3Fq3rO9P6n4 "Python 2 – Try It Online") (with the 74 byte version)
This first generates the full String, and then slices it to fit the square.
---
# Explanation
```
n=input();                                                  - takes input and assigns it to a variable n
          x=len(n)                                          - assigns the length of the input to a variable x
for i in range(x):                                          - iterates on the range 0...x, with a variable i
                   print                                    - outputs the result
                         ((2*x-i-1)*' '+n)                  - creates the "diamond" string
                                          [x+x/2:2*x+x/2]   - crops the string to fit the box
```
[Answer]
# [J](http://jsoftware.com/), 19 bytes
```
|.!.' '"{~2%~#\-#\.
```
[Try it online!](https://tio.run/##y/r/P03B1kqhRk9RT11BXam6zki1TjlGVzlGj4srNTkjXyFNTc9OQd3RKcLZRV3BWkE9PL8oJwXMys0sLgahgoJM9f//AQ "J – Try It Online")
## Explanation
```
|.!.' '"{~2%~#\-#\.  Input: string S
             #\      Length of each prefix of S, [1, 2, ..., len(S)]
                #\.  Length of each suffix of S, [len(s), ..., 2, 1]
               -     Subtract elementwise
          2%~        Divide by 2
                     We now have a range [(1-len(S))/2, ..., -1, 0, 1, ..., (len(S)-1)/2]
       "{~           Use each value to operate on S
|.!.' '                Perform a shift while replacing characters with ' '
```
[Answer]
# [Perl 5](https://www.perl.org/), 53 + 1 (`-n`) = 54 bytes
```
$t=$"x(($\=y%%%c)/2).$_;say substr$t,$_,$\for 0..$\-1
```
[Try it online!](https://tio.run/##FcLRCYAgEADQVSJOMEjTwK9whDYQoqJAKBXPoJbvosdLWz4MERQL9c05OPswxtam6xsJ04DzU@G1YMlQWphacHvMlZISnNBEp0f8p@TfmIqPAUmMRiqtSIQP "Perl 5 – Try It Online")
[Answer]
# [Ruby](https://www.ruby-lang.org/) `-nl`, 44 bytes
```
puts (0...c= ~/$/).map{$_.center(c*2)[_1,c]}
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72kqDSpcnm0km5ejlLsgqWlJWm6Fjd1CkpLihU0DPT09JJtFer0VfQ19XITC6pV4vWSU_NKUos0krWMNKPjDXWSY2sheqBaF6zOzSwuBqGCgkyIEAA)
[Answer]
# [Japt](https://github.com/ETHproductions/japt) [`-R`](https://codegolf.meta.stackexchange.com/a/14339/), 11 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
¬£îUûUÊÑ sY
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LVI&code=rKPuVftVytEgc1k&input=IlBuZXVtb25vdWx0cmFtaWNyb3Njb3BpY3NpbGljb3ZvbGNhbm9jb25pb3NpcyI)
```
¬£îUûUÊÑ sY     :Implicit input of string U
¬               :Split
 £              :Map each element at 0-based index Y
  î             :  Slice the following to the length of U
   Uû           :    Centre pad U with spaces to length
     UÊ         :      Length of U
       Ñ        :      Multiplied by 2
         sY     :    Slice from index Y
                :Implicit output joined with newlines
```
[Answer]
# [C# (.NET Core)](https://www.microsoft.com/net/core/platform), 101 bytes
```
(a)=>{int L=a.Length,l=L/2;for(;l-->0;)a=" "+a+" ";for(;++l<L;)Console.WriteLine(a.Substring(l,L));};
```
Basically @KevinCruijssen's answer. Saves 2 bytes because `string.Length` doesn't need () and another 2 bytes because the second argument of `string.Substring()` is length rather than end Index, but then loses 2 bytes because `Console.WriteLine()` is longer. I had a more naive implementation, but it was about twice as long so... 
[Answer]
# [jq](https://stedolan.github.io/jq/), ~~41~~ 39 bytes
```
(length/2*" "+.)[./""|keys[]:][:length]
```
[Try it online!](https://tio.run/##yyr8/18jJzUvvSRD30hLSUFJW08zWk9fSakmO7WyODrWKjbaCiId@/@/kqNThLOLEpdSeH5RTgqQzs0sLgahgoJMIC8gL7U0Nz8vvzSnpCgxNzO5KL84Ob8gM7k4MyczOb8sPyc5MS8/OT8vMx@oSQkA "jq – Try It Online")
]