From 8cab5909e089ce2561296e003cc0467eff420cb5 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 9 Oct 2014 07:57:26 -0700 Subject: [PATCH] Improve PDF output --- doc/conf.py | 2 +- doc/index.rst | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 5a23e4ad..d0ba68fe 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -202,7 +202,7 @@ latex_elements = { # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'format.tex', u'format Documentation', + ('index', 'format.tex', u'C++ Format Documentation', u'Victor Zverovich', 'manual'), ] diff --git a/doc/index.rst b/doc/index.rst index 17d94f22..59b34108 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,9 +1,7 @@ .. highlight:: c++ -.. _string-formatting-api: - Usage ------ +===== To use the C++ Format library, add ``format.h`` and ``format.cc`` from a `release archive `_ @@ -18,15 +16,17 @@ the line before other includes in ``format.cc``. +.. _string-formatting-api: + C++ Format Library API ----------------------- +====================== All functions and classes provided by the C++ Format library reside in namespace ``fmt`` and macros have prefix ``FMT_``. For brevity the namespace is usually omitted in examples. Formatting functions -^^^^^^^^^^^^^^^^^^^^ +-------------------- The following functions use `format string syntax`_ similar to the one used by Python's `str.format @@ -52,7 +52,7 @@ arguments in the resulting string. .. doxygenfunction:: fmt::print(std::ostream &, StringRef, ArgList) Printf formatting functions -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +--------------------------- The following functions use `printf format string syntax `_ with @@ -128,7 +128,7 @@ allocator:: FMT_VARIADIC(CustomString, format, CustomAllocator, fmt::StringRef) Format String Syntax --------------------- +==================== Formatting functions such as :ref:`fmt::format() ` and :ref:`fmt::print() ` use the same format string syntax described in this section. @@ -183,7 +183,7 @@ See the :ref:`formatexamples` section for some examples. .. _formatspec: Format Specification Mini-Language -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +---------------------------------- "Format specifications" are used within replacement fields contained within a format string to define how individual values are presented (see @@ -416,7 +416,7 @@ The available presentation types for pointers are: .. _formatexamples: Format examples -^^^^^^^^^^^^^^^ +--------------- This section contains examples of the format syntax and comparison with the printf formatting.