English 中文(简体)
请允许我更多地把在我的标志性文件顶端创造的Im的头脑 factor子考虑在内? 它有固定部分,但也有变数部分。
原标题:May I factorize more the header I m creating at the top of my markdown documents? It has constant parts, but also variables ones

我组织了我的标志性文件:

export APPRENTISSAGE_HOME=the folder where my documents are

/apprentissage
    gen.sh : a script running a command:  pandoc -f markdown-implicit_figures 
             --syntax-definition=$APPRENTISSAGE_HOME/java.xml 
             "${source}".md -o "${source}".pdf 
        → gen e020-analyse generates a e020-analyse.pdf from a e020-analyse.md file

    apprentissage-header-include.tex: usepackage, DeclareUnicodeCharacter directives
        usepackage{fvextra}
        usepackage{mathtools}
        DeclareUnicodeCharacter{3C3}{	ext{$sigma$}}
        DisableLigatures[-]{}

    apprentissage-include.tex: definitions of custom commands or colors
        DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,breakanywhere,breaksymbol=,breakanywheresymbolpre=,commandchars=\{}}
        setlength{abovedisplayskip}{3pt}

        
ewcommand{suspect}[1]{	extbf{	extcolor{gray}{#1}}}
        
ewcommand{fonction}[1]{egingroupsmallmauve{	exttt{#1}}endgroup}
        
enewcommand{abstractname}{Contenu}

        definecolor{cadreCodeBackground}{RGB}{130,124,106}
        
ewcommand{cadreCode}{
enewtcolorbox{quote}{colback=cadreCodeBackground!5!white,arc=0pt,outer arc=0pt,boxrule=0pt,lowerbox=invisible,code={	cbset{enlarge left by=0cm}}}}

    /informatique this folder and the next have about 30 markdowns file inside
    /mathematiques
    /statistiques
    /analyse_spatiale
    /territoire

为了开展工作,我每个标记档案都从下面开始,我希望改进<代码>-和---之间的部分:

---
header-includes:
  input{$APPRENTISSAGE_HOME/apprentissage-header-include}
  input{$APPRENTISSAGE_HOME/apprentissage-include}

title: "e020. Analyse textuelle"
subtitle: ""
category: analyse textuelle

keywords:
- TF
- term frequency
- IDF
- inverse difference frequency
- mot
- ponctuation
- token

author: Marc Le Bihan
geometry: margin=1.5cm
fontsize: 12pt
output: pdf
classoption: fleqn
urlcolor: blue
---

Indexation des mots. La qualité de la recherche vient par l emploi de deux indicateurs :

   - __TF__ (Term Frequency) : fréquence des mots.
[...]

在<代码>---之间,分机 我有两类内容:

  • 缩略语

    header-includes:
       input{$APPRENTISSAGE_HOME/apprentissage-header-include}
       input{$APPRENTISSAGE_HOME/apprentissage-include}
    

    档案的顶端从来没有变化。


我要进一步考虑这一部分。 由于发生这种情况(我说过的话),我有时不得不改变“静态”部分。 那么,它要取得长足:所有标记档案都需要版本,并重新生成pdf>。

  • 请允许我发送以下关键词:author ,geome ,fontsizeoutput, /classoption,urlcolor or header-includes: in one of the include tex file I ve, and how?

  • 或者,我改进了我的<代码>gen.sh , 运行pandoc。 某种方式?

  • Latex 我已经用了吗?

问题回答

部分标记文件选项可转至Pandoc可以包括的metadata.json文档。

geometry: margin=1.5cm
fontsize: 12pt
classoption: fleqn
urlcolor: blue

metadata.json:

{
  "geometry": "margin=4cm",
  "fontsize": "12pt",
  "classoption": "fleqn",
  "urlcolor": "blue"
}

and the Pandoc generation command changed this way, adding a --metadata-file inside:

pandoc -f markdown-implicit_figures 
  --syntax-definition=$APPRENTISSAGE_HOME/java.xml 
  --metadata-file=$APPRENTISSAGE_HOME/metadata.json 
  s600-la_fouille_de_données.md -o s600-la_fouille_de_données.pdf

我还可以把我的头脑包括进去:

header-includes:
  input{$APPRENTISSAGE_HOME/apprentissage-header-include}
  input{$APPRENTISSAGE_HOME/apprentissage-include}

前往Pandoc指挥部:

pandoc -f markdown-implicit_figures 
  --syntax-definition=$APPRENTISSAGE_HOME/java.xml 
  --metadata-file=$APPRENTISSAGE_HOME/metadata.json 
  --include-in-header=$APPRENTISSAGE_HOME/apprentissage-header-include.tex 
  --include-in-header=$APPRENTISSAGE_HOME/apprentissage-include.tex 
  s600-la_fouille_de_données.md -o s600-la_fouille_de_données.pdf

This leaves me with a markdown preamble completely specific to its purpose, I was searching for.

---
title: "e020. Analyse textuelle"
subtitle: ""
category: analyse textuelle

keywords:
- TF
- term frequency
- IDF
- inverse difference frequency
- mot
- ponctuation
- token

author: Marc Le Bihan
---




相关问题
Citing the author of a blockquote using Markdown syntax

I am using the Symfony CMS and it uses Markdown for article writing. I need to do a blockquote of a quote from Benjamin Franklin and would like to have the quote followed by a citation beneath it, but ...

What markup language to store in a DB?

Related: How to store lightweight formatting (Textile, Markdown) in database? I want to store comment formatting in some markup language in our DB. However, we want to allow multiple formatting ...

Markdown vs. HTML in a CMS

I m working on a fairly large CMS-like app that includes a forum, wiki pages, etc. What whould you chose between Markdown and HTML? I m concerned about usability and the fact non-techie people will ...

PHP Markdown Question

I m using http://michelf.com/projects/php-markdown/ for my markdown library and my question is that if i edit and remove the functionality would this work Because the users that i have, are ...

markdown to HTML with customised WMD editor

For my application I customized slightly the way WMD behaves so when user enters empty lines, these are reflected in HTML output as <br /> s. Now I came to a point when I should store it ...

Python Markdown: Markdown Inside HTML Blocks

Is there an extra for Python Markdown that supports Markdown inside HTML block elements, e.g. div, p i.e. is there a way to convert this: <div id="content"> [Google](http://www.google.com) ...

热门标签