[publican-list] conditionally exclude a paragraph
Joshua Wulf
jwulf at redhat.com
Mon Nov 7 23:40:57 UTC 2011
== The brute force method ==
<section lang="de-DE" lang="es-ES" lang="pt-BR" ...>
<title>The title</title>
...
</section>
== Using Condition ==
You could also use "condition" [1], although it requires to be manually
switched when changing between en-US and non-en-US.
[1]
http://rlandmann.fedorapeople.org/pug/sect-Users_Guide-Conditional_tagging.html
So:
<section condition="non-EN">
<title>The title</title>
...
</section>
and then in publican.cfg you set
condition: non-EN
When building non-en-US languages.
== Scripting Condition ==
You could automate the switching by calling a shellscript that sets this
depending on the lang that you are building. So:
mypublicanbuild.sh
if 'en-US' in langs[] then write 'condition: EN' to publican.cfg
else
write 'condition: non-EN' to publican.cfg
== Publican RFE? Langs as Conditions ==
Maybe it would be useful if publican exposed the langs argument as an
array of 'condition's? Then it would be automatic.
On 11/08/2011 02:10 AM, Domingo Becker wrote:
> 2011/11/7 Domingo Becker <domingobecker at gmail.com>:
>> I would like to exclude a paragraph or section depending on the
>> language being built.
>>
>> The paragraph must exist in all languages except the source one.
>>
>> According to [1] I should use lang attribute, the section would look
>> like the following:
>>
>> <section lang="en-US">
>> <title>The title</title>
>> ...
>> </section>
>>
>> But what I really need is to exclude the paragraph when the language is en-US.
>>
>> Is there an operator or something like lang!="en-US", to indicate for
>> all languages except en-US?
>>
>
> Sorry, I forgot the link.
>
> [1] http://www.sagehill.net/docbookxsl/Profiling.html#MarkProfileText
>
> kind regards
>
> Domingo Becker
>
> _______________________________________________
> publican-list mailing list
> publican-list at redhat.com
> https://www.redhat.com/mailman/listinfo/publican-list
> Wiki: https://fedorahosted.org/publican
--
Give us your feedback on JBoss Enterprise Documentation, take the key
survey:
http://www.keysurvey.com/survey/361436/1065/
More information about the publican-list
mailing list