Mise en œuvre de l'hyphénation des verbatim par un mélange d'options de ConTeXt et d'interventions manuelles
This commit is contained in:
@ -85,5 +85,6 @@ docA4: $(DOC_FILE).md TEMPLATE_Guide-CSL-Clio.latex
|
||||
|
||||
docDiapo: $(DOC_FILE).md TEMPLATE_Guide-CSL-Clio.context
|
||||
pandoc $(COMMON_DOC_OPTIONS) -o $(DOC_FILE)_Diapo.tex -t context --template=TEMPLATE_Guide-CSL-Clio.context && \
|
||||
./microfixes-docDiapo.sh $(DOC_FILE)_Diapo.tex && \
|
||||
cd $(DOC_DIR) && \
|
||||
context --noconsole --errors $(DOC_FILE)_Diapo.tex
|
||||
|
@ -27,8 +27,12 @@ $endif$
|
||||
\definefontfamily[mainface][ss][linuxbiolinumo]
|
||||
\definefontfamily[mainface][tt][nimbusmonops][features=none]
|
||||
\setupbodyfont[mainface,12pt]
|
||||
\setuptype[lines=hyphenated]
|
||||
\setbreakpoints[compound]
|
||||
\definetype[hyphenatedtype][lines=hyphenated]
|
||||
\def\type#1{\startluacode
|
||||
require '../Utilitaires/context-aux-functions'
|
||||
context(split_cmd_at_char([[#1]], '-', 'hyphenatedtype'))
|
||||
\stopluacode
|
||||
}
|
||||
|
||||
\setuphead[chapter] [style=\ssc\bf\setupinterlinespace,header=empty]
|
||||
\setuphead[section] [style=\ssb\bf\setupinterlinespace]
|
||||
|
3
Utilitaires/context-aux-functions.lua
Normal file
3
Utilitaires/context-aux-functions.lua
Normal file
@ -0,0 +1,3 @@
|
||||
function split_cmd_at_char(arg, delimiter, replacement_cmd)
|
||||
return string.gsub(arg, '([^' .. delimiter .. ']+-?)', '\\' .. replacement_cmd .. '{%1}\\discretionary{}{}{}')
|
||||
end
|
4
Utilitaires/microfixes-docDiapo.sh
Executable file
4
Utilitaires/microfixes-docDiapo.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
sed -i 's/\\type{publication/\\type{publication}\\-\\type{/' "$1"
|
||||
sed -i 's/\\type{sourceAuthor},/\\type{source}\\-\\type{Au}\\-\\hbox{\\type{thor},}/' "$1"
|
Reference in New Issue
Block a user