Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to create a workflow where I can typeset a meeting minute using MultiMarkDown syntax and then have it converted in latex and processed to PDF. Minutes is a great package to format these type of document, but it uses \topic \subtopic and \subsubtopic in place of \section \subsection and \subsubsection. While it make quite a lot of sense in a meeting minute context, it is a problem in my workflow as the MultiMarkDown processor converts headers in \part, \chapter, \section etc.

Can somebody give me a hint on how to redefine the \section command in Minutes in order to act as \topic? As far as I can see the command definition in the package is:

%    \begin{macrocode}
\newcommand*{\topic}[2][\minxx]{
\min@checktitle
%    \end{macrocode}
%    \begin{macrocode}
\immediate\gdef\thesection{\min@toptext\min@thesection}
\ifx\minxx#1\min@newcoltopic{\section}{#2}{#2}%
\else\min@newcoltopic{\section}{#1}{#2}\fi%
}

Unfortunately it looks like the \topic command definition already rely on \section. Any help will be much much appreciated.

share|improve this question
    
Welcome to TeX.SE. While code snippets are useful in explanations, it is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. –  Peter Grill May 29 '12 at 7:54
    
Without a MWE to test this, I would suggest you use \let\OldSection\section, and then define \section to be the same as the above defintion of \topic, but use \OldSection within this definition instead of \section. –  Peter Grill May 29 '12 at 7:57
    
Why not write the minutes in Org-mode and export to LaTeX? Writing in Org-mode is similar to writing in markdown. –  N.N. May 29 '12 at 16:51

1 Answer 1

A non-Latex solution would be to write a batch/script which does the following:

  1. multimarkdown->latex conversion of your document
  2. replaces \part \section \subsection and \subsubsection with Minutes equivalents
  3. runs pdflatex, etc.

The key part is the second step.

On linux you could use sed -i 's/\\section/\\topic/g' minutes.tex to replace all occurrences of \section with \topic. (-i switch makes a backup of the file and then edits the file in place. Not sure about the escaped backslashes, though.)

On Windows you could have a look at this other question: How can you find and replace text in a file using the Windows command-line environment?

Update: Actually, since the \section, etc. are generated by Multimarkdown, the best approach would be to build in support for Minutes. Have a look at the MMD Latex support files. It should be possible to modify one to work with the Minutes package. (See line 38 of mmd-beamer-header.tex which modifies standard footnote behaviour.)

I'm not quite sure how much this works, but the author of Multimarkdown, Fletcher Penney, is usually quite helpful with questions.

share|improve this answer
    
I had a similar case, where I wanted \section* instead of \section. I used sed -e 's/\\section{/\\section*/' in my make pipeline as I didn't want to accidentally double star any \section*s that were in my template. –  Tyr Jul 3 '12 at 18:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.