I found a village, and there's a librarian asking for 2 written books in exchange for one emerald.
I made 2 book&quills, wrote some nonsense and signed them. They are the same item ID #0387 as the one he's asking for, and the same shining book icon. They won't stack though, so I tried putting one in each of the two trade slots. He won't offer the emerald to let me complete the trade though.
Written books are supposed to be stackable but according to this bug report you can't stack them in certain situations. In particular, take note of one of the replies:
Written Books would only stack for me if named the same thing on signing(only tested by calling each "Written Book"). Renaming other written books to the same named would not allow stacking, and unstacked written books would not activate the trade.
Also, you don't need to put anything in before signing it; it can be totally empty. Note also that the Wiki only mentions that copies can be stacked, nothing about whether two otherwise identical books can stack; you can make a copy by putting a written book in a crafting grid with a book and quill; the output should be a stack of two books.
As mentioned already, written books will only stack if they have identical NBT data: same author, same title, same contents, and same "generation" (e.g. original, copy of original, copy of copy). The easiest way to achieve this is to make one written book and then copy it repeatedly for trading.
The second slot in the trading window is intended to support trades like the "gravel + emeralds = flint" or "book + emeralds = enchanted book" (see MC-30415). But with the addition of this two-written-books trade, that probably needs revisiting (MC-71076).
Not in 1.8, which is where this trade exists in vanilla. In 1.8 the original written book remains in the crafting grid and the output is one written book with a higher generation.
Also, it's worth noting that you can place up to 8 book-and-quills in the crafting grid with the original book to make up to 8 copies at a time.
I guess the Wiki is wrong then, or their graphic is misleading; haven't actually tried it myself (there is a LOT of inaccurate/outdated information that I know of; for example, they claim the "spawn size" for ores is the maximum vein size but I disproved that here; for the "chance" for abandoned mineshafts they still use 0.01 as the default, while it was lowered to 0.004 in 1.7; for the effect of "Upper Limit Scale" they claim it controls cave generation - which is a totally separate process (I should know, given my mods) and can be easily verified by using a mapper like Unmined, just a few examples that I know of).
What you wanna do is is go in creative. (I do not know a way to do this in survival without cheats.) Get a book & quill, write a random message in it and name it "Written Book". Then, you the middle mouse button and drag it out to make 16 copies of it! Then trade it to the villager!
If you do not have a middle mouse button, go into the menu by pressing Esc. Go into options, the controls. You will see a control "Pick block" change it to whatever you want that works! (I picked "P" because Pick block.) Then do the exact same thing. Press (The button you chosed) And drag it out!
I have made a new test and if you make a book with some content and some signed name and make an identical book by giving the same content and name for it, it will not stack at first in your inventory. However, if you drop both books, they will turn into stacked books on the ground looking like one stacked item instead of two separate things on the ground. In this way, if the content and name is identical with no mistakes made during writing (no backspaces) then books will stack when dropped and picked back up. If a mistake is made and backspaced, the same mistake would have to be made and backspaced in the book and then the book will stack. In this way, a book with any type of content of any length that is an original will stack with another original book that has the exact same content.
Weird little thing I figured out when I tried to get rid of my books because I thought I couldn't make them stack but ended up picking up a stack of identical books.
They have to be stacked, im not sure if it has to but what ive always done is have the same thing written in the book, usually "asd" or something like that, and name them both "Written Book" and thats always worked for me