In a book I've learned "(name) to moushimasu" as an introduction, but as
japanese has no spaces, would it be written with hiragana as follows or
something different?

(name)ともうします。
CC BY-SA 3.0
2017-10-05T06:31:52.490
53643
2019-12-19T21:08:01.957
26031
question
names
How to write "I am (name)" using hiragana?
If your name Zach is written in Japanese as ザック or ザッハ, you would introduce
yourself as (1).

> (1) ザックともうします。 or ザッハともうします。

Your guess is perfectly correct.  
As you know we don't use a space between words, so it is also difficult even
for native speakers of Japanese how to parse (1) at first glance.  
"と", "も" and "とも" are all possible particles and "もう" could be an adverb in
Japanese language. In a short time, you have to understand that "と" is a
particle but "も", "とも" and "もう" do not function as they are, but they are part
of another word.

To solve this kind of difficulty, we use _kanji_ if possible. You can rewrite
(1) into (2) with using kanji.

> (2) ザックと申{もう}します。 or ザッハと申｛もう｝します。

Now you can understand the meaning of (2) at first glance because you can
easily parse the sentence without getting confused by spurious elements such
as "も", "とも" and "もう" in (1).
CC BY-SA 3.0
2017-10-05T08:06:00.230
53645
2017-10-05T11:57:26.747
2017-10-05T11:57:26.747
20624
20624
53643
answer
For something as short as "Xともうします" you do not need any spaces. Japanese for
adults is almost never written this way, because most Japanese find it clearer
to read when the kanji is used: "Xと申します"

The only time I have seen native Japanese written with pure hiragana is in
books for very young children (usually first-graders, who don't know any
kanji). In these books, _the words are typically separated by spaces_. This
makes comprehension easier when the kanji are missing. The spacing is
different from how Japanese is sometimes written in English-language Japanese
textbooks. For example, particles are usually attached to the words they
follow ("それは おもしろい"), and conjugations that English speakers might interpret
as compound verbs usually have no space ("ありませんでした"). I find these books
interesting, because they show that while the Japanese do have a sense of word
boundaries, it doesn't always match how we think in English.

I have only ever seen spaces in books for very young children. Usually,
Japanese text contains no spaces.
CC BY-SA 3.0
2017-10-06T05:19:30.160
53657
2017-10-06T05:19:30.160
820
53643
answer