Problems with text wrapping with long hyphenated words or references

Sep 2, 2016 at 2:28 AM

I apologize in advance if there's documentation for how to fix this somewhere; I did a quick search, but couldn't find anything.

A problem I've been having is that the text doesn't wrap correctly when either long hyphenated words or long references are involved.


If the image doesn't show, it's just something like:

Loren ipsum blah blah
blah blah blah Charlie & Schroeder (2014)
blah blah blah blah bla

I have some ideas re how to get around it with long hyphenated words, but I'm not sure what to do about references, besides not using the @ labels -- but that feels like such a hack-y work-around.

Thanks very much in advance,
Sep 2, 2016 at 3:41 AM
Hi YM,

I cannot see the image :-( Can you upload it to some other place?
Is this a problem in the browser or in the generated PDF?

You can also manually insert the ­ element that should give soft hyphens (or \- in latex/bibtex).

-- Daan
Sep 2, 2016 at 4:36 AM
Edited Sep 2, 2016 at 4:50 AM

Here's the image! Thanks very much in advance! It's not a browser thing -- it's present in the pdf.
Sep 2, 2016 at 4:51 AM
Ah, I see. Was this written as Arpaly and Schroeder [@Arp:2010] ?
In that case, Madoko will put an unbreakable space between Shroeder and the reference. You can prevent that by putting in a newline in the Madoko source, i.e.
...upon Arpaly and Schroeder
However, I guess even breaks between the author names should be allowed? And what about generated citations in a author-year style of citations, i.e. building upon @Arp:2010. I need to look into how these are generated and if I need to extend Madoko to handle these cases. Let me know if that applies to you or if the above solution is good enough.
Sep 2, 2016 at 4:58 AM
The way I had been doing it was just
...upon @Arp:2010's discussion
I tried doing what you suggested, i.e. (using your cite-keys)
...upon Arpaly and Schroeder
But the problem with that is that it displays as "upon Arpaly and Schroeder (Arpaly and Schroeder 2014)". But what I want is just "upon Arpaly and Schroeder (2014)'s discussion".

Thanks for the help, though. I have to take a break from this to finish up and submit my paper, but I'll go read the documentation more carefully and try playing around with a couple of things over the weekend to see if there's any way to get it to display the way I want.
Dec 26, 2016 at 5:15 PM
Edited Dec 26, 2016 at 5:15 PM
I've finally figured out the problem. The problem was more with Latex than with Madoko, though there may be things that you could add to Madoko to help users get around the problem in a less 'hack-y' way.

Let me first say that the problem is more general than just with in-text citations. It occurs also with uses of \newcommand (i.e., when one uses \newcommand to define something with special formatting, where that something is long enough that it sometimes flows awkwardly over the margins).

Upon googling, I found that other people had experienced similar problems (see for an especially nice discussion of why this happens with Latex and

For those who, like me, aren't very adept with LaTex and who just want to use Madoko to typeset their academic papers without too much fuss, here's how I ended up getting around the problem:

One option obviously is to typeset the stuff in Madoko, export to .Tex, and then adjust the .Tex accordingly as in the posts I linked to.

But it'd be nicer, obviously, to just work within Madoko, and the snippets option seems to allow one to do so. So, e.g., if one has a para like:
So suppose that one accepts $\LoveDesire$. If we also accept $\HumDes$ and thereby accept $\HL$,
where $\HumDes$ is the thing that runs off the margins, we can get it to not run off margins by enclosing it in a snippet and adding sloppypar as follows in the Markdown code:
~~ Snippet
So suppose that one accepts $\LoveDesire$. If we also accept $\HumDes$ and thereby accept $\HL$
Hopefully this will be helpful to someone!