more flexibility with natbib?

And hello again,

As you can see from my previous posts, I am using MMD with natbib and BibDesk. However, from what I have learned from the official MMD webpage, one is limited in such that it is not possible to use the something like “\citep[see][chap.~2]{jon90}” resulting in “(see Jones et al., 1990, chap. 2)” or a “\citep[e.g.][]{jon90}” resulting in “(e.g. Jones et al., 1990)”.

Has anyone been able to use MMD with the above more powerful natbib support? Or, could anybody help me tweak the respective code?

Alternatively, if there is a command in MMD which leads to ignoring the specified text, I could use the standard natbib citations in Scrivener (e.g. writing <<\citet[see][]{jon90}>> would ignore the text between << and >> so that an export in LaTeX would lead to a well working document).

Many many thanks in advance!

Pascal

Remember - I have never claimed that MMD is a full featured bibliography management tool. It does the basics - entire teams of people have spent years improving bibtex, natbib, endnote, etc. I can’t rival that.

But you can tweak MMD to do whatever you want.

You can create your own XSLT to allow for more complicated citations.

Alternatively, and probably easier, you can just include the raw LaTeX code that you want (since you seem to be familiar with LaTeX and may find it easier to type it yourself) and then change your XSLT template to use clean-text-allow-latex.xslt instead of clean-text.xslt if you want to include lots of raw latex. This may cause unintentional consequences of other special characters not being escaped when you thought they would.

Or, if you just want to include a bit here and there, MMD passes along HTML comments without modifying them by default:

<!--  \citep[see][ ]{john99}  -->

This may be your best solution, as it doesn’t require you to modify MMD, and allows you to use whatever citation code you like.

Fletcher

Having sent some suggestions to Fletcher directly and hearing that it won’t be very likely that MMD will support the more powerful natbib formatting, I think the easiest way for people in my situation is to use the HTML comment trick and combine that with a BibDesk template.

For example, one could generate the following BibDesk template:

<$publications><!--\citet[]{<$citeKey/>}--></$publications> or <$publications><!--\citep[][]{<$citeKey/>}--></$publications> .

If one is sure one does not need to compile to RTF or HTML later (and therefore has to rely on pure MMD syntax for citations, I guess) this works pretty fine. While the code is not overly pretty, one can still use the Scrivener/MMD and BibDesk/natbib combo and benefit from the respective advantages.

Kind regards,

Pascal

Any idea why this isn’t working here? The line above just disappears when I compile to LaTeX. I’ve reinstalled the latest version of MMD, so I’m pretty sure that this has nothing to do with my customized stylesheets. :cry:

What version of MMD are you using?

2.0.b5, and everything works fine when I run ‘mmdtex’ from the commandline. Is this Scrivener’s doing?

You put the new version of MMD in

~/Library/Application Support/MultiMarkdown

right?

Yepp. And it seems to work now… or not. :cry: MMD shows some erratic behaviour when a line starts with . When I compile the following MMD file sections 1 and 2 disappear from the output:

[code]Title: untitled
LaTeX XSLT: latex-snippet.xslt
Base Header Level: 2

A

bla

1

bla

2

B

bla[/code]

However, when I remove section 2 from the MMD file the output is ok again:

[code]Title: untitled
LaTeX XSLT: latex-snippet.xslt
Base Header Level: 2

A

bla

1

bla

B

bla[/code]

There was an error in the initial comment handling that ignored comments when they are in their own paragraph. This has been fixed for the next release.

Thanks! :smiley: