Trouble with LaTeX export, esp. re: BibLaTeX

Howdy! I'm a big fan and have been using MMC for years and years. I have three questions/ comments, if I may.

1.Is it possible to include the path to my bib file in the header of an md file that MMC can export to LaTeX? For example, I use MMC extensively when writing slides for lecture. My current header is e.g.

```
latex leader: my-beamerNOTTSteaching-header2_biblatex2021
Title: POLI1029: Introduction to Political Data
Subtitle:
Author: Quantitative Data 2
Affiliation: Scott Moser
Event: Topic 5
Date: Week 7
latex mode: beamer
latex begin: my-beamer-begin-doc_biblatex
latex footer: mmd-beamer-footer

`\def\biblatex{../../../Bibliog/scottAll5_BBL.bib}`{=latex}
```
(lines 1-13 of attached)
 But then the `\def\biblatex{../../../Bibliog/scottAll5_BBL.bib}` line needs to be manually cut and pasted to before the 'latex leader' YAML when converted to LaTeX. How can I specify a relative path to my `.bib` file in a YAML header in MMC?

2. Sorry if I"m just being dense, but I'm having trouble getting MMC to export citations to LaTeX. When I export the mmd file to LaTeX in the MMC app, the usual MMD citation commands (e.g. `[@best12-damned]` -- line 49 of attached) doesn't seem to get parsed correctly. What am I doing wrong?

3. [non bibtex/ biblatex related] Can you please include an option to suppress all the empty 'captions' when figures are included? For example, the following markdown:

```
Statistics -> Means ->
Independent samples t-test...

![](../figures/Rcmdr-ind-ttest.png)
```
gets exported to LaTeX by MMC as

```
Statistics -> Means ->
Independent samples t-test{\ldots}

\begin{figure}[htbp]
\centering
\includegraphics[keepaspectratio,width=\textwidth,height=0.75\textheight]{../figures/Rcmdr-ind-ttest.png}
\caption{}
\end{figure}
```
 (lines 23 and 24 in the attached mmd file)

Is it possible to simply remove all the empty `\caption{}` LaTeX tags?

----
Hey! Thanks so much!

Best,
Scott

PS. So sorry! I'm using OSX 10.14.5 and MMC v.4.5.12. Just FYI. Please do let me know if I can help at all! Thanks again! Love your jazz!

  1. ping...?

  2. I am sorry to say, I do not seem to be the right addressee.
    Please check again.
    Adrian

  3. Whoop! So sorry :(
    Thanks,
    scott

  4. Scott,

    My apologies for missing this -- it came in during a time where I was dealing with a big family emergency, and then got lost in the inbox.

    1. You can use the bibtex metadata key. https://fletcher.github.io/MultiMarkdown-6/MMD_Users_Guide.html#bibtex

    2. Citations use # not @ in MultiMarkdown

    3. Updated in MultiMarkdown, which will be included in next update of Composer (version 5 -- more to come about that. But current beta at https://s3.amazonaws.com/files.multimarkdown.com/composer5/MMDComposer5-2022-03-02.zip)

    And again, apologies for the delayed response!

    Fletcher

  5. Fletcher closed this discussion on 04 Mar, 2022 05:15 PM.

  6. scott.moser re-opened this discussion on 11 Mar, 2022 04:52 PM

  7. Dear Fletcher,

    Thank you *VERY MUCH* for your email! I am sorry to hear of your family
    emergency and I hope things are better now.
    I have taken your email to heart and have tried to read up on both MMD6 as
    well as am now using MMD Composer v5 (beta).
    However, I still face one fundamental problem that I simply cannot solve:
    how can I include literal strings in the meta-data? Specifically, how can
    I include relative path(s) to files e.g. my biblatex file such that
    exporting to latex (beamer) produces a path that LaTeX understands?
    For example, the following `mmd` meta data:

    ---
    bibtex: \\../../..///Bibliog/-scottAll5_BBL-URLdoi
    biblatex: "/Users/sm38679/Dropbox/Bibliog/scottAll5_BBL-URLdoi.bib"
    latex leader: my-beamerNOTTSteaching-header3_biblatex2022
    Title: POLI1029: Introduction to Political Data
    Subtitle:
    Author: Introduction
    Affiliation: Scott Moser
    Event: Topic 1
    Date: Week 3
    latex mode: beamer
    LaTeX XSLT: beamer
    ---

    produces this preamble when I export to latex:

    \input{my-beamerNOTTSteaching-header3_biblatex2022}

    \def\bibliocommand{\bibliography{\textbackslash{}\textbackslash{}..\slash
    ..\slash ..\slash \slash \slash Bibliog\slash -scottAll5\_BBL-URLdoi}}

    \def\biblatex{"\slash Users\slash sm38679\slash Dropbox\slash
    Bibliog\slash scottAll5\_BBL-URLdoi.bib"}

    \def\mytitle{POLI1029: Introduction to Political Data}

    \def\subtitle{}

    \def\myauthor{Introduction}

    \def\affiliation{Scott Moser}

    \def\event{Topic 1}

    \def\mydate{Week 3}

    \def\latexxslt{beamer}

    That is, I cannot seem to include either an absolute nor relative
    path, as all the `/` or `//` or `\` get converted

    to the latex equivalent, e.g. `\textbackslash{}` or `\slash` etc.
    (BTW, i know the paths in the above example

    are not correct, I just wanted to show I've tried a number of approach to
    'escape' these characters, all without success.

    I am very sorry if I am being dense. But I cannot even include an absolute
    path in the MMD metadata that gets exported correctly to LaTeX. What am I
    doing wrong?

    Lastly, why does the MMD metadata of `bibtex: VALUE` get exported to
    latex as `\def\bibliocommand{VALUE}` (well, not quite, as above) but
    `biblatex: VALUE`
    gets exported to latex as
    `\def\biblatex{VALUE}`
    It seems inconsistent that some metadata values (variables?) are treated
    differently when exporting to LaTeX / beamer.

    Thank you very much for all your contributions! They are considerable,
    impressive, and most appreciated.

    Best,
    scott

  8. Different metadata keys are used for different things, and some of them
    are user-facing (requiring "LaTeX-ification") and some are code-facing
    (and should be printed "raw"/"as-is").

    I pushed a commit to switch `bibtex` to a "raw" key. This is in MMD
    develop branch now, and will be pulled into upcoming builds of Composer,
    etc.

    I normally have the bibtex file in the same folder as the MMD file, so
    this just never came up for me. You can move it/copy it now as a
    temporary fix to allow you to keep working before the next beta release
    comes up (I just pushed one a bit ago that does not include this.)

    As to your second question -- there are certain standard metadata keys
    that have to be handled specifically (e.g. bibtex). Any "user-created"
    metadata key (basically any other key you want) is handled in a generic
    way.

    Fletcher

  9. Oh wow, thanks so much for your super-speedy and super-informative reply,
    Fletcher!

    I would love to learn more about 'code-facing' metadata keys, as well as
    learning more about the " certain standard metadata keys that have to be
    handled specifically (e.g. bibtex)." Are there resources you could point
    me to? I have through the following in some detail, but would love to know
    more about how MMD and MMD Composer (esp. its 'Export' functionality) work!
    https://fletcher.github.io/MultiMarkdown-6/MMD_Users_Guide.html#bibtexcitations
    https://github.com/fletcher/MultiMarkdown-6
    https://github.com/fletcher/MultiMarkdown-6/tree/develop/texmf/tex/latex/mmd6/beamer
    (which -- and please correct me if I am wrong -- is outdated?)
    and
    https://github.com/fletcher/Composer-5-Support-Files (which, I confess I do
    not exactly understand)

    Thank you again!
    Best,
    scott

  10. I guess better terminology might be "reader-facing" and "code-facing" -- whether the metadata is intended to be in the document for the reader to see. A title would be reader-facing, but the path to the bibtex file would be code-facing.

    The links you include (the GitHub.io) are the most recent published documentation. The only distinction is that I work in the develop branch on GitHub, and pull to master when ready to release a new official version. If you find it easier to look at shorter sections of the documentation, the metadata portion is primarily here -- https://fletcher.github.io/MultiMarkdown-6/syntax/metadata.html

    The Support files are for Composer, not MultiMarkdown per se. They are for customizing the editor -- syntax highlighting, preview CSS, autocompletion/spelling dictionaries, and shortcut expansions.

    These are older, and not necessarily updated for v6, but give an idea of how the overall process works -- https://github.com/fletcher/MultiMarkdown-Gallery

Reply to this discussion Internal reply only staff will see it

Markdown

Attaching KB article:

» »

Read more…

Already uploaded files

  • LectureW07-callingBS_bl21v0.md 13 KB
Attach files

Up to 10MB each.

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions