Comments (2)
@shahryareiv that's indeed an oft-encountered problem with Asciidoctor -- for example, a control phrase that uses underscores or other syntax symbols will get cut off with a linebreak, so it's not a specific issue with asciidoctor-bibliography
.
We could possibly support the suggested syntax of cite:[key1;key2;key3]
. Thoughts @paolobrasolin @opoudjis ?
from asciidoctor-bibliography.
Thanks for your feedback @shahryareiv!
I initially though about using semicolons as separators myself, but I decided not to in order to offer a syntax reminiscent of other common macros to target a specific indices within a multiple citations:
cite:foo_index[Aa2017]+bar_index[Bb2017]
Ignoring whitespace is technically easy but refraining from it avoided ambiguity in edge cases, e.g. when you'd want a literal + [something]
after a citation. It's a bit far fetched, but still possible.
Furthermore, allowing to break the line after +
would create a behaviour diverging from the default expected one.
Another point in favour of not allowing line breaks could be that these are an inline macros - but I do realise they can get too long to maintain very quickly.
A solution might be as follows:
// single citation
cite:[foo_key]
// single citation w/ non default target
cite:my_index[foo_key]
// single citation w/ non default target (alt. syntax)
cite:[foo_key, target=my_index]
// multiple citations
cite:[foo_key; bar_key]
// multiple citations w/ common non default target
cite:my_index[foo_key; bar_key]
// multiple citations w/ common non default target and a local target override
cite:my_index[foo_key; bar_key; baz_key, target=your_index]
All this while allowing for arbitrary whitespace in the attribute list in canonical way.
On top of that, we could also allow for line breaks within the square brackets; this would be a non canonical behaviour for an inline macro, but might greatly improve its usability.
(If we decide to implement this I'd keep the +
-concatenation but drop it at the next major; this syntax seems a bit more reasonable.)
@ronaldtse Any thoughts? My only concern is that allowing line breaks inside the attribute list of an inline macro is a non canonical behaviour.
from asciidoctor-bibliography.
Related Issues (20)
- Bug with custom attributes when translating to DocBook HOT 3
- Question: own styles HOT 1
- :bibliography-database: not set via asciidoctor-epub3 for included documents HOT 6
- 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
- Including "bibliography:[]" without using citations in document throws error
- 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.