gpt4 book ai didi

May I factorize more the header I'm creating at the top of my markdown documents? It has constant parts, but also variables ones(我可以进一步分解我在降价文档顶部创建的标题吗?它有固定的部分,但也有可变的部分)

转载 作者:bug小助手 更新时间:2023-10-22 14:29:34 28 4
gpt4 key购买 nike



I have organized the generation of my markdown documents that way:

我以这种方式组织了我的降价文档的生成:


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}{\text{$\sigma$}}
\DisableLigatures[-]{}

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

\newcommand{\suspect}[1]{\textbf{\textcolor{gray}{#1}}}
\newcommand{\fonction}[1]{\begingroup\small\mauve{\texttt{#1}}\endgroup}
\renewcommand{\abstractname}{Contenu}

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

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

To work, each of my markdown files are starting the way below, and I would like to improve the the part between the --- and ---:

为了工作,我的每个降价文件都是从下面的方式开始的,我想改进---和---之间的部分:


---
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.
[...]

In the part between --- separators, I have two types of contents:

在分隔符之间的部分,我有两种类型的内容:



  • One that is "static" to me: author, geometry, fontsize, output, classoption, urlcolor and

    对我来说是“静态”的:author、geometry、fontsize、output、classoption、urlcolor和


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

    never changes, at the top of files.

    永远不会更改,位于文件顶部。



  • title, subtitle, category, keywords that are changing from file to file.

    标题、副标题、类别、关键字随文件的变化而变化。






I would like to factorize more that part. Because it happens (whatever I've said) that I have sometimes to change that "static" part... And then, it's long to achieve: all the markdown files need edition and to have their pdf regenerated.

我想把那个部分分解得更多。因为有时候(不管我说了什么)我不得不改变“静态”的部分。。。然后,要实现这一点还需要很长时间:所有的降价文件都需要编辑并重新生成pdf。



  • May I dispatch some of the keywords author, geometry, fontsize, output, classoption, urlcolor or header-includes: in one of the include .tex file I've created, and how?

    我可以在我创建的include.tex文件中发送一些关键字author、geometry、fontsize、output、classoption、urlcolor或header-includs吗?如何发送?



  • Or should I improve my gen.sh running pandoc some way?

    或者我应该以某种方式改进我的潘多克一代吗?



  • Can another feature of Latex I haven't used yet, help me?

    乳胶的另一个功能我还没有用过,能帮我吗?




更多回答
优秀答案推荐

A part of markdown document options can be transferred to a metadata.json file that Pandoc can include.

降价文档选项的一部分可以传输到Pandoc可以包含的metadata.json文件中。


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

metadata.json:

metadata.json:


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

with the Pandoc command adding a --metadata-file inside:

Pandoc命令在其中添加一个--metadata文件:


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

I can also move my header includes:

我还可以移动我的页眉,包括:


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

to the Pandoc command:

到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
---

更多回答

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com