Latex commands not being transmitted to tex file

67 views
Skip to first unread message

Ben Watson

unread,
Nov 17, 2017, 4:17:01 PM11/17/17
to MultiMarkdown Discussion List
I am trying to transition from having Scrivener produce the tex file (via MMD.exe), to a workflow where I can have more control (potentially involving XSLT). I looked at the command line that Scrivener was calling, but it's an old version, so much has changed. I can reply with that if needed.

When I manually run the latest version of Multimarkdown.exe against my mmd file, it produces a latex file, but doesn't include any of the latex commands I had included in comments. I've attached a small repro file and its resulting output. The commandline is pretty simple:

multimarkdown.exe  -b -t latex test.mmd

This should just work according to the documentation that I can find. I feel like I must be missing something obvious.

Thanks for any help.

Ben
test.tex
test.mmd

JJ T

unread,
Nov 18, 2017, 4:50:54 PM11/18/17
to MultiMarkdown Discussion List
In MMD6, which is the last version, there is a new way to handle raw code. It is documented here: https://rawgit.com/fletcher/MultiMarkdown-6-Syntax-Guide/master/index.html
Short LaTeX code is written as follows:
`This text will \emph{only} be visible in \LaTeX\ output`{=latex}

Large blocks of LaTeX code can be handled as follows:
```{=latex}
\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
```

The syntax for HTML-only code is similar:
`code`{=html}

And there also exists
`code`{=*}
for both outputs.

Please note that this allows to provide alternative code for HTML and LaTeX, as, for example, this line taken from your file:
Copyright `©`{=html}`\copyright\space`{=latex} 2017 My Name

Best regards

Juanjo

Andrew Wilson

unread,
Mar 14, 2018, 9:52:58 AM3/14/18
to MultiMarkdown Discussion List
Hi,

