pandoc_abnt 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/pandoc_abnt/quadro_filter.rb +18 -1
- data/lib/pandoc_abnt/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8a94db5504055161a1628425664c0dd95a48911c
|
|
4
|
+
data.tar.gz: 5c4ebb69c786500e1aa53d7a8db975d57cef9448
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 031600b29095ec3031c1f1f1bae268d70a4495fddcea5f23c3d646c920aa4dafc2be2c561bc1077f788c7c9060356073c1b83023e663066c3d2d4b835d5141fc
|
|
7
|
+
data.tar.gz: a3a9c58fc9bd96e0262c935c65dfe96fd62eaeff20e374d1538aa7a381bb8bd306eff6f7d4dbe25494d423c84d81bf4d77316136494a1cef2a4dcd17dbc14b08
|
|
@@ -8,7 +8,7 @@ module PandocAbnt
|
|
|
8
8
|
|
|
9
9
|
def transforma_em_quadro(latex_code, id, titulo, fonte)
|
|
10
10
|
#inicio = latex_code.lines[0..-2].join ""
|
|
11
|
-
begin_longtable = latex_code.lines[0].strip
|
|
11
|
+
begin_longtable = quadro_com_linhas_verticais(latex_code.lines[0].strip)
|
|
12
12
|
tabela_codigo_interno_begin = latex_code.lines[1..-2].join("").strip
|
|
13
13
|
abntex_code = <<LATEX
|
|
14
14
|
\\renewcommand\\LTcaptype{quadro}
|
|
@@ -22,6 +22,23 @@ LATEX
|
|
|
22
22
|
abntex_code.strip
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
+
# Um quadro é uma tabela com linhas verticais
|
|
26
|
+
# Esse método especifica a utilização de linhas verticais
|
|
27
|
+
# entre as colunas
|
|
28
|
+
#
|
|
29
|
+
# Exemplo de entrada: \begin{longtable}[]{@{}clrc@{}}
|
|
30
|
+
# saída: \begin{longtable}[]{|c|l|r|c|}
|
|
31
|
+
#
|
|
32
|
+
def quadro_com_linhas_verticais(begin_table)
|
|
33
|
+
alinhamento=begin_table.match(/(?<begin>\\begin{longtable}\[.*\]){@{}(?<alinhamento>.*)@{}}/)[:alinhamento]
|
|
34
|
+
|
|
35
|
+
qalign = "|"
|
|
36
|
+
alinhamento.split("").each do |c|
|
|
37
|
+
qalign << c + "|"
|
|
38
|
+
end
|
|
39
|
+
"\\begin{longtable}[]{#{qalign}}"
|
|
40
|
+
end
|
|
41
|
+
|
|
25
42
|
# Verifica se node é um parágrafo que inicia com "Fonte:"
|
|
26
43
|
def fonte?(node)
|
|
27
44
|
# {"t":"Para","c":[{"t":"Str","c":"Fonte:"},{"t":"Space","c":[]},{"t":"Str","c":"Autor."}]}
|
data/lib/pandoc_abnt/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pandoc_abnt
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Eduardo de Santana Medeiros Alexandre
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-03-
|
|
11
|
+
date: 2017-03-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|