Comments (6)
@neontapir @pddzaic thank you for the report and the reproducible case!
@paolobrasolin would you have time to look at this? Thanks!
from asciidoctor-bibliography.
Hi paolobrasolin
Back from vacation, I have tested the implementation.
On the first look: it works.
On the second look: Other thinks are broken now.
Let's assume the following file structure with two folders:
tbl
tbl-001.adoc
src
test.bib
test.adoc
File test.bib
:
@ARTICLE{test,
author = {L[eslie] A. Aamport},
title = {The Gnats and Gnus Document Preparation System},
journal = {\mbox{G-Animal's} Journal},
year = 1986,
}
File tbl-001.adoc
:
[align="center"]
[%header%autowidth]
[col="<,<"]
|====
|Task ID|Description
|A|ABC
|B|DEF
|====
File test.adoc
:
:doc-type: book
:author: I's m
:email: [email protected]
:revnumber: 1.0
:revdate: {docdatetime}
:bibliography-database: test.bib
:bibliography-style: ieee
:dir-tbl: ../tbl
= My first document using asciidoctor-bibliography
In cite:[test]
This works:
include::../tbl/tbl-001.adoc[]
// This does not work anymore:
// include::{dir-tbl}/tbl-001.adoc[]
[bibliography]
== References
bibliography::[]
Compiling C:\test\src>asciidoctor -r asciidoctor-bibliography test.adoc
leads to the following error when uncommenting the two lines:
asciidoctor: ERROR: test.adoc: line 21: include file not found: C:/test/src/{dir-tbl}/tbl-001.adoc
The variable dir-tbl
is not expanded anymore to ../tbl
Should I open a new issue on this?
from asciidoctor-bibliography.
I have created an minimal working example to show this behavior. Let's assume the following structure:
test\
- test.adoc
- meta.adoc
- References.bib
where the content is as follows:
References.bib
@Misc{ref-01,
author = {John Doe},
title = {{The Book without Title}},
date = {2018-09},
doi = {abc-123-def},
publisher = {Oxford Press},
}
@Misc{ref-02,
title = {{Th title of the reference}},
date = {2018-01},
doi = {XYZ-S-12345},
publisher = {Washington Post},
}
meta.adoc
:doc-type: book
:author: John Wayne
:email: [email protected]
:revnumber: 1.0
:revdate: {docdatetime}
The first compilation of test. adoc
//include:meta.adoc[]
:author: John Wayne
:email: [email protected]
:revnumber: 1.0
:revdate: {docdatetime}
:bibliography-database: References.bib
:bibliography-style: ieee
= My first document using asciidoctor-bibliography
In cite:[ref-01] and cite:[ref-02]
[bibliography]
== References
bibliography::[]
works fine.
This content of test.adoc
include:meta.adoc[]
:bibliography-database: References.bib
:bibliography-style: ieee
= My first document using asciidoctor-bibliography
In cite:[ref-01] and cite:[ref-02]
[bibliography]
== References
bibliography::[]
leads to an error:
Failed to load AsciiDoc document - Option :bibliography-database: is mandatory.
A bibliographic database is required.
Use --trace for backtrace
The same error with meta.adoc:
:doc-type: book
:author: John Wayne
:email: [email protected]
:revnumber: 1.0
:revdate: {docdatetime}
:bibliography-database: References.bib
:bibliography-style: ieee
and adoc.test:
include:meta.adoc[]
= My first document using asciidoctor-bibliography
In cite:[ref-01] and cite:[ref-02]
[bibliography]
== References
bibliography::[]
from asciidoctor-bibliography.
@pddzaic, thank you for reproducing the bug, that's amazing!
For anyone investigating, I confirmed the error also happens when the include
macro in test.adoc
follows the variable definitions, which is the typical use case.
from asciidoctor-bibliography.
@neontapir and @pddzaic thanks again for the report and the sample files!
I just released 0.10.3
to fix this issue.
If you have the chance to test it, please let us know whether that works correctly for you too!
from asciidoctor-bibliography.
Thanks for the report @pddzaic. I already narrowed down the problem and opened #109.
from asciidoctor-bibliography.
Related Issues (20)
- Bug with custom attributes when translating to DocBook HOT 3
- Question: own styles HOT 1
- Bib entry with identical author and year HOT 18
- Minor APA format issue HOT 4
- Converting directly with Ruby HOT 2
- Variable interpolation breaks include
- anomalies when using Asciidoctor's ifeval::[] and asciidoctor-bibliography HOT 3
- Errors with asciidoctor-pdf HOT 2
- Numbered bibliography
- Comparison with asciidoc-bib and asciidoctor-bibtex
- A problem building Nokogiri, when installing on Windows HOT 7
- Migrate to GitHub Actions from Travis
- Change default branch to main HOT 1
- Asciidoc-bibliography messes with section levels after include
- The generated bibliography is incomplete HOT 6
- Citations get parsed within inline source code environment HOT 2
- Multi-Citation of more than two keys not working HOT 5
- [enhancement] nocite macro for bibliography entry without expicit citation HOT 1
- Incompatibility with asciidoctor version >= 2.0 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asciidoctor-bibliography.