I have the same issue. I want to include a block of LaTeX code. I found the triple ` syntax to include however the resulting LaTeX code is being wrapped in a \begin{lstlisting}
\begin{adjustwidth} and a \end{lstlisting} \end{adjustwidth}.

Single line of code is working fine.

I am using MultiMarkdown 6.3.

What am I missing?

Thanks for your help.

Andrew

Fletcher T. Penney

unread,
Mar 14, 2018, 9:54:35 AM3/14/18
to Andrew Wilson, MultiMarkdown Discussion List
Hard to help if you don't share your non-working code.

;)


Fletcher
> --
> You received this message because you are subscribed to the Google
> Groups "MultiMarkdown Discussion List" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to multimarkdow...@googlegroups.com
> <mailto:multimarkdow...@googlegroups.com>.
> To post to this group, send email to multim...@googlegroups.com
> <mailto:multim...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/multimarkdown.
> For more options, visit https://groups.google.com/d/optout.

--
Fletcher T. Penney
fletche...@gmail.com

Andrew Wilson

unread,
Mar 14, 2018, 11:02:52 AM3/14/18
to MultiMarkdown Discussion List
That is a very good point.  Sorry about that.  Here is a minimal working example

```{=latex}
\textbf{This is an example of BOLD text}
{\Large This is an example of Large text}
```

is converted to

\begin{adjustwidth}{2.5em}{2.5em}
\begin{lstlisting}[language={=latex}]
\textbf{This is an example of BOLD text}
{\Large This is an example of Large text}
\end{lstlisting}
\end{adjustwidth}

The command is multimarkdown -t latex test3.mmd 

A single line command such as 

`\textbf{this is and example of BOLD text}`{=latex}

converse successfully into the text

\textbf{this is and example of BOLD text}

I am using Multimarkdown 6.3

(I have been using MultiMarkdown since the very first versions. I really appreciate it!!!)

Andrew
Fletcher T. Penney
fletche...@gmail.com

Fletcher T. Penney

unread,
Mar 14, 2018, 11:39:21 AM3/14/18
to Andrew Wilson, MultiMarkdown Discussion List
Works fine for me.

Might need to be sure you are actually using v 6.3 -- `multimarkdown --v`


F-
> fletche...@gmail.com <javascript:>
>
> --
> You received this message because you are subscribed to the Google
> Groups "MultiMarkdown Discussion List" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to multimarkdow...@googlegroups.com
> <mailto:multimarkdow...@googlegroups.com>.
> To post to this group, send email to multim...@googlegroups.com
> <mailto:multim...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/multimarkdown.
> For more options, visit https://groups.google.com/d/optout.

Andrew Wilson

unread,
Mar 14, 2018, 9:05:55 PM3/14/18
to MultiMarkdown Discussion List
Not sure if it is relevant however multimarkdown -v is not a valid option.

multimarkdown  --version

returns:

MultiMarkdown 6 v6.3.0
Copyright © 2016 - 2018 Fletcher T. Penney.
The `MultiMarkdown 6` project is released under the MIT License..

GLibFacade.c and GLibFacade.h are from the MultiMarkdown v4 project:

https://github.com/fletcher/MultiMarkdown-4/

MMD 4 is released under both the MIT License and GPL.


CuTest is released under the zlib/libpng license. See CuTest.c for the
text of the license.
etc .....

Fletcher T. Penney

unread,
Mar 14, 2018, 9:35:19 PM3/14/18
to Andrew Wilson, MultiMarkdown Discussion List
1. That's why I used `multimarkdown --v`... ;)

2. You're going to have to be more specific/precise for me to try and
replicate what is going wrong on your machine. Create a text file with
your broken text. Attach that file to your next email. Run the
commands using the full path to the binary, and include the transcript.

3. I have done the same. `latex.txt` is attached. I used my previously
installed version of 6.3.0, and also compiled a new version from scratch
(same results for both). I also ran the HTML format for comparison.

[minime:~] fletcher% where multimarkdown
/usr/local/bin/multimarkdown
[minime:~] fletcher% /usr/local/bin/multimarkdown --v | grep 6.
MultiMarkdown 6 v6.3.0
Copyright © 2016 - 2018 Fletcher T. Penney.
The `MultiMarkdown 6` project is released under the MIT License..
Copyright (c) 2005-2016, Troy D. Hanson
[minime:~] fletcher% /usr/local/bin/multimarkdown -t latex latex.txt
\textbf{This is an example of BOLD text}
{\Large This is an example of Large text}

[minime:~] fletcher% cat latex.txt
```{=latex}
\textbf{This is an example of BOLD text}
{\Large This is an example of Large text}
```[minime:~] fletcher% /usr/local/bin/multimarkdown -t html latex.txt

[minime:~] fletcher%


4. Unless I am misunderstanding something, it seems to be working
properly for me. You might want to be sure that you only have one copy
of MMD installed?


F-
> fletche...@gmail.com <javascript:>
>
> --
> You received this message because you are subscribed to the Google
> Groups "MultiMarkdown Discussion List" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to multimarkdow...@googlegroups.com
> <mailto:multimarkdow...@googlegroups.com>.
> To post to this group, send email to multim...@googlegroups.com
> <mailto:multim...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/multimarkdown.
> For more options, visit https://groups.google.com/d/optout.

latex.txt

Andrew Wilson

unread,
Mar 14, 2018, 10:07:44 PM3/14/18
to MultiMarkdown Discussion List
Fletcher,

Really appreciate your help and support.  I thought I was going a little crazy. I even did an entire search of my hard drive to see where those extra lines of text were coming from.

I followed your steps exactly, used your file, and my environment worked just as you described. It was the right version of the code.

Then I realised that my minimal working file had a couple of metadata lines (which of course I should have included in my example. You don't need to tell me, this was my oversight.). So gradually removed the metadata and discovered that the line 

LaTeX Mode: memoir 

was there.  

Removing that line fixed the problem.

Thanks so much for your help!

Andrew
Fletcher T. Penney
fletche...@gmail.com

Fletcher T. Penney

unread,
Mar 14, 2018, 10:16:51 PM3/14/18
to Andrew Wilson, MultiMarkdown Discussion List
Yes -- technically Memoir is treated differently than LaTeX internally,
and it doesn't specifically support the raw code block variant. I can
add that to a future version.

(Same would apply to beamer).


F-
> fletche...@gmail.com <javascript:>
>
> --
> You received this message because you are subscribed to the Google
> Groups "MultiMarkdown Discussion List" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to multimarkdow...@googlegroups.com
> <mailto:multimarkdow...@googlegroups.com>.
> To post to this group, send email to multim...@googlegroups.com
> <mailto:multim...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/multimarkdown.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages