Re: Code Examples in Documents

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/22/2015 02:16 AM, David Ashley wrote:
> All -
> 
> In the past when creating a new document that will contain code examples
> in C/C++ or Python I always placed the examples in separate files from
> the main XML. This way it would be easier to test those examples to make
> sure that they work as intended. Being new to the Fedora Docs team I
> have looked at some of the current documents and they do not seem to
> separate the code from the document itself. So I am wondering if I
> should follow that convention or separate the code from the XML like I
> have done in the past?

IMHO you are doing it the right way.

https://jfearn.fedorapeople.org/en-US/Publican/4.3/html/Users_Guide/sect-Publican-Users_Guide-Adding_code_samples.html

The trick is to ensure, as per step 3, that your xi:include of the file
uses 'parse="text"' so that special characters in your code and handled
properly.

Cheers, Jeff.
-- 
docs mailing list
docs@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe:
https://admin.fedoraproject.org/mailman/listinfo/docs




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Red Hat 9]     [Yosemite News]     [KDE Users]

  Powered by Linux