Where is footer.vm used in Confluence? - jira

I am new to Confluence, and I am playing with it (version 5.10.7).
I am reading the system's code, and I am unable to find out where footer.vm is used. Here is where common-header.vm (another file in Confluence) is used: Inside main.vmd, there is the following line:
#parse("/decorators/includes/common-header.vm")
I am not able to find similar code to use footer.vm.

footer.vm contains following code:
## Page footer for main and admin decorators.
#parse("/decorators/includes/footer-content.vm")
Above code contains the content of the footer.
For example in printable.vmd you can find following which parse the footer file:
#parse ("/decorators/includes/footer.vm")
However, if you want to change the content of the footer you need to change /confluence/decorators/includes/footer-content.vm file.
Also I would recommend you to take a look at this document and ensure that you don't break the EULA.

Related

How to get portable link to Doxygen generated section "Examples"?

When examples are included in the generated docs (via #example tag) they are all collected by Doxygen in a list in the generated docs in the section "Examples". In the documentation one can then easily refer to the individual examples via #ref example1.c "example1.c"
This works well.
However, I would like to include a link to the auto-generated section "Examples" (not any of the individual examples) and since its generated I cannot add a section tag that I could later refer to.
Since the generated examples section file is always named examples.html by Doxygen it is of course easy to "cheat" and just insert a markdown link [Examples](examples.html). This, again, works fine for the HTML doc. But, for obvious reason this does not work in the PDF version.
What is the portable way of referring to the "Examples" section that works for all output formats (that I obviously overlook)?

Customize doxygen output for PDF LATEX

Problem:
Cannot customize the Doxygen output for LATEX to hide the page content. DoxgentLayout.xml gives you the ability to show or hide pages for HTML. looking for something equivalent
Why:
I need to remove/hide the pages type. The reason is because I use the modules type to create a tree hierarchy of the detailed design document which is a md file with the classes associated with the design. I use grouping to group the md file and classes together. The reason I have to hide the pages type in doxygen is because as soon as you put \ingroup at the top the .md file the content after that line will not show up this results in a series of blank pages so I just hide them because the content is within the module. So DoxgenLayout.xml will allow me to hide the pages for HTML but I don't have an equivalent for LATEX.
What I have tried:
I tried modifying the refman.tex file after it was generated. When I run make for the LATEX output it always fails. So I don't know if LATEX realizes that the file changed and fails its build or I am doing something wrong.
I tried using the LATEX_HEADER file but same result. I think this was intended to change the style of your PDF more so then what content is shown
at the top of my md files I do this:
\defgroup g_SystemService SystemService Library
\defgroup g_ICP-SCP ICP-SCP
\ingroup g_SystemService g_ICP-SCP
# ICP-SCP System
This system provides...
The PDF output results in this:
HTML output I can hide this by just modifying the DoxygenLayout.xml file to say:
<navindex>
<tab type="pages" visible="no" title="" intro=""/>
refman.tex generation (what I want to is remove these chapters from generation):
...
%--- Begin generated contents ---
% want to remove these pages
\chapter{Base\+Data\+Model}
\label{md_architecture_Common_datamodels_BaseDataModel}
\Hypertarget{md_architecture_Common_datamodels_BaseDataModel}
\input{md_architecture_Common_datamodels_BaseDataModel}
\chapter{Commands}
\label{md_architecture_SystemService_ICP_Commands}
\Hypertarget{md_architecture_SystemService_ICP_Commands}
\input{md_architecture_SystemService_ICP_Commands}
\chapter{I\+C\+P-\/\+S\+CP}
\label{md_architecture_SystemService_ICP_ICP-SCP}
\Hypertarget{md_architecture_SystemService_ICP_ICP-SCP}
\input{md_architecture_SystemService_ICP_ICP-SCP}
\chapter{I\+C\+P-\/\+S\+C\+P\+Manager}
\label{md_architecture_SystemService_ICP_ICP-SCPManager}
\Hypertarget{md_architecture_SystemService_ICP_ICP-SCPManager}
\input{md_architecture_SystemService_ICP_ICP-SCPManager}
\chapter{I\+C\+P\+Comm}
\label{md_architecture_SystemService_ICP_ICPComm}
\Hypertarget{md_architecture_SystemService_ICP_ICPComm}
\input{md_architecture_SystemService_ICP_ICPComm}
\chapter{Unit\+Tests}
\label{md_architecture_SystemService_ICP_UnitTests}
\Hypertarget{md_architecture_SystemService_ICP_UnitTests}
\input{md_architecture_SystemService_ICP_UnitTests}
% end of removing pages
\chapter{Todo List}
\label{todo}
...
Doxygen Version: 1.8.17

How to replace Sphinx cover page when making a PDF

I need to change the cover page of a Sphinx-generated latexpdf from RST.
How can I do that without modifying the Sphinx package itself?
I've noticed latex_preamble in the conf file but that only seems to append things. If that is the way an example would be helpful. Right now whatever I do only seems to add to rather than remove the cover page.
Found the answer and posting it here for anyone else who is interested.
In the conf.py file add the following entry:
"maketitle": "\\input{your_cover.tex}"
where your_cover.tex is your LaTeX file you want to be the cover.

Pre-/postprocessing of DSL edited with TMF-based editor

Given:
Some kind of DSL parsed with Xtext parser and then edited by user in TMF-based editor.
When user open file for editing I want first get access to the parse tree of just opened file, modify loaded file content in a some way and then provide to user modified source for editing.
When user wish to save file I again want to preprocess text representation based on actual parse tree and save such altered version.
Is there any Xtext/EMF API to implement such pre-/post- processing?
The goal is to add some content not presented in the physical file, allow user to edit this content and remove it before saving to file. This extra content should be stored separately from DSL source file.
If I understand your question correctly, you want to display additional information in the text editor itself (and not add additional information only to the EMF model, not to the text, for which IDerivedStateComputer could be used).
If the user is not supposed to edit the additional text, the "Code Mining" feature might be useful: https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#code-mining and https://blogs.itemis.com/en/code-mining-support-in-xtext
To answer the question itself:
Is there any Xtext/EMF API to implement such pre-/post- processing?
No, I am pretty sure there is no such Xtext API for pre-/post-processing files based on their own parse tree (EMF is irrelevant as you want to change the physical content). You could try to mess around with the XtextDocumentProvider (i.e. create your own subclass and register it in the UI module), but this is very likely to break the UI because the line numbers and offsets won't match.
You might have more luck implementing a custom Eclipse action that is executed on the original file and creates a temporary modified copy based on the parsed original file and then opens an editor for the temporary file. Then you could implement a IXtextBuilderParticipant that writes the result back to the original file on save (you have to register it using the org.eclipse.xtext.builder.participant extension point).
Another idea would be not to use an Eclipse action but a tabbed editor using MultiPageEditorPart, with the original as one of three tabs (the composite file and the 'additional info' file being the other two).
The goal is to add some content not presented in the physical file, allow user to edit this content and remove it before saving to file. This extra content should be stored separately from DSL source file.
Couldn't you present this information in another view similar to the 'Properties' view of EMF ? e.g. the user opens file, the Xtext editor opens as well as the 'Properties' view, which presents a way to edit these "extra" information. Upon save of either view, the Xtext save is called and your extra properties are serialized in their own model.

How do I add more words to the mediawiki UniversalLanguageSelector extension

I have added some contents to the mediawiki sidebar(Mediawiki:Sidebar). When I changed the language from English to Malayalam using the UniversalLanguageSelector, everything in the sidebar except the newly added contents got translated. My question:
What do I do to get all the sidebar contents to be translated to Malayalam?
Can I add those contents along with the translations to some file in the extension's folder so that it also will get translated?
The easiest way to localize the sidebar, is to use system message as variables. E.g., rather than adding the link *mw-mainpage-url|My mainpage in English, *mw-mainpage-url|Min huvudsida in Swedish, etc, just do *mw-mainpage-url|mainpage-description in MediaWiki:Sidebar, and then use mainpage-description/en, mainpage-description/sv, etc to change the translation of that part of the sidebar. This way you only need to change the sidebar layout in one place, and you can make use of the many translations already available, as well as create your own, custom system messages, by adding pages to the MediaWiki namespace.
Note that sidebar contents is aggressively cached. You might need to purge your pages.
Also note that $wgUseDatabaseMessages must be true (default).

Resources