Is it posible to import a BibTex library in Libre Office Writer?
I have a BibTex file that was generated with BibDesk and which I woul like to import in Libre Office.
Yes BibDesk can export to .doc (libre can import .doc) and many other formats. You can aslo modify the formats
Ref sourceforge SEC117
Export Templates
Templates allow you to export your database to a large variety of formats. It also allows you to customize to a great extent how the data is exported.
To export using templates, choose the "Export..." menu item, which can be found under the "File" menu. You can choose the template from the "File Format" popup button. You can either export the whole database, or just the references which you have selected.
BibDesk provides several default templates, for export to HTML, RSS, Rich Text (RTF, RTFD) and to windows Doc format.
You can also modify a template
Bibdesk Templates
You can find a set of default template files in the folder ~/Library/Application Support/Bibdesk/Templates. For HTML export, there are 3 template files: htmlExportTemplate.html, htmlItemExportTemplate.html and htmlExportStyleSheet.css. Generally, only the first of these template files is required
Looking at the htmlExportTemplate.html file first, this is a relatively simple html document, with a standard header, a link to the external CSS file, and a single "content" div in the body. The formatting of the individual entries into the html file is done using the htmlItemExportTemplate.html file. Opening this file, you will see that the template files comprise a series of items enclosed in < and > signs, the same as those used in HTML to enclose formatting tags, but starting with an extra $. These entities are known as Template Tags.
They are parsed by BibDesk to include the relevant parts of the BibDesk database in the html file. E.G. will be replaced by the contents of the "Title" field in the BibDesk database. A list of the different kinds of Tag is given in the Export Template Keys page. It is also possible to apply modifiers to the field Tags in order to format the contents. One example is the Tag where the full name or an abbreviated name can be chosen, and the "and"s between authors can be replaced by commas. These modifier keys are also explained at the Export Template Keys page.
I hope this helps
Related
I need to embed codelabs into an existing web site.
So, I need to change the actual HTML output (I need to get rid of etc.)
In claat's own help I see:
Note that the built-in templates of the formats are not guaranteed to be stable.
They can be found in https://github.com/googlecodelabs/tools/tree/master/claat/render.
Please avoid using default templates in production. Use your own copies.
To use a custom format, specify a local file path to a Go template file.
More info on Go templates: https://golang.org/pkg/text/template/.
Except that:
The link provided is very API-ish
The only command line option that mentiones templates is this:
-extra string
Additional arguments to pass to format templates. JSON object of string,string key values.
What do I actually need to do to pass claat a different template?
As the help message implies, use the format option. html or md are merely shortcuts to use the built-in templates.
claat export -f [template filepath] [source filepath]
Also was trying to solve this a year after it was first asked. It doesn't say explicitly, but digging into the source we can find where the format option is parsed.
https://github.com/googlecodelabs/tools/blob/main/claat/render/template.go#L166
Following that, we can specify our own html or text template file (relative or absolute path) with the -f option, instead of the default html or md format option (loading built-in templates).
These templates are parsed according to:
https://pkg.go.dev/html/template
https://pkg.go.dev/text/template
as the help message indicates.
Tl;dr;
What is the correct way to create an anchor in docbook? and is there a way that will make the anchor visible in writer?
Background
I am trying to split up documentation that was previously in single open office documents into smaller asciidoc documents which are both included in the main open office document and also converted to either or both of html & pdf.
I have this mostly working. I use asciidoctor to create html. asciidoctor-pdf to create pdf and a combination of asciidoctor and pandoc to create .odt files. I also tried the python implementation of asciidoc but found the interface less useable.
Round tripping between asciidoc and odt is obviously not possible. This is sort of a fusion where the master document is word processed but pieces of content that can be produced independently (think man pages - in fact that is one of several use cases) are included.
asciidoc to html:
asciidoctor -b html5 foo.adoc -o foo.html
asciidoc to pdf:
asciidoctor-pdf -b pdf foo.adoc -o foo.pdf
asciidoc to odt
asciidoctor -b docbook foo.adoc -o foo.docbook
pandoc --base-header-level=3 -V date:"" -V title:"" -f docbook foo.docbook -o foo.odt
With pandoc I have to nullify the date and title and set the header-level as desired for the section to be inserted as an extra complication.
I insert the resulting .odt into the main document using insert section inside open office.
Note that the main document is not a master document as I could not find a way of creating a master document without also automatically splitting the file on h1 boundaries.
I have two main problems to resolve with this set-up. I would like to add headings in the asciidoc document as cross references and also create entries for them in the alphabetical index (actually the first heading would be suffcient). Is there a way to do this?
Index markers in asciidoc do not result in entries in .odt file being created.
I am able to cross reference content in the inserted section using "insert reference/heading" and referencing the uniquely named header. However, whenever I use "update all" these cross references are invalidated. They are shown as "Error: Reference source not found".
[On a separate note I would also like a way to find broken cross references automatically]
I am currently using libreoffice - Version: 4.3.7.2
I am not adverse to switching version or flavours (i.e. apache) if one behaves better than the other.
I'm not sure if the answer is in the asciidoc or docbook parts of the chain. I would accept an answer which inserts a index entry at the start of the inserted section (top of the .adoc/docbook file) automatically.
I am also open to changing my toolchain to something that will work.
For example I tried the asciidoc-odt backend and fell foul of https://github.com/dagwieers/asciidoc-odf/issues/47 which does not inspire confidence.
Using asciidoc-odt I avoid the need to create an intermediate docbook file. However, I still can't get the anchor to appear.
I can get a macro to create an anchor but at present I haven't figured out how to run the macro from the command line.
To create an anchor in DocBook, make an inline anchor in the .adoc file. For example, giving this to asciidoctor:
[[X1]]Section1
---------------
produced this:
<title>
<anchor xml:id="X1" xreflabel="[X1]"/>
Section1
</title>
Conversely, putting this on separate lines did not create an anchor tag in my test:
[[X1]]
Section 1
Now for some bad news. From the Pandoc User's Guide:
Internal links are currently supported for HTML formats (including HTML slide shows and EPUB), LaTeX, and ConTeXt.
I interpret this to mean that currently, Pandoc does not create internal links in Writer. When I tried it, the link was ignored.
Note: It looks like I did not answer all of your questions. If you want to ask more about LibreOffice cross references and headings (the big bold paragraph towards the end of the question), maybe you could make a separate question just for that part.
In org-mode, when I export to PDF or HTML, I'd like to specify the names of the resulting files. Ideally two separate names, one for the PDF, one for the HTML. Is this possible?
Chris's answer is out of date. There is now an EXPORT_FILE_NAME setting:
#+export_file_name: <filename>
If you put this at the start of your file (not in a subtree), it will name the entire file that when you export.
Edit: For newer versions of org-mode, see slondr's answer.
It doesn't look like you can specify a name for the exported file as a whole.
From the link, emphasis mine:
When exporting only a subtree, each of the previous keywords can be overriden locally by special node properties. These begin with ‘EXPORT_’, followed by the name of the keyword they supplant. For example, ‘DATE’ and ‘OPTIONS’ keywords become, respectively, ‘EXPORT_DATE’ and ‘EXPORT_OPTIONS’ properties. Subtree export also supports the self-explicit ‘EXPORT_FILE_NAME’ property [4].
[4] There is no buffer-wide equivalent for this property. The file name in this case is derived from the file associated to the buffer, if possible, or asked to the user otherwise.
In org-mode, when you export HTML projects you can use templates to give all exported pages the same options, this is described here http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html. What I would like to do, is give all exported pages an HTML snippet, for analytics, which is not an option. Is this possible with org-templates?
Now, I tried to add literal HTML code to the base template level-0-template.org with
#begin_html
...
#end_html
but it didn't work out. Does anyone know how to add html code to each HTML file that is exported in the project?
My project is organized as follows:
|- org
|- index.org
|- html
|- index.html (this is exported)
|- templates
|- level-0.org (I'd like to include default html here)
|- org_publish.el (this is the publishing config file)
To expand on my comment in the question, here is the difference between #+setupfile: and #+include:.
Details about both are available in the Org-Mode manual. See Setup File and Include Files.
The setupfile is essentially a list of all org configurations that are included in the linked file. It will pass things such as #+options. It will not however include any other content that the original file might include.
On the other hand, #+include: inserts the content of the linked file wherever the line is inserted. It acts similarly to \input in LaTex. I'm not certain to what degree it will bring along any org-configuration settings from the linked file, you may need to both #+include and #+setupfile the file to ensure everything is present. However since you do want the body content of the file to be included in each, you have to use #+include to insert it.
Glad you found a solution to your problem by sourcing your snippet as a separate html file.
If you wanted to make it work by having the snippet directly included in your template file, you should use:
#+BEGIN_export html
...
#+END_export
instead of:
#+BEGIN_html
...
#+END_html
(The latter will embed the html chunk as a block in the rendered html page-not what you want; the former will export the html chunk as is in the html file so that that code will be rendered when the page is displayed-what you want).
The application I'm working on outputs documents to rtf format and PAGEREF fields are used in a table of contents page and an index page. The problem is that on opening the document the fields do not update and remain blank. They work correctly if you manually update the fields in Word. Is there a way to make these fields auto-update in the RTF spec?
You could try to create a Document_Open() macro, although you might not be able to add a macro to an rtf file. You might be able to add a macro at a template (.dot) and have the .rtf file reference the template.
Private Sub Document_Open()
End Sub