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 breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
escapeinside={\%*}{*)}, % if you want to add a comment within your code escapeinside={\%*}{*)}, % if you want to add a comment within your code
belowcaptionskip=5em, belowcaptionskip=5em,
belowskip=1em, aboveskip=\baselineskip,
aboveskip=1.8em, belowskip=\baselineskip,
commentstyle=\itshape\color{mygreen}, commentstyle=\itshape\color{mygreen},
keywordstyle=\bfseries\color{black}, keywordstyle=\bfseries\color{black},
identifierstyle=\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 An LE device is discoverable and connectable, only if it periodically
sends out Advertisements. An advertisement contains up to 31 bytes of sends out Advertisements. An advertisement contains up to 31 bytes of
data. To configure and enable advertisement broadcast, the following HCI data. To configure and enable advertisement broadcast, the following GAP
commands can be used: 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 Please have a look at the [SPP and LE
[subsubsection:sendinghci] for details and have a look at the [SPP and LE
Counter example](examples/generated/#sec:sppandlecounterExample). Counter example](examples/generated/#sec:sppandlecounterExample).
In addition to the Advertisement data, a device in the peripheral role In addition to the Advertisement data, a device in the peripheral role

View File

@ -3,10 +3,38 @@
import sys, yaml import sys, yaml
import os, re import os, re
def href2path(line): def fix_latex(line):
corr = re.match('.*(href{}).*',line) corr = re.match('.*(href{}).*',line)
if corr: if corr:
line = line.replace(corr.group(1), "path") 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 return line
@ -49,7 +77,7 @@ def main(argv):
with open(btstack_generated_file, 'r') as fin: with open(btstack_generated_file, 'r') as fin:
for line in fin: for line in fin:
line = href2path(line) line = fix_latex(line)
aout.write(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, * packet handler, see Listing SppServerPacketHandler. In this example,
* the following events are passed sequentially: * the following events are passed sequentially:
* - BTSTACK_EVENT_STATE, * - BTSTACK_EVENT_STATE,
* - HCI_EVENT_PIN_CODE_REQUEST (Standard pairing) or \\ * - HCI_EVENT_PIN_CODE_REQUEST (Standard pairing) or
* HCI_EVENT_USER_CONFIRMATION_REQUEST \\ (Secure Simple Pairing), * - HCI_EVENT_USER_CONFIRMATION_REQUEST (Secure Simple Pairing),
* - RFCOMM_EVENT_INCOMING_CONNECTION, * - RFCOMM_EVENT_INCOMING_CONNECTION,
* - RFCOMM_EVENT_OPEN_CHANNEL_COMPLETE, and * - RFCOMM_EVENT_OPEN_CHANNEL_COMPLETE, and
* - RFCOMM_EVENT_CHANNEL_CLOSED * - RFCOMM_EVENT_CHANNEL_CLOSED