In both questions and answers, it is often necessary to show how people pronounce words. How should we go about showing that?
Pronunciation can be represented either phonemically or phonetically.
Phonemes are the perceptually different units of sound a language that are contrastable (that is, switch one phoneme for another, and you get a different word). Depending on a number of circumstances, they may actually be pronounced a number of different ways, though neither the speaker nor the listener will generally notice. When doing phonemic transcription (called transcripción fonológica in Spanish), we will transcribe the letter S always as /s/, regardless of whether it is aspirated (as in many places), elided entirely (often in the Caribbean, with or without pre-vocal lengthening), voiced (like in mesmo), apico-dental (as in Spain), etc. The reason is that all of those changes are generally fully predictable and always recognized by Spanish speakers as the same phoneme. For English, many of us are taught in school about "long" and "short" vowels. These are phonemes — the "long a" will be pronounced differently in different countries, but always recognized as "long a" regardless the actual pronunciation used (it's a bit more complicated in English than that, but I think that gets the idea across).
Spanish has a (thankfully) relatively limited number of phonemes. They are as follows:
(semi)vowels: a e i o u j w
(semi)consonants: b d f g k l ʎ m n ɲ p ɾ r s t ʧ x ʝ θ j w
We write phonemic transcriptions /between slashes/. Additionally, we use a small raised vertical tick ( ˈ U+02C8 MODIFIER LETTER VERTICAL LINE) in front of a syllable to show that it receives primary stress. There is also a lowered version for secondary stress ( ˌ U+02CC MODIFIER LETTER LOW VERTICAL LINE) but that is rarely (if ever) needed in Spanish. There is also a strong stress that uses two of the raised ones, which may be useful in showing contrastive speech /ˈˈʝo no ˈfwi/ vs /ˈʝo no ˈˈfwi/, but probably unlikely. Generally speaking, just using an non-curly apostrophe should be sufficient for marking stress, even if it's not technically correct, since it's generally indistinguishable for most fonts.
We can mark vowels as being long with the double triangle ( ː U+02D0 MODIFIER LETTER TRIANGLE COLON) crees /creːs/, though this normally isn't necessary and would only happen with certain doubled vowels, and is generally part of a phonetic transcription.
We mark syllable breaks, optionally, by using a period ( . ). This is normally only done if it's not clear where the breaks are or to emphasize a hiatus.
Phonetic transcription is used when we need to represent differences that will not generally be perceived by speakers (other than, say, marking an accent). Thus as already mentioned, the phoneme /s/ (normally represented by the letter S but in many dialects also by C[ie]) can be pronounced many different ways depending on what phonemes come after or before. In a word like mesmo /'mesmo/, the /s/ is not normally pronounced [s], but rather sneakily changes to [z], because the voiced quality of the /m/ bleeds over to the /s/ (the technical term for this is called assimilation). But in an aspirating dialect, the /s/ is generally pronounced [h] which doesn't assimilate, so we are left with ['mehmo]. In certain regions using a three-vowel system, the /e/ and /o/ are pronounced more like [i] and [u], and we can get ['mismu] or ['mizmu] or ['mihmu] (depending on what other features are present — I admit I'm not super familiar with those dialects). In an eliding dialect, the /s/ is only represented by the effect it has on other sounds, by lengthening them ['me:mo] or adjusting the vowel ['mɛmo].
There are numerous symbols that may need to be used when rendering a phonetic transcription and many levels of "closeness" that one can use. Generally, though, one uses as a base the phonemic transcription and then adding in the level of detail necessary. Technically, in most dialects, Spanish vowels aren't [aeiou] but [a̠e̞io̞u]. 99.99% of the time, it isn't necessary to represent that. If it's not pertinent, we shouldn't mark it (that's how linguists do it too). That said, for reference purpose, I'll include here a table for all the most common symbols that we may need, ordered by grapheme (letter, normally goes italics or between
>) and phoneme.
<a> as /a/ [a̠] - standard "close" rendering [a] - before palatals /ʧʝɲʎ/ [ɑ] - before /oux/ and syllable-final /l/ <b> as /b/ [β̞] - default, generally spelt simply [β] [b] - after pause or /mn/ <c> as /θ/ see <z> (distinción and ceceo dialects) <c> as /s/ see <s> (seseo dialects) <ch> as /ʧ/ [ʧ] - default (also spelled [tʃ] [ʃ] - dialectal (W./S. Spain, N. Mexico, Chile, Caribbean) <d> as /d/ [ð̞] - default and dialectally word-final (C. Spain) generally spelt simply [ð] [d̪] - after pause or /mnl/, generally spelt [d] [t] - dialectally word-final (NE. Spain and some America) [ ] - dialectally word-final and intervocalically <f> as /f/ [f] - default [v] - often before /bdgmnl/ [ɸ] - dialectal [x] - dialectal (where [ɸ] is used, often before /uw/) <g> as /x/ see <j> <g> as /g/ [ɣ̞] - default, generally spelt simply [ɣ] [ɣ̞̟] - before /ei/ (but NOT after pause or /mn/), often simply [ɣ̟] [g] - after pause or /mn/ [g̟] - after pause or /mn/ AND before /ei/ [ ] - may be elided word initially in /gw/ <j> as /x/ [x] - default [x̟] - before /ei/ [h] - some dialects (Caribbean esp.) [χ] - some dialects (esp. Central Spain before /uw/) <k> as /k/ [k] - default [k̟] - before /ei/ <l> as /l/ [l] - default [l̟] - before /θ/ [l̪] - before /tdnrs/ [ʎ] - before /ʧʝ/, also seen as [lʲ] <ll> as /ʝ/ see <y> (yeísta dialects) <ll> as /ʎ/ [ʎ] - default [ʝ] - default yeísta <m> as /m/ [m] - default and before /bp/ [ɱ] - before /f/ [n] - before /tslɾr/ [ɲ] - before /ʧʝ/ [ŋ] - before /kgx/ <n> as /n/ [n] - default and before /tslɾr/ [m] - before /bp/ [ɱ] - before /f/ [ɲ] - before /ʧʝ/ [ŋ] - before /kgx/ <p> as /p/ [p] - default [β] - before /t/ <s> as /s/ [z] - often before /bdgmnl/ <t> as /t/ [t̪] - default, generally spelt [t] <y> as /ʝ/ [ʝ] - most places [ɟʝ] - after pause or /nmɲlʎ/ <z> as /s/ see <s> (seseo dialects) <z> as /θ/ [θ̟] - default, often spelt [θ] [ð] - often before /bdgmnl/ (voiced consonants)