size of figs in latex fixed manualy

This commit is contained in:
Milanka Ringwald 2015-06-18 17:39:57 +02:00
parent efaacf2645
commit 2657c3c0a6
4 changed files with 41 additions and 14 deletions

View File

@ -53,8 +53,8 @@ breaklines=true, % sets automatic line breaking
breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
escapeinside={\%*}{*)}, % if you want to add a comment within your code
belowcaptionskip=5em,
belowskip=1em,
aboveskip=1.8em,
aboveskip=\baselineskip,
belowskip=\baselineskip,
commentstyle=\itshape\color{mygreen},
keywordstyle=\bfseries\color{black},
identifierstyle=\color{black},

View File

@ -277,17 +277,16 @@ resolve the peer Bluetooth address as explained in Section on
An LE device is discoverable and connectable, only if it periodically
sends out Advertisements. An advertisement contains up to 31 bytes of
data. To configure and enable advertisement broadcast, the following HCI
commands can be used:
data. To configure and enable advertisement broadcast, the following GAP
functions can be used:
- *hci_le_set_advertising_data*
- *gap_advertisements_set_data*
- *hci_le_set_advertising_parameters*
- *gap_advertisements_set_params*
- *hci_le_set_advertise_enable*
- *gap_advertisements_enable*
As these are direct HCI commands, please refer to Section
[subsubsection:sendinghci] for details and have a look at the [SPP and LE
Please have a look at the [SPP and LE
Counter example](examples/generated/#sec:sppandlecounterExample).
In addition to the Advertisement data, a device in the peripheral role

View File

@ -3,10 +3,38 @@
import sys, yaml
import os, re
def href2path(line):
def fix_latex(line):
corr = re.match('.*(href{}).*',line)
if corr:
line = line.replace(corr.group(1), "path")
corr = re.match('.*begin{lstlisting}',line)
if corr:
line = "\leavevmode" + line
corr = re.match('.*section{APIs}.*',line)
if corr:
line = "\leavevmode\pagebreak\n" + line
corr = re.match('(.*includegraphics)(.*btstack-architecture.*)',line)
if corr:
line = corr.group(1) + "[width=\\textwidth]" + corr.group(2)
corr = re.match('(.*includegraphics)(.*singlethreading-btstack.*)',line)
if corr:
line = corr.group(1) + "[width=0.3\\textwidth]" + corr.group(2)
corr = re.match('(.*includegraphics)(.*multithreading-monolithic.*)',line)
if corr:
line = corr.group(1) + "[width=0.8\\textwidth]" + corr.group(2)
corr = re.match('(.*includegraphics)(.*multithreading-btdaemon.*)',line)
if corr:
line = corr.group(1) + "[width=0.8\\textwidth]" + corr.group(2)
corr = re.match('(.*includegraphics)(.*btstack-protocols.*)',line)
if corr:
line = corr.group(1) + "[width=0.8\\textwidth]" + corr.group(2)
return line
@ -30,7 +58,7 @@ def main(argv):
section_ref = re.match('.*\(((.*)(#sec:.*))\).*',line)
if section_ref:
line = line.replace(section_ref.group(2),"")
aout.write(line)
aout.write(line)
pandoc_cmd = "pandoc -f markdown -t latex --filter pandoc-fignos --listings latex/btstack_generated.md -o latex/btstack_generated.tex"
p = os.popen(pandoc_cmd,"r")
@ -49,7 +77,7 @@ def main(argv):
with open(btstack_generated_file, 'r') as fin:
for line in fin:
line = href2path(line)
line = fix_latex(line)
aout.write(line)

View File

@ -158,8 +158,8 @@ static void one_shot_timer_setup(void){
* packet handler, see Listing SppServerPacketHandler. In this example,
* the following events are passed sequentially:
* - BTSTACK_EVENT_STATE,
* - HCI_EVENT_PIN_CODE_REQUEST (Standard pairing) or \\
* HCI_EVENT_USER_CONFIRMATION_REQUEST \\ (Secure Simple Pairing),
* - HCI_EVENT_PIN_CODE_REQUEST (Standard pairing) or
* - HCI_EVENT_USER_CONFIRMATION_REQUEST (Secure Simple Pairing),
* - RFCOMM_EVENT_INCOMING_CONNECTION,
* - RFCOMM_EVENT_OPEN_CHANNEL_COMPLETE, and
* - RFCOMM_EVENT_CHANNEL_CLOSED