I would like to know how i can define a "patchwork-family" in GEDCOM, that is: a child in a family is adopted by one parent, but is the biological child of the other parent.
In GEDCOM, a child to parent relationship is indicated by a FAMC tag. An optional subtag of the FAMC tag is a PEDI tag which indicates the pedigree linkage type. In your case, since your person has both birth parents and adoptive parents, there should be multiple FAMC tags, e.g.:
0 @I1@ INDI 1 NAME Child /Name/ 1 FAMC @F1@ 2 PEDI birth 1 FAMC @F2@ 2 PEDI adopted
The values of the PEDI tag can be: "birth", "adopted", "foster", or "sealing". (Sealing is for Church of the LDS use).
The FAMC tag points to the "Family" of parents. The FAM record points back to the one or two people that makes up the parents of the child with the specified linkage.
The PEDI tag is often omitted for birth parents. But if the PEDI tag has the value adopted, then the FAMC tag will point to the family record that contains the adoptive parents.
In your case, the FAM records for the birth and adoptive parents might look like:
0 @F1@ FAM 1 HUSB @I2@ 1 WIFE @I3@ 0 @F2@ FAM 1 HUSB @I4@ (or WIFE)
If the other birth parent is not known, then you would leave either the HUSB or the WIFE tag out of the F1 record.
If the adoptive parent became partners with or married the birth parent, then you can include the parent link (either 1 WIFE @I3@, or 1 HUSB @I2@) in the F2 record. This way, marriage information and other notes can be made about the couple. A smart program reading this would see that the second family contains one of the birth parents and would realize that only the other F2 parent is the adoptive parent.
There is also an ADOP tag for the adoption event that you can place in the child's INDI record. The ADOP tag has an optional FAMC subtag that can indicate which parent adopted the child, e.g.:
0 @I1@ INDI 1 NAME Child /Name/ 1 FAMC @F1@ 2 PEDI birth 1 FAMC @F2@ 2 PEDI adopted 1 ADOP 2 DATE 11 JAN 1900 2 FAMC @F2@ 3 ADOP HUSB
The level 3 ADOP tag can specify HUSB, WIFE, or BOTH.
Note that not all programs have implemented the use of the FAMC tag under the ADOP tag even though it is in the GEDCOM 5.5.1 standard. You can include this construct as well for the programs that do understand it.
It is not a good practice to manually write your own GEDCOM. It is too easy to make mistakes, and using a genealogy program to write your GEDCOM is a better idea. Most programs do a decent job following the GEDCOM standard for most constructs.
The issue of adoptions and its implementation in GEDCOM is a bit more complicated and you may find both legal and illegal variations in the GEDCOMs that different programs produce, so a "patchwork-family" as you call it, may not transfer perfectly via GEDCOM between all programs.