1

Pandoc table in Tex document based on this discussion

---------------------------------------------------------------------------------
                                                                       Arrythmia
- ------------------------      ----------------------------------     ----------
1 a sodium channel blocker      \underline{procainamide}               V

  b sodium channel blocker      (Lidocaine),                           V
                                Phenytoin 
                                % no effect on QRS                              

  c sodium channel blocker      propafenon                             SV

2 beta blockers                 propranolol, 
                                metoprolol, 
                                bisoprolol                             

3 K ch. blocker                 \underline{amiodarone}, (sotalol)      V, TA        

4 Slow CCB non DHP              verapamil, diltiazem                   SV 

5 digoxin                       digoxin                                SV
---------------------------------------------------------------------------------

Table: Rate Control anti-arrhythmics. 

which can be compiled by pandoc -s something.md -o something.tex in a separate file or by pasting the table into separate file, adding \documentclass{article}; \usepackage{caption}; \usepackage{longtable}; \usepackage{booktabs}; \begin{document} before it and after it \end{document}, and compiling by pdflatex. In Vim, you could simply run externally by :<selection>![pandoc-cmd]. However, currently, I am using editors such as Textmate and TexPad in OSX. Open to any other approaches too.

I do not want to have computer-language for tables in my document. This kind of feature as in terminal editors and vim would be awesome to get, as discussed for Vim and running Python there here. How can you compile the pandoc table into external pdf-file by selection in some IDE text editor?

Textmate

Select table, select Text > Filter Through Command with New Document and run pandoc -f markdown -t latex to get a table in a new document. However, to pipe the output some script is still unknown if you can do it or not. So Textmate may not be sufficient. only | script-to-add-head-and-tail text | pdflatex | open the pdf is wanted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.