Asciidoc: a2x does not generate numbered sections anymore - asciidoc

a2x does not generate numbered sections anymore, though I have the following attributes defined:
= Some title
:toc:
:numbered:
It used to work once (I think it was before I've updated Kubuntu to the latest LTS version (16.04.2 LTS)).

Related

How to use correct lang parameter?

I have a fresh Mediawiki installed into fresh UBUNTU 18 LTS... The ''SyntaxHighlight'' extension not works for Unix shell, lang="sh", lang="shell", lang="bash", ... no one is working. It is not at #Supported_languages, and there are no clues about how to install "Other markup".
At mediawiki.org/list there are no clues.
So, how to solve the problem? It is a config, env or syntax problem?
NOTES AND TESTS
Notes.
It is a corporative Wiki, no way to offer public URL... But it is a fresh, standard and controlled installation, all reproductive and standard.
The Wiki was configured with skin "Vector" and language "Brazilian Portuguese".
Tests.
Usage tests of mediawiki.org/Extension:SyntaxHighlight, the Python example.
1.1. With tag <syntaxhighlight>. Result: no highlight, same as <pre>.
1.2. With tag <source>. Result: no highlight, same as <pre>.
PHP example, fragment from wikipedia.org/PHP Syntax.
2.1. With tag <syntaxhighlight>. Result: no highlight, same as <pre>.
2.2. With tag <source>. Result: no highlight, same as <pre>.
The code fragments used in the tests:
def quickSort(arr):
less = []
pivotList = []
more = []
if len(arr) <= 1:
return arr
else:
pass
<title>PHP "Hello, World!" program</title>
<?php echo '<p>Hello World</p>'; ?>
MediaWiki Syntax highlighter used Pygments library, you should first download and install the extension:
Requirements
This version of the extension has been tested with Pygments 1.6, 2.0.2 and
MediaWiki 1.25 as of 2015-06-19. To get releases of this extension compatible
with earlier versions of MediaWiki, visit:
https://www.mediawiki.org/wiki/Special:ExtensionDistributor/SyntaxHighlight_GeSHi
Download
https://github.com/wikimedia/mediawiki-extensions-SyntaxHighlight_GeSHi/archive/master.tar.gz
Installation
Add this line to your LocalSettings.php:
wfLoadExtension( 'SyntaxHighlight_GeSHi' );
By default, this extension will use a bundled copy of Pygments 2.0.2. If you
would like to use a different copy of the library, you can set
$wgPygmentizePath to point to the path to the 'pygmentize' binary.
Usage
On the wiki page, you can now use "source" elements:
<source lang="php">
<?php
v = "string"; // sample initialization
?>
html text
<?php
echo v; // end of php code
?>
</source>
Parameters
For details information of these parameters, see the documentation of Pygments'
HtmlFormatter at http://pygments.org/docs/formatters/#HtmlFormatter.
lang; Defines the language.
line; Corresponds to linenos="inline" option.
start; Corresponds to linenostart opion.
enclose; If set to "none", corresponds to the nowrap=1 option.
inline; Corresponds to the nowrap=1 option.
highlight; Corresponds to hl_lines option (comma separated).
Note
Pygments is generous about creating HTML elements: highlighting large blocks of
code can easily generate enough of them to crash a browser. As a guard, syntax
highlighting is turned off for code fragments larger than 100 kB.

Sphinx substitution in URL

I have two projects A and B, project A's docs are being hosted for different versions, so the doc urls have the format
http://example.org/A/1.0.0/+d/index.html
http://example.org/A/1.0.1/+d/index.html
http://example.org/A/1.2.3/+d/index.html
Project B depends on A's of specific version. In B's docs, I want to leave a link to A's docs like this:
"See also A's documentation (v 1.0.1)"
Is this possible to pass the version variable to the URL? I tried using rst_prolog:
conf.py:
rst_prolog = '''
.. |a-ver| replace:: {ver}
'''.format(
ver=meta.__a_dep_version__,
)
index.rst:
A's version: |a-ver| # this produces the correct output
See also `framework docs <http://example.com/A/|a-ver|/index.html>`_.
but getting the URL https://example.com/A/%7Ca-ver%7C/+d/index.html after doc building.
You can use the sphinx.ext.extlinks extension for this.
Example
Sphinx configuration
extlinks = {'docs': ('http://example.org/A/%s/+d/index.html', 'framework docs ')}
Your documentation
:docs:`1.0.1`
.. Result -> framework docs 1.0.1
:docs:`documentation (1.2.3) <1.2.3>`
.. Result -> documentation (1.2.3)

Wireshark rpm packaging - setting the release number

I'm running the configure.ac on RHEL 7.2, I'm wondering if there's a way to set the Release number (which is defined om the spec file) as a variable like the Version number which is being generated by the configure.ac and it's written to the config.h file , I'd like to set a kind of BUILD_NUMBER variable somewhere, and it'll take the value of the exported variable during the execution.
The release number for an RPM package is set by the Release: tag in the spec-file. Some spec-files are generated, e.g., using autoconf to substitute values such as the release number in a template, e.g., mypackage.spec.in, to obtain mypackage.spec
A quick check of wireshark's source shows that it uses this scheme, but its template hardcodes the release number as 1. You could modify the configure script and template to add your own option.
For example, adapting the style of --with-XXX options used in the wireshark 2.0.1 configure.ac, you would add a chunk like this (untested):
AC_ARG_WITH([release],
AC_HELP_STRING( [--with-release=#<:#1/no/4/5#:>#],
[set release-number in package #<:#default=1#:>#]),
with_release="$withval", with_release="unspecified")
case "x$with_release" in
x[[1-9]]*)
RELEASE="$with_release"
;;
*)
AC_MSG_ERROR(release is not a number: $with_release)
;;
esac
AC_SUBST(RELEASE)
and use the RELEASE variable in packaging/rpm/SPECS/wireshark.spec.in, as you see the VERSION value used:
Release: #RELEASE#
Alternatively, if you are using the wireshark source without modifying it directly, your build script could
unpack the sources,
update the spec-file,
repack the tarball,
deploy the updated tarball to your build area
Either way, you would have to do some work.

Pelican plugins not found

I am testing out Pelican for my personal blog use but I am stuck with the use of plugins.
Apparently, the pelicanconf.py file is not picking up my plugins.
Here's a snippet of my pelicanconf.py:
THEME = '/Users/namely/Public/MyPersonalWorkspace/static_blog/static-blog/pelican-themes/pelican-bootstrap3'
PLUGINS_PATHS = ["./plugins","plugins","./pelican-plugins","pelican-plugins","/Users/namely/Public/MyPersonalWorkspace/static_blog/static-blog/pelican-plugins"]
PLUGINS = ["sitemap"]
My pelican setup for theme is correct since I am using the theme correctly. But somehow, it is not reading my plugin directories. The following is my folder structure:
static-blog/
content/
output/
pelican-plugins/
sitemap/
__init__.py
sitemap.py
Readme.rst
plugins/
sitemap.py
pelican-themes/
pelican-bootstrap3/
# and all pelican-bootstrap3's files
pelicanconf.py
publishconf.py
develop_server.sh
fabfile
Makefile
I am using Pelican 3.4, on a Macbook Air ( OSX 10.9.4 ), Python version 2.7.5
I am using a list of directories for PLUGIN_PATHS since all the directories didn't work ( either individually or in a list, relative or absolute. ).
My pelican installation is working fine since I can run my blog. It's just that the plugins are not working somehow. For plugins, I simply did a git clone from https://github.com/getpelican/pelican-plugins.
The error message I received was:
ERROR: Can't find plugin `sitemap`: No module named sitemap
Any advice is great!
Thank you all!
It might be something as simple as a typo in your settings file. As noted in the docs, the name of the relevant setting is PLUGIN_PATHS, whereas your settings file appears to contain PLUGINS_PATHS (note the spurious S).

How to install a masked package in Gentoo 2008?

I searched the net and handbook, but I only managed to learn what is the masked package, and not how to install it. I did find some commands, but they don't seem to work on 2008 (looking at it, it seems those are for earlier versions). I have something like this:
localhost ~ # emerge flamerobin
Calculating dependencies
!!! All ebuilds that could satisfy "dev-db/flamerobin" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-db/flamerobin-0.8.6 (masked by: ~x86 keyword)
- dev-db/flamerobin-0.8.3 (masked by: ~x86 keyword)
I would like to install version 0.8.6, but don't know how? I found some instructions, but they tell me to edit or write to some files under /etc/portage. However, I don't have /etc/portage on my system:
localhost ~ # ls /etc/portage
ls: cannot access /etc/portage: No such file or directory
There are two different kinds of masks in gentoo. Keyword masks and package masks. A keyword mask means that the package is either not supported (or untested) by your architecture, or still in testing. A package mask means that the package is masked for another reason (and for most users it is not smart to unmask). The solutions are:
Add a line to /etc/portage/package.keywords (Check man portage in the package.keywords section). This is for the keyword problems.
Add a line to /etc/portage/package.unmask for "package.mask" problems (you can also use package.mask for the converse). This is in the same man file, under the section package.unmask. I advise to use versioned atoms here to avoid shooting in your own foot with really broken future versions a couple of months down the line.
These days there's also a more 'automated' solution, called "autounmask". No more file editing needed to unmask!
The great benefit of the package is, it also unmasks / handles keywords of dependencies if needed. It's provided in the package app-portage/autounmask.
/etc/portage/package.keywords and
/etc/portage/package.unmask
can be directories as well nowadays (but autounmask handles single files as well). In those directories, multiple can place multiple "autounmask" files, one file in each dir per "unmask"-package. If you use single files instead of dirs, 'autounmask' will place some kind of header / footer, and this way it becomes easy to remove "unmasks" if wanted.
Simply mkdir /etc/portage and edit as mentioned here: http://gentoo-wiki.com/TIP_Dealing_with_masked_packages#But_you_want_to_install_the_package_anyway...

Resources